Tag Archives: sh

uzbl_tabbed.py: commands to FIFO

The list is on line 782 (ATM) of uzbl_tabbed.py. The FIFO location is determined by your settings (top of file for defaults, possibly overridden from config). It’s like this: 782 def parse_command(self, cmd): 783 ”’Parse instructions from uzbl child processes.”’ 784 785 # Commands ( [] = optional, {} = required ) 786 # new [...]

Lousy jailed-lighttpd scripts

Now, jailed has its own automated scripts to generate its own proper fully-contained jails (as far as “jails” on GNU/Linux go, that is; they’re chroots, actually). The following scripts are leftovers from me trying to do the same, before finding out that the utilities are already there. They have been lying around for quite some [...]

Making a movie from image files using ffmpeg

There’s quite a lot of tutorials on the net, search for the title. I had an issue, though: the images were taken with a web camera, and some of the images were garbled (wrong header, bad data, etc.). So ffmpeg choked on those silently, and the movie got cut off in the middle. To find [...]

wpi-monitor: simple script to keep the wireless link up

I’m using a rum device in Host AP mode, so every time I try to send a large file or open many connections, the wireless link breaks down (gets “no carrier” instead of “associated”). To get it back up, I have to pull the interface on the station computer (wpi) down and then back up. [...]

Copying music to USB flash from command line, fast

Thanks to this post. EDIT: This doesn’t work well. #!/bin/sh # Script to copy music to media player (USB). # remove the last character var=`echo $*|sed s/.$//` echo “Copying: $var” # now copy cp -R “$var” /mnt/player/ &

Grab’n'drop

Here’s something annoying: when you have to copy/move some files to another directory, and then cd there yourself. Written scripts to do that faster: grab: #!/bin/sh dir=`pwd` for item in `echo $@`; do echo $dir/$item >> ~/tmp/grab done And drop: #!/bin/sh grabfile=~/tmp/grab tempfile=~/tmp/grab.tmp echo “” > $tempfile # create if missing for item in `cat [...]

awesome: launch custom commands from menu

The menu in the awesome wiki is a good one, yet it has some drawbacks: 1) It’s written in bash. Not all systems have bash. Not all systems have bash in /bin/bash. 2) The menu is stored inside the script itself, which makes it hard to edit. My solution: write a menu file with choices: [...]

Follow

Get every new post delivered to your Inbox.