Skip to content

Instantly share code, notes, and snippets.

@larskluge
larskluge / README.md
Created August 23, 2015 11:48
Open Github.com with your current project from the command line

Open Github Project Page

Usage

cd ~/some-project
gh

Now your default browser opens with github.com/path/to/some-project.

@larskluge
larskluge / play.coffee
Last active November 11, 2017 04:59
Popcorn Time for the Command Line
#!/usr/bin/env coffee
#
http = require('http')
cheerio = require('cheerio')
spawn = require('child_process').spawn
searchTerm = process.argv[2..-1].join(' ')
@larskluge
larskluge / Spinjar.lsp
Created May 8, 2014 06:23
Spinjar as Ethereum Contract
{
; Initialization
[[0x0]] (caller) ; Admin!
[[0x1]] 0x100 ; How often should the draw happen?
[0x0] "Spinjar" ; Name of our contract
(call 0x929b11b8eeea00966e873a241d4b67f7540d1f38 0 0 0 7 0 0) ; Register with name registration
}
{
(when (= (caller) @@0x0)
@larskluge
larskluge / gist:4119739
Created November 20, 2012 18:10
Mongoid: odd test to show recursion issue
From 76332f87355d9e2385836274f6d5d628435f8b06 Mon Sep 17 00:00:00 2001
From: aekym <[email protected]>
Date: Tue, 20 Nov 2012 13:08:22 -0500
Subject: [PATCH] add odd test to show recursion issue
---
spec/mongoid/relations/embedded/one_spec.rb | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/spec/mongoid/relations/embedded/one_spec.rb b/spec/mongoid/relations/embedded/one_spec.rb
@larskluge
larskluge / gist:3990887
Created November 1, 2012 00:32
Mongoid: order of referenced objects in many-to-many relation not as expected
require 'mongoid'
puts "RUBY_VERSION: #{RUBY_VERSION}"
puts "Mongoid::VERSION: #{Mongoid::VERSION}"
puts
Mongoid.configure do |cfg|
cfg.connect_to 'apples_and_oranges'
end