Skip to content

Instantly share code, notes, and snippets.

guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.+\.rb$})
watch(%r{^config/initializers/.+\.rb$})
watch('Gemfile')
watch('Gemfile.lock')
watch('spec/spec_helper.rb')
watch('test/test_helper.rb')
end
@simonjefford
simonjefford / gist:1716056
Created February 1, 2012 09:06
Y U NO Lazy?
(defn seq-from-nodelist [nodelist]
(let [nodecount (.getLength nodelist)]
(for [i (range nodecount)]
(do
(println "node")
(.item nodelist i)))))
;; nodelist contains 5 nodes
(def nodes (seq-from-nodelist nodelist))
@simonjefford
simonjefford / gist:2158027
Created March 22, 2012 12:25
Worrying(?) message cloning from Github
% git clone ninject/ninject
Cloning into 'ninject'...
remote: error: object directory ./objects/../../data/repositories/4/nw/4e/8a/19/145356/network.git/objects does not exist; check .git/objects/info/alternates.
@simonjefford
simonjefford / gist:2470141
Created April 23, 2012 10:32
lein deps thread dump
C:\dev\testapp>lein deps
Downloading: org/clojure/clojure/1.4.0/clojure-1.4.0.jar from repository central
at http://repo1.maven.org/maven2
2012-04-23 11:31:33
Full thread dump Java HotSpot(TM) 64-Bit Server VM (22.1-b02 mixed mode):
"pool-1-thread-1" prio=6 tid=0x0000000007e10000 nid=0x21ec runnable [0x000000000
76ee000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
<!-- other html snipped -->
<div class="post-12 page type-page status-publish hentry main_content"><div id="page-12" class="post-12 page type-page status-publish hentry first_section full_page single_page single_page_with_column">
<div class="container_12">
Error: You have exceeded your quota of: 20000 requests per 86400 second(s) for public requests.
@simonjefford
simonjefford / notes
Created June 13, 2012 11:50
Curl request to samosborne.co.uk
<div class="post-12 page type-page status-publish hentry main_content"><div id="page-12" class="post-12 page type-page status-publish hentry first_section full_page single_page single_page_with_column">
<div class="container_12">
* Connection #0 to host www.sam-osborne.co.uk left intact
* Closing connection #0
Error: You have exceeded your quota of: 20000 requests per 86400 second(s) for public requests.
@simonjefford
simonjefford / HelpersHelper.cs
Created June 14, 2012 10:08
Pass HTML to a view rendered by RenderAction
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.WebPages;
namespace renderactiontest.Helpers
{
public static class Helper
(fn [coll n] (mapcat #(repeat n %) coll))
"SCL version 1.7 and SCL version 2.0 are both included in the Windows Azure SDK 1.8,
which can be downloaded from the .NET Developer Center. Both versions of the SCL are
also available through NuGet. The WindowsAzure.Storage Nuget package for SCL version 2.0
has an updated major version number of 2.0."
http://msdn.microsoft.com/en-us/library/windowsazure/jj721952.aspx
@simonjefford
simonjefford / gist:4723091
Last active December 12, 2015 05:38
Handlebars command line options (looks like -n will do the trick)
Options:
-f, --output Output File [string]
-a, --amd Exports amd style (require.js) [boolean]
-c, --commonjs Exports CommonJS style, path to Handlebars module [string] [default: null]
-h, --handlebarPath Path to handlebar.js (only valid for amd-style) [string] [default: ""]
-k, --known Known helpers [string]
-o, --knownOnly Known helpers only [boolean]
-m, --min Minimize output [boolean]
-n, --namespace Template namespace [string] [default: "Handlebars.templates"]
-s, --simple Output template function only. [boolean]