Skip to content

Instantly share code, notes, and snippets.

💭
offline

evandrix evandrix

💭
offline
Block or report user

Report or block evandrix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@evandrix
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
IN="\[\033[0m\]"
@evandrix
evandrix / favourites.sh
Created Jul 15, 2011
Commandlinefu.com
View favourites.sh
# http://www.commandlinefu.com/commands/favourites/plaintext
# commandlinefu.com 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
evandrix / README.md
Created Sep 11, 2012
Headless web browsers
View README.md

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.
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8"/>
<uses-permission android:name="android.permission.READ_CONTACTS" />
<application android:label="@string/app_name">
@evandrix
evandrix / pep20_by_example.py
Created Mar 13, 2012
PEP 20 (The Zen of Python) by example
View pep20_by_example.py
#!/usr/bin/env python
"""
=====================================
PEP 20 (The Zen of Python) by example
=====================================
Usage: %prog
:Author: Hunter Blanks, hblanks@artifex.org / hblanks@monetate.com
@evandrix
evandrix / ansi_terminal_color.sh
Created Jun 29, 2011
CodeSnippets: ANSI terminal color chart
View ansi_terminal_color.sh
#!/bin/bash
#
# 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
View keybase.md

Keybase proof

I hereby claim:

  • I am evandrix on github.
  • I am evandrix (https://keybase.io/evandrix) on keybase.
  • I have a public key ASBktS2U6T_UsjtfZ1SJQxJ2VZpY0pEXV1YyzrQCpSpByAo

To claim this, I am signing this object:

@evandrix
evandrix / gist:1076041
Created Jul 11, 2011
Using bcrypt to secure passwords in a Perl application
View gist:1076041
#!/usr/bin/perl
use Crypt::Eksblowfish::Bcrypt;
use Crypt::Random;
$password = 'bigtest';
$encrypted = encrypt_password($password);
print "$password is encrypted as $encrypted\n";
print "Yes the password is $password\n" if check_password($password, $encrypted);
print "No the password is not smalltest\n" if !check_password('smalltest', $encrypted);
View README.md

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
evandrix / gist:1054070
Created Jun 29, 2011
Balsamiq Mockups v2.0.14
View gist:1054070
License Information:
Product: MockupsAir
Company: evandrix@gmail.com
Users : 9999
Serial : eJzzzU/OLi0odswsqkktS8xLKcqscEjPTczM0UvOz60xNrM0MDMzMzA0q3GusQQCAKviE
Dk=
You can’t perform that action at this time.