Skip to content

Instantly share code, notes, and snippets.

View azet's full-sized avatar
🔐
hacking audio devices, diving caves, breaking codes

Aaron Zauner azet

🔐
hacking audio devices, diving caves, breaking codes
View GitHub Profile
@azet
azet / fuddan.php
Created January 30, 2012 10:52 — forked from besn/fuddan.php
zufalls essen würfel dings
<?php
/*
* ----------------------------------------------------------------------------
* "THE BEER/COFFEE-WARE LICENSE" (Revision 42):
* <[email protected]> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer or a coffee in return. Andi Mery
* ----------------------------------------------------------------------------
*/
@azet
azet / open-uri redirectable
Created January 30, 2012 15:19
open-uri https redirect fix in ruby
MIME-Version: 1.0
Received: by 10.52.73.106 with HTTP; Mon, 30 Jan 2012 07:18:51 -0800 (PST)
Date: Mon, 30 Jan 2012 16:18:51 +0100
Delivered-To: [email protected]
Message-ID: <CAN8NK9HxUcLK2CK8zeWniUYkejcWraORxy-D+jc1kZtYZWbsnA@mail.gmail.com>
Subject: bugfix in open-uri redirects (ruby)
From: Aaron Zauner <[email protected]>
To: Tanaka Akira <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1
@azet
azet / gist:1941562
Created February 29, 2012 15:23
[bench] create 20 procs & files and write /dev/urandom to them for 4 mins, print out total size
echo; echo -n 'spawning /dev/urandom write procs.. --> '; for i in `seq 0 19`; do [ -x `cat /dev/urandom > test_file.$i &` ]; echo -n ..$i || echo error spawning $i; done; echo -e '\n\nsleeping 240 seconds'; sleep 240; echo -e '\nkilling procs.\n'; kill -9 `pgrep cat /dev/urandom`; echo -n 'wrote:' && du -h -c test_file* | tail -1
@azet
azet / food_decisions.zsh
Created March 8, 2012 11:04
we have an array of 3 entries for e.g. restaurants, execute this a couple of times until it matches something, decision made.
while :; do for i in `seq 1 3`; do if ( echo -n 'bit match: '; dd if=/dev/urandom count=128 bs=1 >& /dev/null | grep -c '1' ) echo -e "\n\nyour match: $i" && break 2; done; done
@azet
azet / synchronize.sh
Last active March 28, 2019 15:11
get time offset from popular stratum 0-3 time servers (stratum 1 distribution is the biggest)
#!/bin/sh
/usr/sbin/ntpdate -qvvvb -s 10 -p 8 time.nist.gov at.pool.ntp.org pool.ntp.org ts1.aco.net ts2.aco.net asynchronos.iiss.at ntpstm.netbone-digital.com time.ufe.cz time.fu-berlin.de atom.uhr.de ntp1.nl.uu.net ntp0.nl.uu.net ntp3.usv.ro utcnist2.colorado.edu timekeeper.isi.edu clock.sjc.he.net nist1.symmetricom.com t2.timegps.net clock.isc.org clepsydra.dec.com gps.layer42.net rackety.udel.edu mizbeaver.udel.edu clock.nyc.he.net otc1.psu.edu timehost.lysator.liu.se ntp0.as34288.net ntp1.as34288.net tick.usask.ca tock.usask.ca
@azet
azet / extensions.conf.part
Created July 3, 2012 19:37
asterisk call-in voice clock configuration (+/- 50ms to UTC, use ntpd(1))
[clock]
exten => s,1,Wait(1)
exten => s,n(loop),SayUnixtime(,Zulu,YBd)
exten => s,n,SayUnixTime(,Zulu,HM)
exten => s,n,Playback(vm-and)
exten => s,n,Set(FUTURETIME=$[${EPOCH} + 4])
exten => s,n,SayUnixTime(${FUTURETIME},,S)
exten => s,n,Playback(seconds)
exten => s,n,SayPhonetic(z)
exten => s,n,Playback(beep)
@azet
azet / lol.txt
Created September 26, 2012 15:04
cracking a IRIX 6.5.5 root password
time /usr/sbin/john -format:CRYPT sgipasswd.txt
Loaded 1 password hash (generic crypt(3) [?/64])
beach12 (?)
guesses: 1 time: 0:00:00:02 (3) c/s: 210194 trying: bearry! - beacolo
Use the "--show" option to display all of the cracked passwords reliably
real 0m2.200s
user 0m1.588s
sys 0m0.020s
@azet
azet / masspull.sh
Last active December 10, 2015 13:39
pull all project subdirectories in e.g. ~/github/
for dir in `find . -maxdepth 1 -type d | tail -n +2`; do cd $dir ; echo "pulling $dir" ; git pull || ( echo "failed in '$dir' - cd to original dir." && cd - 1>/dev/null ; exit 1 ) ; cd - 1>/dev/null ; done
@azet
azet / gist:4548834
Last active December 11, 2015 04:58
apache benchmark against gatling
$ ab -n 100000 -c 1000 http://10.60.40.248/
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/
Benchmarking 10.60.40.248 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
@azet
azet / gist:4604450
Last active December 11, 2015 12:59 — forked from pforai/gist:4604290
## SLES 11 SP2
Python version: ['2.6.8 (unknown, May 29 2012, 22:30:44) ', '[GCC 4.3.4 [gcc-4_3-branch revision 152973]]']
dist: ('SuSE', '11', 'x86_64')
linux_distrubution: ('SUSE Linux Enterprise Server ', '11', 'x86_64')
system: Linux
machine: x86_64
platform: Linux-3.0.38-0.5-default-x86_64-with-SuSE-11-x86_64
uname: ('Linux', 'service1', '3.0.38-0.5-default', '#1 SMP Fri Aug 3 09:02:17 UTC 2012 (358029e)', 'x86_64', 'x86_64')
version: #1 SMP Fri Aug 3 09:02:17 UTC 2012 (358029e)
mac_ver: ('', ('', '', ''), '')