Skip to content

Instantly share code, notes, and snippets.

View leto's full-sized avatar
🐉
The Blocks Must Flow

Duke Leto leto

🐉
The Blocks Must Flow
View GitHub Profile
@michaelgwelch
michaelgwelch / link_story2.user.js
Created March 24, 2012 16:13
A greasemonkey script that creates a link from commit to story on pivotal tracker
@leto
leto / gist:1795079
Created February 11, 2012 01:43
CASH Music High-Level Volunteer Document

A free and open toolbox for artist empowerment.

Licenses and Freedom

Affero GNU Public License (AGPL) with a few bundled dependencies which are MIT/BSD. This is mostly free software, with a sprinking of open source. Enjoy it's freedom-creating powers.

@boucher
boucher / gist:1750375
Created February 6, 2012 07:09 — forked from siddarth/gist:1379745
Stripe PHP simple example
<?php
require 'path-to-Stripe.php';
if ($_POST) {
Stripe::setApiKey("YOUR-API-KEY");
$error = '';
$success = '';
try {
if (!isset($_POST['stripeToken']))
throw new Exception("The Stripe Token was not generated correctly");
@boucher
boucher / gist:1750368
Created February 6, 2012 07:07 — forked from saikat/gist:1084146
Stripe sample checkout form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Sample Form</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<script type="text/javascript">
@cdleary
cdleary / gdb_watch_segment.c
Created July 29, 2011 21:55
Watch a whole memory segment in GDB.
static int values[1024] = {
0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
@an0maly
an0maly / gist:1081878
Created July 14, 2011 03:14
panda doesn't build with rakudo
bkurle@lapple-too ~/src/panda $ sh bootstrap.sh
--2011-07-13 19:53:33-- http://feather.perl6.nl:3000/list
Resolving feather.perl6.nl... 2a02:2308:10::f:1, 193.200.132.135
Connecting to feather.perl6.nl|2a02:2308:10::f:1|:3000... failed: No route to host.
Connecting to feather.perl6.nl|193.200.132.135|:3000... connected.
HTTP request sent, awaiting response... 302 Found
Location: projects.json [following]
--2011-07-13 19:53:34-- http://feather.perl6.nl:3000/projects.json
Connecting to feather.perl6.nl|193.200.132.135|:3000... connected.
HTTP request sent, awaiting response... 200 OK
@jessevondoom
jessevondoom / gist:1017117
Created June 9, 2011 16:31
Quickly grabs a list of all files from a repo, queues them in an array, then mirrors the repo locally via PHP copy
$repo = json_decode(file_get_contents('https://github.com/api/v2/json/blob/all/cashmusic/DIY/master'));
$files = array_keys((array)$repo->blobs);
foreach ($files as $file) {
$path = pathinfo($file);
if (!is_dir('./source/'.$path['dirname'])) mkdir('./source/'.$path['dirname'],0777,true);
copy('https://raw.github.com/cashmusic/DIY/master/'.$file,'./source/'.$file);
}
@cotto
cotto / goto_value.m0
Created June 9, 2011 15:59
m0 gotos as values
.version 0
.chunk "hello"
.constants
0 "at start"
1 "at end: goto worked!"
2 "at end: goto failed :("
.metadata
.bytecode
set_imm I0, 0, 0
set_imm S0, 0, 0
@schacon
schacon / gist:942899
Created April 26, 2011 19:19
delete all remote branches that have already been merged into master
$ git branch -r --merged |
grep origin |
grep -v '>' |
grep -v master |
xargs -L1 |
awk '{split($0,a,"/"); print a[2]}' |
xargs git push origin --delete
cxgn=# select now()-query_start, current_query from pg_stat_activity where usename = 'web_usr' and current_query not like '<IDLE>%';
?column? | current_query
-----------------+---------------------------------------------------------------------------------------------
00:00:31.513223 | select distinct stock_id FROM public.stockprop
: JOIN public.stock USING (stock_id)
: JOIN public.cvterm ON cvterm.cvterm_id = stockprop.type_id
: JOIN phenome.allele on allele.allele_id = (cast(stockprop.value as numeric ) )
: WHERE cvterm.name = $1 AND locus_id = $2 AND allele.obsolete = $3
00:00:39.178288 | select distinct stock_id FROM public.stockprop
: JOIN public.stock USING (stock_id)