Skip to content

Instantly share code, notes, and snippets.

View rchasman's full-sized avatar
🇦🇺
Living in Australia

Roey D. Chasman rchasman

🇦🇺
Living in Australia
View GitHub Profile
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
uint voteCount;
@rchasman
rchasman / -
Created February 26, 2015 04:58
https://gist.github.com/bed43604853212f4312f.git
### Keybase proof
I hereby claim:
* I am rchasman on github.
* I am rchasman (https://keybase.io/rchasman) on keybase.
* I have a public key whose fingerprint is 2078 89DE 9DA0 2AE7 E9EA EA1E EB02 9973 187D B456
To claim this, I am signing this object:
@rchasman
rchasman / -
Created April 29, 2014 00:14
Deserialize/Serialize a Binary Tree structure from/into a String.
/** SIG FIG INTERVIEW **/
var node = function(value, left, right) {
this.value = value;
this.left = left;
this.right = right;
};
/**
n - current node
@rchasman
rchasman / qatest.py
Created April 15, 2014 00:48
Code to pass the RainforestQA application challenge.
import requests
import urlparse
def getid(id):
url = "http://letsrevolutionizetesting.com/challenge.json?"
r = requests.get(url + id)
return urlparse.urlsplit(r.json()['follow'])[3]
seed = ""
@rchasman
rchasman / sing.sh
Created April 9, 2014 06:55
This script helps you to learn song lyrics!
#!/bin/bash
# requires lolcat
if [ $# -eq 2 ]
then
artist=${1// /%20}
song=${2// /%20}
(curl -s "http://makeitpersonal.co/lyrics?artist=$artist&title=$song" | say -r 200 &);
@rchasman
rchasman / cryptsyids.txt
Last active December 30, 2015 21:19
A list of Market IDs from Cryptsy's API which they for some reason don't provide. Provided the script to generate this list. UPDATED: 12/21/2013 If this was helpful to you please consider donating! BTC: 1roeyDz8nU8k8dLXUsvHiPaF6voR4juej LTC: LRoeyxsxi5XiFGJgBnFnJM3rDhrXTzGH28
{
"ADT/LTC": 94,
"ADT/XPM": 113,
"ALF/BTC": 57,
"AMC/BTC": 43,
"ANC/BTC": 66,
"ANC/LTC": 121,
"ARG/BTC": 48,
"ASC/LTC": 111,
"ASC/XPM": 112,
@rchasman
rchasman / 7850 cgminer kernel optimized
Last active December 29, 2015 18:39
cgminer kernel optimizations for an ATI HD 7850. Optimize arithmetic. Replace variables holding ints with constants. Remove all static length loops. etc.
/*-
* Copyright 2009 Colin Percival, 2011 ArtForz, 2011 pooler, 2012 mtrlt,
* 2012-2013 Con Kolivas.
* 2013 Adam Villena.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
@rchasman
rchasman / guanine.json
Created June 13, 2013 23:20
Guanine nitrogenous base JSON representation. Made for a d3.js force directed graph.
{
"nodes": [
{"atom": "H", "size": 1},
{"atom": "C", "size": 12},
{"atom": "N", "size": 14},
{"atom": "H", "size": 1},
{"atom": "N", "size": 14},
{"atom": "C", "size": 12},
{"atom": "C", "size": 12},
{"atom": "N", "size": 14},
@rchasman
rchasman / adenine.json
Created June 13, 2013 23:19
Adenine nitrogenous base JSON representation. Made for a d3.js force directed graph.
{
"nodes": [
{"atom": "H", "size": 1},
{"atom": "C", "size": 12},
{"atom": "N", "size": 14},
{"atom": "H", "size": 1},
{"atom": "N", "size": 14},
{"atom": "C", "size": 12},
{"atom": "C", "size": 12},
{"atom": "N", "size": 14},