A collection of scripts I use for simple needs.
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
ScreenSaverOn
ScreenSaverOnAndMonitorOff
any2mp3 Minor pruning and improvements. Oct 2, 2012
clone-website Simple script to use wget to clone a website. Good for old, all HTML … May 31, 2012
compress-audio-books Minor pruning and improvements. Oct 2, 2012
contact-sheets Bring back contact-sheets (formerly digiCamProc.sh) Feb 10, 2014
highlight.sh Syntax hightlight to HTML from vim. Sep 15, 2011
hr
mkpwd Added little script for password generation. Aug 4, 2011
mysql-dev Clean up mysql-dev help message. Feb 10, 2014
mysql-dev-new My MySQL dev scripts. Oct 2, 2012
phlint New version of my PHP linter. Python instead of bash this time. May 31, 2012
prepImagesForGallery.sh Added my script that preps images for the gallery. Jul 16, 2011
ssh-kill-mux
switchToAC.sh KDE compositing switch scripts. Oct 2, 2012
switchToBattery.sh KDE compositing switch scripts. Oct 2, 2012
venv-new Quick way to create a new virtualenv. Oct 2, 2012
wallet_maker

README.md

Helper Scripts

This is a collection of small scripts I've written and collected over the years. Each does one small thing, and few of them are really full featured tools.

Everything is licensed under the MIT license.

phlint

Language: Python

Requirements: php

A mutli-process PHP linter, using php -l. It takes the number of cores you have and spins up that many processes to run through all the PHP files it finds in the directory you provide (or CWD).

Usage: ./phlint my-php-files/

Why?

Using multiple processes speeds things up. Here's and example run on my machine.

jmhobbs@Cordelia$ time `for i in $(find . -iname '*.php'); do php -l $i; done`
real1m19.004s
user0m44.643s
sys0m30.570s
jmhobbs@Cordelia$ time phlint
==> Checking 1640 files with 8 cores, chunksize 205

real0m13.912s
user0m59.512s
sys0m36.158s
jmhobbs@Cordelia$ 

It's over a minute better in wall clock time.

clone-website

Language: bash

Requirements: wget, sed, awk

This script takes a URL and downloads everything you need to mirror it.

Usage: ./clone-website http://www.velvetcache.org/

any2mp3

Language: Bash

Requirements: mplayer, lame

http://www.velvetcache.org/2008/03/18/any2mp3

This script will take any set of audio files that mplayer can decode and re-encode them as MP3 files.

Usage: ./any2mp3.sh m4a

compress-audio-books

Language: Bash

Requirements: lame

This script recompresses audio book MP3 files at 64k bitrate. Smush 'em to fit on a mobile device.

Usage: ./compressAudioBooks.sh

ScreenSaverOn

Language: sh

Requirements: KDE, QDBus

This script will turn on your screen saver in KDE.

Usage: ./ScreenSaverOn

ScreenSaverOnAndMonitorOff

Language: sh

Requirements: KDE, QDBus, xset

This script will turn on your screen saver in KDE, then turn your monitor off.

Usage: ./ScreenSaverOnAndMonitorOff

mkpwd

Language: sh

Requirements: /dev/urandom, base64

Generate a password string (72 chars). If you want a shorter one pipe it through:

$ mkpwd | head -c 10
a7+hsy182n