Skip to content

Instantly share code, notes, and snippets.

View simonwo's full-sized avatar

Simon Worthington simonwo

View GitHub Profile
@simonwo
simonwo / install-plugins.sh
Created May 10, 2014 00:53
Scripts for auto installing Wordpress plugins. Warning: they're shitty
#!/bin/sh
# Usage:
# $ cd themes/your-theme/
# $ sh ./install-plugins.sh plugins.list
wget -i $1
mv *.zip ../../plugins
cd ../../plugins
ls | xargs -n 1 unzip
@simonwo
simonwo / gist:6868309
Created October 7, 2013 13:47
Partial classes in Ruby. Generates a new, specialised class by defining some of it's initializer arguments ahead of time.
class Class
def partial(*prep)
Class.new(self) do
define_method(:initialize) do |*args|
super(*(prep + args))
end
end
end
def << (prep)