Skip to content

Instantly share code, notes, and snippets.

View jcf's full-sized avatar
❤️

James Conroy-Finn jcf

❤️
View GitHub Profile
@jcf
jcf / setup.sh
Last active August 29, 2015 14:10
Setup Emacs on Travis CI
#!/bin/sh
export USER='ubuntu'
sudo mkdir /usr/local/evm
sudo chown $USER:$USER /usr/local/evm
export PATH="/home/$USER/.cask/bin:$PATH"
export PATH="/home/$USER/.evm/bin:$PATH"
@jcf
jcf / place-details.http
Created June 3, 2014 09:34
Place search
HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 602
Content-Type: application/vnd.listora.v1+json;profile="https://api.listora.com/schemas/place";charset=UTF-8
Date: Tue, 03 Jun 2014 09:31:38 GMT
Link: <https://api.listora.com/schemas/place>; rel="describedBy"
Server: http-kit
Strict-Transport-Security: max-age=31536000; includeSubdomains
Vary: Accept-Encoding
@jcf
jcf / names.txt
Created May 25, 2014 23:56
Some customers of Fastly's SSL
'*.a.ssl.fastly.net', 'a.ssl.fastly.net', 'fast.wistia.com', 'purge.fastly.net', 'mirrors.fastly.net', '*.imgix.net', 'signin.epek.com', '*.parsecdn.com', '*.fastssl.net', 'voxer.com', 'www.voxer.com', '*.firebase.com', 'sites.yammer.com', 'sites.staging.yammer.com', '*.skimlinks.com', '*.skimresources.com', 'assets.wantful.com', 'cdn.thinglink.me', '*.fitbit.com', '*.hosts.fastly.net', 'control.fastly.net', '*.perfectaudience.com', '*.wikia-inc.com', '*.wikia.com', 'f.cloud.github.com', '*.digitalscirocco.net', '*.etsy.com', '*.etsystatic.com', '*.addthis.com', '*.addthiscdn.com', 'fast.wistia.net', 'raw.github.com', 'www.userfox.com', '*.assets-yammer.com', '*.staging.assets-yammer.com', 'assets.huggies-cdn.net', 'api.kinja.com', 'orbit.shazamid.com', 'about.jstor.org', '*.global.ssl.fastly.net', 'web.voxer.com', 'pypi.python.org', '*.12wbt.com', 'www.holderdeord.no', 'secured.indn.infolinks.com', 'play.vidyard.com', 'play-staging.vidyard.com', 'secure.img.wfrcdn.com', 'secure.img.josscdn.com', '*.gocardles
@jcf
jcf / error.clj
Created March 28, 2014 09:41
Require pallet-ec2 stacktrace
clojure.lang.Compiler$CompilerException: java.lang.UnsupportedOperationException: Unknown Collection type, compiling:(clojure/core/async/impl/protocols.clj:39)
at clojure.lang.Compiler.analyzeSeq (Compiler.java:6462)
clojure.lang.Compiler.analyze (Compiler.java:6262)
clojure.lang.Compiler.eval (Compiler.java:6508)
clojure.lang.Compiler.eval (Compiler.java:6500)
clojure.lang.Compiler.load (Compiler.java:6952)
clojure.lang.RT.loadResourceScript (RT.java:359)
clojure.lang.RT.loadResourceScript (RT.java:350)
clojure.lang.RT.load (RT.java:429)
clojure.lang.RT.load (RT.java:400)
@jcf
jcf / datomic.clj
Created March 17, 2014 13:50
Tagging an EC2 instance in a Pallet crate
(defplan tag
[instance-id]
(let [settings (get-settings :datomic {:instance-id instance-id})]
(node/tag! (target-node) "Datomic Version" (:version settings))))
(require '[datomic.api :as d])
(def uri "datomic:mem://test")
(d/create-database uri)
(def conn (d/connect uri))
(d/transact conn [{:db/id #db/id [:db.part/db]
:db/ident :enum/ns
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/doc "Enum's namespace. Help enforce fk constraints on :db.type/ref enum references"
@jcf
jcf / backtrace.txt
Last active December 28, 2015 06:38
Exception in thread "main" cucumber.runtime.CucumberException: java.lang.ClassCastException: clojure.lang.Symbol cannot be cast to java.lang.CharSequence, compiling:(api_steps.clj:83:42)
at cucumber.runtime.clj$load_script.invoke(clj.clj:42)
at cucumber.runtime.clj$_loadGlue$fn__1876.invoke(clj.clj:54)
at cucumber.runtime.clj$_loadGlue.invoke(clj.clj:53)
at cucumber.runtime.clj.Backend.loadGlue(Unknown Source)
at cucumber.runtime.Runtime.<init>(Runtime.java:74)
at cucumber.runtime.Runtime.<init>(Runtime.java:61)
at leiningen.cucumber.util$create_runtime.invoke(util.clj:24)
at leiningen.cucumber.util$run_cucumber_BANG_.invoke(util.clj:31)
at user$eval1841.invoke(form-init8008296000565969184.clj:1)
@jcf
jcf / trace.txt
Created November 8, 2013 17:25
JRuby 1.7.6 - inspecting some objects (Java::JavaLang::NullPointerException)
(Java::JavaLang::NullPointerException)
org.jruby.RubyObject.inspect(RubyObject.java:534)
org.jruby.RubyHash$5.visit(RubyHash.java:796)
org.jruby.RubyHash.visitAll(RubyHash.java:634)
org.jruby.RubyHash.inspectHash19(RubyHash.java:791)
org.jruby.RubyHash.inspect19(RubyHash.java:828)
org.jruby.RubyHash.to_s19(RubyHash.java:890)
org.jruby.RubyHash$INVOKER$i$0$0$to_s19.call(RubyHash$INVOKER$i$0$0$to_s19.gen)
org.jruby.RubyClass.finvoke(RubyClass.java:623)
org.jruby.runtime.Helpers.invoke(Helpers.java:495)
@jcf
jcf / javascript_tracking.rb
Created August 6, 2013 12:51
Mixpanel hacks
module JavascriptTracking
def log_javascript_tracking
@mixpanel_registry ||= []
page.execute_script <<-JS
window._eindx_cukes = {
originalTrack: mixpanel.track,
mixpanelRegistry: []
};
@jcf
jcf / company_fixtures.clj
Created July 21, 2013 20:15
Download fixtures
(ns leiningen.company-fixtures
(:require [leiningen.core.project :as project]
[me.raynes.fs :as fs]
[me.raynes.fs.compression :as compress]
[clojure.java.io :as io]))
(def ^:const url
"http://example-company.com/url.zip")
(defn- expand-path [path]