Tag Archives: script

uzbl follow.js: link following with settable keys

EDIT: this script is no longer up-to-date and won’t work with the current version of uzbl. This is a diff to current follow_Numbers.js. The new script, which I called follow.js, is more versatile, since the characters used for labels and key navigation can be set using the hintKeys variable. 2d1 <  * Its pretty stable, [...]

Emacs with Tramp using zsh

First off, I recommend reading the relevant parts of the user manual, you might find the answer there. Now, to the issue. I installed tramp and added this to ~/.emacs: (require ‘tramp) (setq tramp-default-method “scp”) Nothing special here, except it didn’t work. (The message was something like “waiting 60s for local shell”. Of course, I [...]

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 [...]

Simple script to see file sizes

#!/usr/bin/python # directory size – show it import os, sys if len(sys.argv) < 2: os.system("du -sh *") print "—–" os.system("du -sh .") else: for arg in sys.argv[1:]: cmd = "du -sh \"%s\"" % arg os.system(cmd)

Batch image resizing

My php script no longer works, it breaks on gd functions somehow. So I use this Gimp script instead.

A PHP script to resize all images in a directory

This is a crude hack to resize images in a directory. The script is invoked as: shrink <new_x> <new_y> <file> <file> <file> … You’ll need PHP with the GD library. That’s php5-gd on FreeBSD. #!/usr/local/bin/php # The output is JPEG, quality 88. <?php // Fuction to resize images, originally by D. Weimer. // Code reformatting [...]

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/ &

Follow

Get every new post delivered to your Inbox.