Skip to content

Instantly share code, notes, and snippets.

Rick Graham raddrick

Block or report user

Report or block raddrick

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
raddrick / Erc20.sol
Created Aug 14, 2018
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
View Erc20.sol
pragma solidity ^0.4.2;
contract Erc20 {
uint public _totalSupply;
function balanceOf(address who) public constant returns (uint);
function allowance(address owner, address spender) public constant returns (uint);
function transfer(address to, uint value) public returns (bool ok);
function transferFrom(address from, address to, uint value) public returns (bool ok);
function approve(address spender, uint value) public returns (bool ok);
View gist:16c965094325aa274a74
the following brands as having met their standards for being true extra virgin olive oil.
Corto Olive
California Olive Ranch
Kirkland Organic
Lucero (Ascolano)
McEvoy Ranch Organic
- See more at:
View gist:f995e41f0df3c794b237
“Children are wonderfully confident in their own imaginations. Most of us lose this confidence as we grow up.”
Sir Ken Robinson
"The glory of creation is in its infinite diversity."
"And in the way our differences combine to create meaning and beauty."
-- Dr. Miranda Jones and Spock, "Is There in Truth No Beauty?",
stardate 5630.8
“I am strong because I've been weak. I am fearless because I've been afraid. I am wise because I've been foolish.”
View test_mail_purge.rb
require 'minitest/mock'
require 'minitest/unit'
require 'date'
class TestMailPurge < MiniTest::Unit::TestCase
class MailPurge
def initialize(imap)
@imap = imap
raddrick / item.json
Created Mar 11, 2014
I use this to implement svg templating
View item.json
id: item[0],
date: item[1],
message: item[2],
commiter: item[3],
branch: item[4],
x: 0,
y: 0,
height: 0,
width: 0
raddrick / gist:5556376
Created May 10, 2013
rvhs form results
View gist:5556376
"data": {
"general_patient_type": "No",
"general_wsib": "No",
"general_language": "E",
"general_first_name": "Rick",
"general_middle_name": "Roland",
"general_last_name": "Graham",
"general_sex": "M",
"general_dob_day": "3",
View gist:4558916
$('html').find('body').bind('mouseover', function() {
//$('html').find('body').bind('load', function() { // this binding didn't work
var age = Age();
if (age != 0 && !age)
age = '';
View gist:4558245
field_type :address_type_check do
field :self do
type :text_field, :size => 25, :maxlength => 25
validates :logic => lambda{|field|
errors.add(field_name, "Must have street names and numbers, and no groups of 3 consecutive letters. ") unless ((get_value.length>1) && (get_value.split(" ").count>1) && (get_value.split(/(\D)\1\1/).join == get_value) )
# (get_value.length>1)
# && (get_value.split(" ").count>2)
# && (get_value.split(/(.)\1\1/).join != get_value)
View gist:4557351
field_type :optional_name_check do
field :self do
type :text_field, :minlength=>0
validates :logic=>lambda{ |field|
if (get_value.length==1) || ((get_value.split(/(.)\1\1/).join != get_value) || (get_value.split(/[@#\$%&*_;:"+=.,<>?\\\}\{\^\(\)\]\[]/).join != get_value )) && (get_value.length >1)
errors.add(field_name, "Only alphabetic, not 3 consecutive identical, longer than 1 character.")
} , :allow_blank=>true
You can’t perform that action at this time.