Skip to content

Instantly share code, notes, and snippets.

🔐
...

Aaron Zauner azet

🔐
...
Block or report user

Report or block azet

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
@azet
azet / fuddan.php
Created Jan 30, 2012 — forked from besn/fuddan.php
zufalls essen würfel dings
View fuddan.php
<?php
/*
* ----------------------------------------------------------------------------
* "THE BEER/COFFEE-WARE LICENSE" (Revision 42):
* <besn@besn.at> 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 Jan 30, 2012
open-uri https redirect fix in ruby
View open-uri redirectable
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: azet@azet.org
Message-ID: <CAN8NK9HxUcLK2CK8zeWniUYkejcWraORxy-D+jc1kZtYZWbsnA@mail.gmail.com>
Subject: bugfix in open-uri redirects (ruby)
From: Aaron Zauner <azet@azet.org>
To: Tanaka Akira <akr@m17n.org>
Content-Type: text/plain; charset=ISO-8859-1
@azet
azet / gist:1941562
Created Feb 29, 2012
[bench] create 20 procs & files and write /dev/urandom to them for 4 mins, print out total size
View gist:1941562
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 Mar 8, 2012
we have an array of 3 entries for e.g. restaurants, execute this a couple of times until it matches something, decision made.
View food_decisions.zsh
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 Mar 28, 2019
get time offset from popular stratum 0-3 time servers (stratum 1 distribution is the biggest)
View synchronize.sh
#!/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 Jul 3, 2012
asterisk call-in voice clock configuration (+/- 50ms to UTC, use ntpd(1))
View extensions.conf.part
[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 Sep 26, 2012
cracking a IRIX 6.5.5 root password
View lol.txt
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 Dec 10, 2015
pull all project subdirectories in e.g. ~/github/
View masspull.sh
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 Dec 11, 2015
apache benchmark against gatling
View gist:4548834
$ 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
View gist:4604450
## 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: ('', ('', '', ''), '')
You can’t perform that action at this time.