time pv -c -N gz /tmp/mysqldump.sql.gz | gunzip -c | pv -c -N unpacked | perl -pe 'print STDERR ($_) unless m/^INSERT/i' | mysql-main
...
unpacked: 611MB 0:02:20 [4.41MB/s] [ <=> ]
gz: 69.6MB 0:02:20 [ 469kB/s] [> ] 0% ETA 9:56:01
...
Purpose
Mainly documenting a few things I don't want to forget. Perhaps it's useful to others as well.
If you came here for FISHWORKS (which I'm pretty sure you didn't), click here
If you came here for FISHWORKS (which I'm pretty sure you didn't), click here
torsdag 9 september 2010
måndag 6 september 2010
Newsbeuter Notify for Ubuntu
Todays fulhack... can be found here: http://code.launchpad.net/~frimik/newsbeuter-notify
tisdag 31 augusti 2010
Todays fulhack: On Call Diversion script for Nagios
A little concept hack that'll be used in Nagios to set diversion for the on call number as well as control who gets sms and when.
(c) 2010 Fulhack Industries
The divert method in this one is done through Telenor but it could just as well be through a GSM modem or a Nokia/Ericsson phone connected via USB.
https://minasidor.telenor.se/
https://minasidor.telenor.se/
tisdag 13 juli 2010
ircd-seven start scripts
ircd:
#!/bin/bash
#
# /etc/rc.d/init.d/ircd
#
# IRCd-seven
# Script to start and stop IRCd-seven
# Author: Mikael Fridh
#
# chkconfig: 2345 90 10
# description: IRCd-seven is an IRC daemon
# processname: ircd
# config: /usr/local/ircd/etc/ircd.conf
# Source function library.
. /etc/init.d/functions
# Defaults
IRCD_USER=ircd
# Pull in settings:
[ -f /etc/sysconfig/ircd ] && [ . /etc/sysconfig/ircd ]
start() {
echo -n "Starting ircd: "
daemon --check ircd --user ${IRCD_USER} /usr/local/ircd/bin/ircd
echo
touch /var/lock/subsys/ircd
return 0
}
stop() {
echo -n "Shutting down ircd: "
killproc ircd
echo
rm -f /var/lock/subsys/ircd
return 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status ircd
;;
restart)
stop
start
;;
reload)
echo -n "Sending ircd the HUP signal ..."
killproc ircd "-HUP"
echo
;;
condrestart)
[ -f /var/lock/subsys/ircd ] && restart || :
;;
*)
echo "Usage: ircd {start|stop|status|reload|restart|condrestart}"
exit 1
;;
esac
exit $?
torsdag 1 juli 2010
Wrote an article (howto) on incorporating vmware view in Ubuntu LTSP
I wrote this a couple weeks ago;
http://help.ubuntu.com/community/UbuntuLTSP/VMWareViewVDI
In short; Allows you to create a thin client out of any commodity hardware PC, for use with a Vmware View Server.
LTSP is a really nice project... kudos to ThinStation, but I got way better performance out of VMWare View on Ubuntu than on ThinStation... mainly due to poor graphics driver support in ThinStation.
http://help.ubuntu.com/community/UbuntuLTSP/VMWareViewVDI
In short; Allows you to create a thin client out of any commodity hardware PC, for use with a Vmware View Server.
LTSP is a really nice project... kudos to ThinStation, but I got way better performance out of VMWare View on Ubuntu than on ThinStation... mainly due to poor graphics driver support in ThinStation.
onsdag 21 april 2010
xorg.conf ModeLine for HP2159v
So I got a new Desktop Computer (Dell Precision 380) and a Monitor: HP2159v, a 21.5" Full-HD monitor, it's perfectly fine, nice picture quality. Downside - the only connector is VGA, no DVI, no HDMI. I'm happy with whatever I get since I've exclusively been using laptops for 6 years now.
This config got 1920x1080 resolution going for me:
Section "Monitor"
Identifier "HP2159v"
# 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz
HorizSync 24.0 - 94.0
VertRefresh 50.0 - 76.0
Modeline "1920x1080" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "HP2159v"
Device "Configured Video Device"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1920x1080" "1024x768"
EndSubSection
EndSection
Section "Module"
Load "glx"
EndSection
Section "Device"
# nVidia Corporation NV41GL [Quadro FX 1400] (rev a2)
Identifier "Configured Video Device"
Driver "nvidia"
Option "NoLogo" "True"
EndSection
söndag 21 februari 2010
Stream sound from Windows to Linux with LiveInCode and PulseAudio
My OS's: Debian 5.0 Lenny / Windows Vista Home Premium.
Debian 5.0 (Lenny):
1. sudo apt-get install pulseaudio alsa-utils
2. sudo alsamixer -Dhw crank volume, unmute ...
3. pulseaudio --log-target=stderr
4. alsamixer -Dpulse crank, unmute ...
Windows Vista, configure Recording Mixer.:
1. Go to Recording Devices -> Recording.
2. Right click a free area in the recording device list -> mark "Show Disabled Devices"
3. Now enable "Stereo Mix".
Windows Vista, the Levels I chose for minimum distortion.
Click Properties on "Stereo Mix". Choose "Levels". Crank Stereo Mix to 100.
Set the Main output Level to 50.
Next, I jacked a headphone jack (3.5mm) into my laptops headphone outlet in order to physically mute it.
Windows Vista, software:
1. Install Cygwin.2. Install LineInCode: http://liveincode.rm.pp.ru/
3. Put lineco.exe in your path for simplicity.
4. Launch cygwin, run linco.sh after putting the following in it:
linco.exe --flag-files -B 16 -C 2 -R 48000 | ssh mikaelf@host.internal.example.com "pacat --rate=48000 --playback"
Now all your audio is "routed" to your Linux Machine!
Note: I used SSH public keys for the ssh connection.
Next, wrap the linco.exe line in a while [ 1 ]; do linco ...; sleep 60; done to make it autorestarting in case you lose connection to your sound server.
Things to note:
You might be using 44.1Khz rate all over, make sure you adapt your settings and scripts so the rate matches on both hosts.
References:
torsdag 26 mars 2009
Ubuntu 8.10 Intrepid on Asus EeePC 901Go
So, got my Asus EeePC 901Go 3G and after reading alot of recent praise for Ubuntu on it (even Vanilla Ubuntu) I decided to go for that. I like to keep as close to upstream as possible.
CPU Model: Intel Atom N270
Chipset: Intel 945GSE
Preparing for Installation
ISO: http://se.releases.ubuntu.com/releases/8.10/ubuntu-8.10-desktop-i386.iso
Boot the Ubuntu Live CD and, or from an already installed Ubuntu, launch usb-creator.
Insert a pen drive, choose your CD or ISO and create the startup media.
Make sure you have a Wire connection or a Mobile Broadband sim card because your wireless network adapter will not work out of the box.
Installation
Insert the pen drive in your Eee, boot it by pressing Esc for BBS Popup Menu and choose to boot from pen drive.
Install Ubuntu as usual.
Issues
During installation I could not reach the "Next" icons with the mouse pointer. I blindly pressed Enter to get past the first few installation dialogues.
Note: I performed my first installation in Safe graphics mode and after that installation my Ubuntu only showed 800x600 resolution. Probably because it adds Driver "vesa" to xorg.conf
First boot
Log in and install software upgrades.
Wireless Support
* Download compat-wireless for kernels >= 2.6.27.
Follow the instructions to Build, Install, Unload, and Load (modprobe ath5k or reboot)
Hot Keys & OSD:
http://greg.geekmind.org/eee-control/
Other tweaks:
http://hehe2.net/linuxhowto/howto-your-perfect-ubuntu-on-your-perfect-eee-pc/
Prenumerera på:
Inlägg (Atom)