Skip to content

Instantly share code, notes, and snippets.

View evandrix's full-sized avatar
💭
offline

evandrix evandrix

💭
offline
View GitHub Profile
@evandrix
evandrix / ADDREV.java
Created June 27, 2011 16:33
ADDREV template
public class ADDREV {
public static void main(String[] args)
{
}
}
@evandrix
evandrix / ansi_terminal_color.sh
Created June 29, 2011 11:59
CodeSnippets: ANSI terminal color chart
#!/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
@evandrix
evandrix / gist:1054070
Created June 29, 2011 15:20
Balsamiq Mockups v2.0.14
License Information:
Product: MockupsAir
Company: evandrix@gmail.com
Users : 9999
Serial : eJzzzU/OLi0odswsqkktS8xLKcqscEjPTczM0UvOz60xNrM0MDMzMzA0q3GusQQCAKviE
Dk=
@evandrix
evandrix / Hub.rb
Created June 30, 2011 22:15
hub fix for `hub clone a / b` => `hub clone a/b`
module Hub
class Runner
attr_reader :args
def initialize(*args)
# $ hub ["clone", "rtomayko", "/", "tilt"] => hub ["clone", "rtomayko/tilt"]
if args[0] == "clone" and args[2] = "/" and args.length == 4
args = ["clone", args[1..3].join]
end
@evandrix
evandrix / styles.css
Created July 4, 2011 18:48
tumblr stylesheet
/* evandrix.tumblr.com */
pre {
border: 1px solid #CCC;
border-color: #BBB #DDD #DDD #BBB;
margin : 0.5em;
padding : 0.5em;
line-height: 1.1em;
font-size: 1em;
background: #F5F5F5 !important;
overflow: auto;
@evandrix
evandrix / README
Created July 5, 2011 13:48
Node.js ticksort in CoffeeScript!
Beating your sleepsort by magnitudes! Takes only MAX(argv) ticks and does not overflow the stack either.
Fork the gist if you can reduce the size of ticksort.coffee.
/*
jsyang's solutions for ReadyForZero challenge.
June 16, 2011
*/
/*\
|*| Loading question 1...
|*|
|*| The 3072 characters below contain a sequence of 5 characters which is
|*| repeated. However, there is a twist: one of the sequences has a typo.
@evandrix
evandrix / gist:1066954
Created July 6, 2011 10:09
piggy.jpg
<img src="data:image/gif;base64,
iVBORw0KGgoAAAANSUhEUgAAAJYAAAB+CAIAAABJdH9aAAAAAXNSR0IArs4c6QAAAARnQU1BAACx
jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAABh0RVh0
U29mdHdhcmUAUGFpbnQuTkVUIHYzLjM2qefiJQAASwpJREFUeF7tvQd0XNl1JSp5ZFnBrZY140n+
sv9alr/mL80aS7aX3B5pNHK3OjBngmiAIEAQJAiAIDIKhcpVqFzIOeecMwGCOZNgjs2cYzPHZnh/
33eqLh6rkMludf9xrbMKrx6qXr26+5587rnf3rH/8Lfe9kMQBOklv/3tb7/tb/i360lGABC+ddq+
75CU3vr1/+2C0hH41lsZDgJs217n85bBg5y27j0Ion+B3srX/dtF3jKEBB5wYrDtObB5z4FNu/dv
3OUkHINwHsSx/Oox4JMMt0r0/5sp9UZcyMeFg7dx1751O/au2z64dpuTBrYN4uX6HXvxL8KSgAQB
yK+AL+m7cIfOSSbOMxIS/E6+spv5MubuG0GIG6LRwaCA7YATAFuzeXfPpl3dG3d2bdiBZxBe9m3Z
DVCBLoAEm/Lh+5IglPIcvksiGPZt2MkIt4EbdooHF5bfUL58Iwid8lPED/D0b93Ts3Fnx7rtbWu3
@evandrix
evandrix / printf.c
Created July 6, 2011 10:37
Advanced Format String Attacks Presented by Paul Haas (Linux only)
#include <stdio.h>
int main(int argc, char **argv){
printf(argv[1]);
}
# Compile and setup insecure environment
gcc printf.c -w -O0 -ggdb -std=c99 -static -D_FORTIFY_SOURCE=0 -fno-pie -Wno-format -Wno-format-security -fno-stack-protector -z norelro -z execstack -o printf
sudo sysctl -w kernel.randomize_va_space=0
@evandrix
evandrix / html_character_set.txt
Created July 6, 2011 11:42
HTML Character Set (Character Code) Table
09 &#09; Horizontal tab
10 &#10; Line feed
13 &#13; Carriage Return
32 &#32; Space
33 ! &#33; Exclamation mark
34 " &#34; &quot; quotation mark = APL quote
35 # &#35; Number sign
36 $ &#36; Dollar sign
37 % &#37; Percent sign
38 & &#38; &amp; ampersand