Skip to content

Instantly share code, notes, and snippets.


evandrix evandrix

View GitHub Profile
evandrix /
Created Mar 13, 2012
PEP 20 (The Zen of Python) by example
#!/usr/bin/env python
PEP 20 (The Zen of Python) by example
Usage: %prog
:Author: Hunter Blanks, /
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
<uses-sdk android:minSdkVersion="8"/>
<uses-permission android:name="android.permission.READ_CONTACTS" />
<application android:label="@string/app_name">

Gmail.js - JavaScript API for Gmail

TL;DR Summary

  • Lots of api methods to work with gmail. Useful for chrome extensions
  • Most of them dont take arguments, they work on what is currently visible on the screen
  • I still need to add implementation for chrome extension, works by injecting js for now
  • Main method is gmail.observe.on('lots_of_actions_here', callback())
  • Click on a method link to view more detailed docs
  • Create an issue/pull request for feedback, requests and fixes
evandrix /
Created Jul 21, 2011
Print Directory Tree Structure (with/without files)
#! /usr/bin/env python
# Written by Doug Dahms
# Prints the tree structure for the path specified on the command line
from os import listdir, sep
from os.path import abspath, basename, isdir
evandrix / p438.cpp
Created Jan 11, 2014
Project Euler Problem 438
View p438.cpp
#include <iostream>
#include <cmath>
#include <stdlib.h>
#include <cstring>
using namespace std;
* Problem 438
* Example:
evandrix /
Created Sep 11, 2012
Headless web browsers

Here are a list of headless browsers that I know about:

  • [HtmlUnit][1] - Java. Custom browser engine. JavaScript support/DOM emulated. Open source.
  • [Ghost][2] - Python only. WebKit-based. Full JavaScript support. Open source.
  • [Twill][3] - Python/command line. Custom browser engine. No JavaScript. Open source.
  • [PhantomJS][4] - Command line/all platforms. WebKit-based. Full JavaScript support. Open source.
  • [Awesomium][5] - C++/.Net/all platforms. Chromium-based. Full JavaScript support. Commercial/free.
  • [SimpleBrowser][6] - .Net 4/C#. Custom browser engine. No JavaScript support. Open source.
  • [ZombieJS][7] - Node.js. Custom browser engine. JavaScript support/emulated DOM. Open source.
  • [EnvJS][8] - JavaScript via Java/Rhino. Custom browser engine. JavaScript support/emulated DOM. Open source.
evandrix / gist:1901352
Created Feb 24, 2012 — forked from michaelpetrov/gist:1899630
Stripe CTF Challenge - Solutions to all Levels
View gist:1901352
Stripe CTF - Work Notes
mpetrov (
These notes are very rough. They should give a general idea of how each level was solved.
---- LEVEL 01 (login: e9gx26YEb2) -----
Solution: modifying PATH env variable
Password: kxlVXUvzv
evandrix / .bash_profile
Created Jul 11, 2011
A better ls for Mac OS X
View .bash_profile
# MacPorts
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/share/man:$MANPATH
# Terminal colours (after installing GNU coreutils)
NM="\[\033[0;38m\]" #means no background and white lines
HI="\[\033[0;37m\]" #change this for letter colors
HII="\[\033[0;31m\]" #change this for letter colors
SI="\[\033[0;33m\]" #this is for the current directory
evandrix /
Created Jul 15, 2011
# by David Winterbottom
# Repoint an existing symlink to a new location
ln -nsf <TARGET> <LINK>
# RDP through SSH tunnel
ssh -f -L3389:<RDP_HOST>:3389 <SSH_PROXY> "sleep 10" && rdesktop -T'<WINDOW_TITLE>' -uAdministrator -g800x600 -a8 -rsound:off -rclipboard:PRIMARYCLIPBOARD -5 localhost
# Control ssh connection
evandrix /
Created Jun 29, 2011
CodeSnippets: ANSI terminal color chart
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
# Author: Giles Orr
You can’t perform that action at this time.