Skip to content

Instantly share code, notes, and snippets.

View matburt's full-sized avatar
😄

Matthew Jones matburt

😄
View GitHub Profile
@matburt
matburt / keybase.md
Created April 3, 2014 18:54
keybase.md

Keybase proof

I hereby claim:

  • I am matburt on github.
  • I am matburt (https://keybase.io/matburt) on keybase.
  • I have a public key whose fingerprint is FC4A 5B73 555B EA53 82AF 1C64 C10C 4C26 B29F EFA4

To claim this, I am signing this object:

def kfactor(r):
return kfactorScale * (122 - 6*(r/100) + math.pow(r/100,2)/15)
@matburt
matburt / simplebot.go
Created August 30, 2014 15:56
A Simple Go bot
package main
import (
"github.com/matburt/vindinium-go-engine"
"fmt"
)
var (
client vindinium.Client
)
#!/usr/bin/python
"""
Criptosistema ACYMOS2 por Agustin, Kriptopolis
Notas:
"~" representa la "enye"
Los comentarios estan sin acentos y caracteres especiales
#include <stdio.h>
#include <stdint.h>
uint8_t* foo(){
static uint8_t out[2] = {1,2};
return out;
}
int main(int argv, char** argc){
uint8_t* bar = foo();
import time
test = []
for i in xrange(2500000):
test.append(dict())
for i in xrange(len(test)):
d = test.pop()
del test
test = [dict() for i in xrange(2500000)]
[test.pop() for i in xrange(len(test))]
@matburt
matburt / gist:742954
Created December 16, 2010 02:46
reverse lookup ip addresses as first field in logfile
for each in `tail -n 100000 logfile | grep pattern | tr -s " " | awk '{print $1}' | sort | uniq`; do dig +short -x $each; done
@matburt
matburt / mpd.sh
Created March 3, 2011 18:36
Colored mpd.sh for xmobar
MPD="$(mpc | head -n 2 | tr '\n' ' ' | sed 's/^\(.*\)\( \[.*\)/\1/')"
MPD_STATE="$(mpc | head -n 2 | tr '\n' ' ' | grep -oG '\[.*\]')"
if [ -z "$MPD" ]; then
echo "<fc=#ff5500>no music</fc>"
else
if [ "$MPD_STATE" = "[paused]" ]; then
echo "<fc=#ff5500>$MPD</fc>"
elif [ -z "$MPD_STATE" ]; then
echo "<fc=#ff5500>no music</fc>"
else
@matburt
matburt / dispcsv.sh
Created June 17, 2011 14:34
Display a CSV file on the command line in an awesome way
cat $1 | column -s, -t | less -#2 -N -S