Skip to content

Instantly share code, notes, and snippets.

@mherkender
mherkender / gist:3026632
Created July 1, 2012 03:03
Better ansible output
max@darmani% ansible-playbook -k -i ansible.hosts nabooru.ansible.yml
SSH password:
setup phase
[192.168.1.133] done
install nginx
[192.168.1.133] apt pkg=nginx state=installed
configure nginx
@mherkender
mherkender / gist:3026572
Created July 1, 2012 02:43
Why ansible sucks
max@darmani% ansible-playbook -k -i ansible.hosts nabooru.ansible.yml
SSH password:
PLAY [nabooru] ****************************
SETUP PHASE ****************************
ok: [192.168.1.133]
@mherkender
mherkender / sha1-round1.as
Created March 15, 2012 06:52
AS3 SHA-1 round one
package {
public function sha1(input:String):String {
var originalLength:uint = input.length;
var i:uint;
// sha-1 requires a single bit be appended to the input
input += "\x80";
// sha-1 adds a 64-bit integer that has the size
// BUT enough zeros need to be added so that they'll be at the end of a chunk
@mherkender
mherkender / sha1-pseudocode.txt
Created March 15, 2012 03:33
SHA-1 pseudocode
add some extra data to the end of the input
set the initial sha-1 values
for each 64-byte chunk do
extend the chunk to 320 bytes of data
perform first set of operations on chunk[i] (x20)
perform second set of operations on chunk[i] (x20)
perform third set of operations on chunk[i] (x20)
perform fourth set of operations on chunk[i] (x20)