Skip to content

Instantly share code, notes, and snippets.

Greyson greyson

  • Spent
  • Ohio
Block or report user

Report or block greyson

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
View gist:cb5bb38ac7429766c6175714e52e6522
# Scenario 1: Customer is not found
> curl -u {PLATFORM_KEY}: https://api.stripe.com/v1/charges \
-H "Stripe-Account: acct_<serviceprovider>"
-d amount=10000
-d currency=usd
-d customer=cus_<customer>
-d source=src_<cardoncustomer>
-d application_fee=75
{
View mysql expression failing
mysql_install_db: [ERROR] unknown variable 'pid-file=/run/mysqld/mysqld.pid'
configuration.nix:
services.mysql = {
enable = true;
package = pkgs.mysql57;
initialDatabases = [
{ name = "akron"; schema = ./akron.sql; }
];
View SteamVR System Report
This file has been truncated, but you can view the full file.
SteamVR System Report created Thu Feb 23 05:45:43 2017
<Report>
SteamVR Version: 1487744123
SteamVR Date: 2017-02-22
Steam: Public
Steam Branch: beta
Steam AppID: 250820
Tracking: lighthouse
@greyson
greyson / gist:19aad812a13e6f30ba6249da303f0107
Last active Dec 1, 2016
config.nix - haskell override
View gist:19aad812a13e6f30ba6249da303f0107
{
haskell = super.haskell // {
packages = super.haskell.packages // {
lts = super.haskell.packages.lts.override {
overrides = self: super: {
heist = super.heist.overrideDerivation (old: {
doCheck = false;
testToolDepends = [ super.pandoc ];
});
};
@greyson
greyson / dvorak-ctrl.nix
Created Sep 29, 2015
Dvorak with control for capslock.
View dvorak-ctrl.nix
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "dvorak-control";
src = ./blanksource;
buildInputs = [ kbd ];
installPhase = ''
mkdir -p "$out"
zcat "${kbd}/share/keymaps/i386/dvorak/dvorak.map.gz" | \
@greyson
greyson / Sodium.FRP.State.hs
Created Jul 10, 2015
Event streams of stateful operations with shared accumulated state.
View Sodium.FRP.State.hs
{-# LANGUAGE RecursiveDo #-}
module FRP.Sodium.State
( runAccum
, snapshotState
) where
import Control.Monad.State
import FRP.Sodium
type AccumE s = State (Behaviour s, Event s)
@greyson
greyson / netwatch
Created Feb 2, 2014
Simple, powerful connection monitor
View netwatch
#!/usr/bin/python
DEFAULT_SOUNDFILE="/home/greyson/alerts/S_083772.mp3"
DEFAULT_HOST="209.18.47.61"
import os
import subprocess
import sys
import time
import re
View bad_redirect_on_create.erl
-module( bad_redirect_on_create ).
-export([ init/1,
allowed_methods/2,
content_types_accepted/2,
content_types_provided/2,
create_path/2,
post_is_create/2,
from_json/2,
@greyson
greyson / permute_list.erl
Created Apr 10, 2012 — forked from baali/permute_list.erl
Permutation of List in Erlang
View permute_list.erl
-module( permute_list ).
-export([ permute/1 ]).
permute( List ) ->
jumble( List, [] ).
jumble( [], Permuted_List ) ->
Permuted_List;
jumble( List, Permuted_List ) ->
Index = random:uniform( length(List) ) -1,
@greyson
greyson / gist:1035217
Created Jun 20, 2011
What I really want.
View gist:1035217
private static abstract class MyClosure implements Runnable {
MyClosure( int x ) {
this.x = x;
}
int x;
}
/* later... somewhere in a method */
int x = 42;
handler.post( new MyClosure( x ) {
You can’t perform that action at this time.