This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
############################################# | |
# Convert all PSD files in a directory to JPG | |
# | |
# Author: Martin Rio | |
# Version: 0.1 (3/23/2011) | |
# Dependencies: | |
# - ImageMagick's convert utility | |
############################################# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for d in `ls -1`; do | |
if [ -d $d/.git ]; then | |
cd $d | |
git pull | |
cd .. | |
elif [ -d $d/.hg ]; then | |
cd $d | |
hg pull -u | |
cd .. | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import multiprocessing | |
import time | |
from random import randint | |
PROCESSES = 5 | |
WORKER_CALLS = 7 | |
def worker(num): | |
"""worker function""" | |
print 'Starting worker', num |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file | |
php5 +fastcgi +pear +apache2 | |
php5-mysql | |
php5-solr | |
php5-soap | |
php5-openssl | |
php5-gd | |
php5-curl | |
git-core | |
mercurial |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from instagram.client import InstagramAPI | |
from instagram.bind import InstagramAPIError, InstagramClientError | |
from time import sleep | |
access_token = "SETMET" | |
api = InstagramAPI(access_token=access_token) | |
follows = api.user_follows(MY_USERID) | |
for user in follows[0]: | |
print "Unfollowing: " + user.username |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""memorised module - container for the memorise python-memcache decorator""" | |
__author__ = 'Wes Mason <wes [at] 1stvamp [dot] org>' | |
__docformat__ = 'restructuredtext en' | |
__version__ = '1.0.1' | |
import memcache | |
import itertools | |
from hashlib import md5 | |
from functools import wraps | |
import inspect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
""" | |
A very basic script that emulates Sendmail's `mail` command, sending emails | |
with [aws-cli](https://github.com/aws/aws-cli). It replicates the minimum | |
amount of functionality for delivery [Munin notifications]( | |
http://munin-monitoring.org/wiki/HowToContact) (e.g. `contact.email.command | |
ses_mail -s "Munin-notification for ${var:group} :: ${var:host}" your@email | |
.address.here` | |
). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (class_exists('Memcache')) { | |
$server = 'SETME'; # Memcached server hostname | |
$memcache = new Memcache; | |
$isMemcacheAvailable = @$memcache->connect($server); | |
if ($isMemcacheAvailable) { | |
$aData = $memcache->get('data'); | |
echo '<pre>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer