Skip to content

Instantly share code, notes, and snippets.

View jdorfman's full-sized avatar

Justin Dorfman jdorfman

View GitHub Profile
#!/usr/bin/env python
#install the follow first:
#sudo easy_install pip
#sudo pip install -U boto
#sudo pip install configparser
@kylerush
kylerush / s3-maxcdn-deploy.py
Created January 22, 2013 18:09
Git, S3 and MaxCDN Python deploy script. The script gets the changed file between the two latest Git commits, uploads the changed files to S3 and then purges the paths from MaxCDN using the API.
#!/usr/bin/env python
#install the follow first:
#sudo easy_install pip
#sudo pip install -U boto
#sudo pip install configparser
<?php
// vim: foldmethod=marker
/* Generic exception class
*/
class OAuthException extends Exception {
// pass
}
class OAuthConsumer {
<?php
/*
* NetDNA API Command Line Utility - PHP
* Version 1.0a
*/
// Get it here: https://raw.github.com/gist/2791330/64b7007ab9d4d4cbb77efd107bb45e16fc6c8cdf/OAuth.php
require_once("OAuth.php");
#NetDNA API Sample Code - Python
#Version 1.0a
# Thanks to @sajal from TurboBytes.com for getting this script started
# Contributed: @jdorfman & the @netdna family
import oauth.oauth as oauth
import httplib2, json
import pprint
@jdorfman
jdorfman / gist:2474890
Created April 24, 2012 00:26
my new favorite utility
mutt -s "Birthday celebration" -a citymap.jpg all@friends.org \
< invitation.txt
@jdorfman
jdorfman / forloop-inet_ntoa
Created February 18, 2012 02:01
just in case you need to convert many IPs from numbers to addresses
for i in `cat ip-addresses`; do echo "SELECT INET_NTOA(${i});" |mysql -uanonymous |awk "NR==2" >> /tmp/ntoa; done
@mathiasverraes
mathiasverraes / .bashrc
Created November 3, 2011 18:46 — forked from thomasvm/.bashrc
Git shortcuts
#! /bin/sh
alias gs="git status"
alias gc="git commit"
alias gr="git checkout"
alias ga="git add"
alias gl="git lola"
@aaronshaf
aaronshaf / es.sh
Created September 3, 2011 03:53
Install ElasticSearch on Ubuntu 11.04
cd ~
sudo apt-get update
sudo apt-get install unzip curl python-software-properties -y
#sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
@GregMefford
GregMefford / setup-statsd-centos.sh
Last active April 10, 2022 15:31 — forked from collegeman/setup-statsd.sh
Install Graphite and StatsD on CentOS (updated for 6.4 x86_64)
# First do a fresh install of CentOS 5.7 i386, server configuration (no GUI)
# This should be performed as root since it's going to be installing a bunch of stuff
# --- Update things to make sure we have the latest patches ---
# Add EPEL so we can get reasonably recent packages
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# --- Install all the packages --- #
yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached