Skip to content

Instantly share code, notes, and snippets.

View indrora's full-sized avatar
🖋️
Leaving a mark.

Morgan Gangwere indrora

🖋️
Leaving a mark.
View GitHub Profile
@indrora
indrora / BadgeUtil.zip
Created July 28, 2012 00:50 — forked from Macil/BadgeUtil.zip
DEFCON 20 badge info
@indrora
indrora / quantum.php
Created September 14, 2012 02:51
hard to reverse hash function.
<?php
function quantumhash($content)
{
/*
* This is the Quantum Hash function. Why is it called the Quantum hash function?
* because it can't be turned back without knowing what the original was, or being
* very very good at hashing lots of things at once.
*
* How it works is we have an array of hashing algos that PHP accepts -- this is $hashers.
@indrora
indrora / asdfhash.php
Created September 16, 2012 03:50
ASDFHash: Ascii hashing function
<?php
/*
* @name: asdfhash.php
* @author: morgan ``indrora'' gangwere <indrora@earfolds.com>
*
* @license 2clause BSD
*
* Copyright (c) 2012, morgan ``indrora'' gangwere
* All rights reserved.
*
@indrora
indrora / bench.java
Created September 30, 2012 01:04
String lookup benchmarking in Java
package yellowfox.strings;
/**
*
* @author indrora
*
* This is a simple String Lookup table example.
*
* You could easily use this to generate a lookup table for a switch statement,
* especially if your table is going to never change.
@indrora
indrora / D3N9.cpp
Created November 11, 2012 19:30
D3N9: Demscene tribute on ChipKIT UNO32
/*
D3N9: Old-Skool demoscene scroller for PIC32
*/
/* Kindly ripped from IOShield_OLED_Full_Demo */
#include <IOShieldOled.h>
#define OLED IOShieldOledClass
OLED oled;
@indrora
indrora / perpetudl.sh
Created January 25, 2013 17:35
downloader using fifo in bash
#!/bin/bash
FIFOPATH="/tmp/perpetudl"
DLPATH="/home/indrora/downloads/"
function pd_help
{
echo "USAGE: $0 [OPTIONS]"
echo "Options:"
echo " -a start a download"
@indrora
indrora / disk_stats.sh
Created January 26, 2013 05:53
Disk stats script
#!/bin/bash
DISKS=('sda' 'sda2')
OUT_DIR=/srv/http/
RRD_DIR=/srv/shared/
NOW=$(date +%s)
for disk_name in ${DISKS[@]}; do
// Lower end of ASCII printable (space)
#define ASCII_PRINT_LOWER = 0x20
// replace.
char[] want_kind = "$GPXXX";
int want_idx = 0;
void loop()
{
/* stuff to keep strobing happy */
@indrora
indrora / bad.lua
Last active August 29, 2015 13:56
Test socks please ignore
foo = nil
foo()
function digGravel()
while turtle.detect() do
turtle.dig()
end
end
function strafeLeft()
turtle.turnLeft()
turtle.forward()