Skip to content

Instantly share code, notes, and snippets.

View rafd's full-sized avatar
🐃
yak-shaving

Rafal Dittwald rafd

🐃
yak-shaving
View GitHub Profile
@rafd
rafd / om-example.cljs
Last active January 11, 2016 08:27
om-next-routing-example
(defmethod read :episodes/all
[{:keys [state query]} _ _]
(let [episodes (->> (d/q '[:find (pull ?entity ?pattern)
:in $ ?pattern
:where [?entity :episode/name]]
@state
query)
(map first)
vec)]
(if (seq episodes)
@rafd
rafd / bot.js
Created November 14, 2015 21:03
tic tac toe bot
var last = function(arr) {
return arr[arr.length - 1];
}
var coordinate1 = function(state) {
return last(state["history"])["move"][1];
}
var firstFromSquare = function(square_arr){
for(var i = 0; i < square_arr.length; i++){

Keybase proof

I hereby claim:

  • I am rafd on github.
  • I am rafd (https://keybase.io/rafd) on keybase.
  • I have a public key whose fingerprint is EBA3 A5E8 1283 8FE9 CAD4 466C 8DE4 A7A0 89D8 002F

To claim this, I am signing this object:

config defaultToCurrentScreen true
config secondsBetweenRepeat 0.1
# Shows app icons and background apps, spreads icons in the same place.
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
config checkDefaultsOnLoad true