Skip to content

Instantly share code, notes, and snippets.

View gmoothart's full-sized avatar

Gabe Moothart gmoothart

  • Google
  • Portland, OR
View GitHub Profile
@gmoothart
gmoothart / gist:3744225
Created September 18, 2012 16:46
json-rpc client
"""
A command-line client. Run `twistd -ny jsonrpc_dev.py` first before running this.
"""
# TODO:
# 1) pretty-print json
# 2) take hostname and port as optional parameters
import sys
from twisted.internet import reactor, protocol
@gmoothart
gmoothart / gist:4382020
Created December 26, 2012 18:24
Flask script to demonstrate hbase connectivity and play around with it
from flask import Flask
import happybase
app = Flask(__name__)
app.debug = True
@app.route("/")
def hello():
@gmoothart
gmoothart / gist:6929479
Created October 11, 2013 04:13
lilypond plainsong
\version "2.16.1"
stemOff = { \override Staff.Stem #'transparent = ##t }
\score {
\new Staff \with { \remove "Time_signature_engraver" }
{
\relative c' {
\cadenzaOn
\stemOff
f4 g (a) r1 bes4 a a g a a2 \bar "|"
@gmoothart
gmoothart / gist:6954226
Created October 12, 2013 19:59
plainsong chant
\version "2.16.1"
stemOff = { \override Staff.Stem #'transparent = ##t }
tick = \markup {
\raise #2 \fontsize #-5 \musicglyph #"scripts.rvarcomma"
}
% definition of the long bar
longbar = {
\override Rest #'font-size = #4
describe('ng-upgrade test', () => {
beforeEach(async(() => {
angular.mock.module(appContextModule.name);
const ng1InjectorProvider = {
provide: '$injector',
useFactory: () => {
return {
'get': (token: string) => {
let dependency: {}|null = null;