Skip to content

Instantly share code, notes, and snippets.


Garth Humphreys garthhumphreys

View GitHub Profile
#!/usr/bin/env bash
# Requirements:
# needs to be installed in order to use this, see
# This is the advanced version of converting pdf to swfs by flattening pages to bitmap.
# Copyright (C) 2012 Garth Humphreys,,
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
View RGBColor.h
/* rgb color */
#define RGBCOLOR(r,g,b) \
[UIColor colorWithRed:r/256.f green:g/256.f blue:b/256.f alpha:1.f]
/* rgb color with alpha (rgba) */
#define RGBACOLOR(r,g,b,a) \
[UIColor colorWithRed:r/256.f green:g/256.f blue:b/256.f alpha:a]
View NSLog-format-specifiers.txt
%@ Object
%d, %i signed int
%u unsigned int
%f float/double
%x, %X hexadecimal int
%o octal int
%zu size_t
%p pointer
%e float/double (in scientific notation)
garthhumphreys /
Created Oct 31, 2012
Print to screen a random country
#!/usr/bin/python -tt
import random
def main():
This script randomly prints to screen a soverign country from a list of 206 countries
View gist:8916205
# Work in progress
# Need to test in virtualbox
sudo apt-get install libxml2-dev libxslt-dev
sudo apt-get install python-lxml
virtualenv --distribute venv
source venv/bin/activate
garthhumphreys / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
garthhumphreys /
Last active Aug 29, 2015 — forked from jookyboi/
Python-related modules and guides.


  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.


View gist:17d6a1809b6f57be6b5a
You'll need to install npm, nodejs and phantomjs
$ apt-get install nodejs nodejs-dev npm phantomjs
$ pip install selenium-python

###IAB1 Arts & Entertainment IAB1-1 Books & Literature
IAB1-2 Celebrity Fan/Gossip
IAB1-3 Fine Art
IAB1-4 Humor
IAB1-5 Movies
IAB1-6 Music
IAB1-7 Television

###IAB2 Automotive

garthhumphreys /
Last active Nov 18, 2020
Installing Homebrew Tap - Pen Test Tools - Dirb
$ brew tap sidaf/pentest
You can’t perform that action at this time.