Skip to content

Instantly share code, notes, and snippets.

;; Hook used to start a repl from Cursive. See
;; https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL
;; Click Run->Edit configurations.
;; Click the + button at the top left and choose Clojure REPL
;; Enter a name in the Name field (e.g. "REPL")
;; Choose the radio button Use clojure.main in normal JVM process
;; In the Parameters field put script/repl.clj
;; Click the OK button to save your REPL config.
@timgilbert
timgilbert / union-example.clj
Last active December 15, 2015 23:12
union example 1
[ {:type :company :id 42} {:type :manufacturer :id 7} {:type :company :id 23} ]

Keybase proof

I hereby claim:

  • I am timgilbert on github.
  • I am timgilbert (https://keybase.io/timgilbert) on keybase.
  • I have a public key whose fingerprint is 199B 4556 B768 9B5F 297E C964 1873 EF94 6132 FB59

To claim this, I am signing this object:

@timgilbert
timgilbert / gist:acee4ea028c315bf2ef2
Created December 4, 2014 05:29
kioo NPE stack trace
% lein cljsbuild once
Compiling ClojureScript.
Compiling "resources/public/js/app.js" from ("src/cljs" "env/dev/cljs")...
Compiling "resources/public/js/app.js" failed.
clojure.lang.ExceptionInfo: failed compiling file:src/cljs/haunting_refrain/kioo-npe.cljs {:file #<File src/cljs/haunting_refrain/kioo-npe.cljs>}
at clojure.core$ex_info.invoke(core.clj:4403)
at cljs.compiler$compile_file.invoke(compiler.clj:976)
at cljs.compiler$compile_root.invoke(compiler.clj:1006)
at cljs.closure$compile_dir.invoke(closure.clj:343)
at cljs.closure$eval3071$fn__3072.invoke(closure.clj:383)
@timgilbert
timgilbert / kioo-npe.clj
Created December 4, 2014 05:23
kioo NPE on bad filename
(ns kioo-example.core
(:require [reagent.core :as reagent]
[kioo.reagent :as kioo])
(:require-macros [kioo.reagent :refer [defsnippet deftemplate]]))
(deftemplate error "incorrect-filename.html" [])
;; this is the cljsbuild setup from project.clj
@timgilbert
timgilbert / xcom-opensnoop.log
Created August 7, 2014 03:52
XCom opensnoop log
STRTIME UID PID COMM FD ERR PATH
2014 Aug 6 23:49:51 503 4043 XCOM Enemy With 3 0 /Applications/Steam.app/Contents/MacOS/osx32/gameoverlayrenderer.dylib
2014 Aug 6 23:49:51 503 4043 XCOM Enemy With 3 0 /Applications/Steam.app/Contents/MacOS/osx32/steamloader.dylib
2014 Aug 6 23:49:51 503 4043 XCOM Enemy With 3 0 /System/Library/Frameworks/ForceFeedback.framework/Versions/A/ForceFeedback
2014 Aug 6 23:49:51 503 4043 XCOM Enemy With 3 0 /System/Library/Frameworks/ScriptingBridge.framework/Versions/A/ScriptingBridge
2014 Aug 6 23:49:51 503 4043 XCOM Enemy With 3 0 /System/Library/Frameworks/StoreKit.framework/Versions/A/StoreKit
2014 Aug 6 23:49:51 503 4043 XCOM Enemy With 3 0 /System/Library/Frameworks/GameKit.framework/Versions/A/GameKit
2014 Aug 6 23:49:51 503 4043 XCOM Enemy With 3 0 /Users/tim/Library/Application Support/Steam/SteamApps/common/XCom-Enemy-Unknown/XCOM Enemy Unknown.app/Contents/Ma
@timgilbert
timgilbert / gist:dd9fe3be6ee55ffdf9cb
Last active August 29, 2015 14:04
Git diff between Windows and Mac ini files in `XCOMData/XEW/XComGame/Config/`
diff --git b/XCOMData/XEW/XComGame/Config/DefaultEngine.ini a/XCOMData/XEW/XComGame/Config/DefaultEngine.ini
index 445a5c8..8b022ed 100755
--- b/XCOMData/XEW/XComGame/Config/DefaultEngine.ini
+++ a/XCOMData/XEW/XComGame/Config/DefaultEngine.ini
@@ -1404,7 +1404,8 @@ TEXTUREGROUP_WorldSpecular=(MinLODSize=256,MaxLODSize=1024,LODBias=0,MinMagFilte
[Windows.StandardUser]
MyDocumentsSubDirName=XCOM - Enemy Within
-+DirsToCreateAtStartup=Saves
+;FERAL OLL 02-Apr-2014 don't create this unused Saves folder fbug://11850
fixme:system:SetProcessDPIAware stub!
fixme:system:SystemParametersInfoW Unimplemented action: 59 (SPI_SETSTICKYKEYS)
fixme:system:SystemParametersInfoW Unimplemented action: 53 (SPI_SETTOGGLEKEYS)
fixme:system:SystemParametersInfoW Unimplemented action: 51 (SPI_SETFILTERKEYS)
err:winediag:init_driver_info Invalid GPU override 1002:68a1 specified, ignoring.
fixme:win:EnumDisplayDevicesW ((null),0,0x33f16c,0x00000000), stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1aed18, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B8G8R8A8_UNORM, dst_format WINED3DFMT_B8G8R8X8_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1aed18, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B8G8R8X8_UNORM, dst_format WINED3DFMT_B8G8R8X8_UNORM stub!
fixme:d3d:wined3d_check_device_format_conversion wined3d 0x1aed18, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, src_format WINED3DFMT_B10G10R10A2_UNORM, dst_format WINED3DFMT_B8G8R8X8_UNORM
@timgilbert
timgilbert / gist:4810942
Created February 13, 2013 01:26
brew --config
% brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: 0168c75647e4a511599151fa7ae4e3cc4af2e911
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.8.2-x86_64
Xcode: 4.6
CLT: 4.6.0.0.1.1358221012
@timgilbert
timgilbert / gist:4807552
Created February 13, 2013 01:24
Output of "brew install -v subversion" failing with a linker error
Homebrew 0.9.4
==> Downloading http://www.apache.org/dyn/closer.cgi?path=subversion/subversion-1.7.8.tar.bz2
Already downloaded: /Library/Caches/Homebrew/subversion-1.7.8.tar.bz2
/usr/bin/tar xf /Library/Caches/Homebrew/subversion-1.7.8.tar.bz2
==> ./configure --disable-debug --prefix=/usr/local/Cellar/subversion/1.7.8 --with-apr=/usr/local/Library/ENV/4.3 --with-ssl --with-zlib=/usr --with-sqlite=/usr/local/opt/sqlite --with-serf=/usr/local/opt/serf --disable-neon-version-check --disable-mod-activation --without-apache-libexecdir --without-berkeley-db
./configure --disable-debug --prefix=/usr/local/Cellar/subversion/1.7.8 --with-apr=/usr/local/Library/ENV/4.3 --with-ssl --with-zlib=/usr --with-sqlite=/usr/local/opt/sqlite --with-serf=/usr/local/opt/serf --disable-neon-version-check --disable-mod-activation --without-apache-libexecdir --without-berkeley-db
configure: Configuring Subversion 1.7.8
configure: creating config.nice
checking for gcc... cc
checking whether the C compiler works... yes