This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def empty(%MapSet{}), do: MapSet.new() | |
def empty(obj) when is_map(obj), do: %{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmacro def_identity_matcher(name, map) do | |
quote do | |
def unquote(name)(unquote(map)), do: unquote(map) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
function readFiles(dirname, onFileContent, onError) { | |
fs.readdir(dirname, function(err, filenames) { | |
if (err) { | |
onError(err); | |
return; | |
} | |
filenames.forEach(function(filename) { | |
fs.readFile(dirname + filename, 'utf-8', function(err, content) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.App as Html | |
import Html.Events exposing (onInput, onClick) | |
import String exposing (..) | |
import Random exposing (..) | |
main = | |
Html.program | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# These functions require a CouchDB instance | |
rawurldecode() { | |
# This is perhaps a risky gambit, but since all escape characters must be | |
# encoded, we can replace %NN with \xNN and pass the lot to printf -b, which | |
# will decode hex for us |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jruby $(which gem) install bundler | |
JRuby limited openssl loaded. http://jruby.org/openssl | |
gem install jruby-openssl for full support. | |
System.java:-2:in `arraycopy': java.lang.ArrayIndexOutOfBoundsException | |
from DefaultResolver.java:111:in `makeTime' | |
from DefaultResolver.java:277:in `create' | |
from DefaultResolver.java:317:in `handleScalar' | |
from DefaultResolver.java:435:in `orgHandler' | |
from DefaultResolver.java:455:in `node_import' | |
from org/yecht/ruby/DefaultResolver$s_method_1_0$RUBYINVOKER$node_import.gen:65535:in `call' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):205:0> a | |
{{1 => 5} => 2} | |
irb(main):206:0> a.put ( Hamster.hash (3 => 3) , 3) | |
SyntaxError: (irb):206: syntax error, unexpected tASSOC, expecting ')' | |
a.put ( Hamster.hash (3 => 3) , 3) | |
^ | |
from /usr/bin/irb:12:in `<main>' | |
a.put { Hamster.hash (3 => 3) , 3} | |
SyntaxError: (irb):207: syntax error, unexpected tASSOC, expecting ')' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 620680.98 4828301.47 | cs2cs -v +proj=utm +datum=NAD27 +zone=17 +to +proj=latlong +datum=WGS84 -f "%.6f" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;rules examples | |
[[(findname ?person ?search) [(fulltext $ :person/firstname ?search) [[?person ?name]]]] | |
[(findname ?person ?search) [(fulltext $ :person/lastname ?search) [[?person ?name]]]]] | |
;;attempt at making some rule for searching for geohashs... | |
[[(findgeohash ?place ?search) | |
[(fulltext $ :coordinate/gehoash ?search) | |
[[?place ?name]]]]] | |
(defn pythagorean [a b c] (= (+ (* a a) (* b b)) (* c c))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FacilityDisplayName stats | |
1 Farm Display | |
2 Skateboard Park | |
3 Curling Rink | |
4 Gallery | |
4 Stadium | |
5 Amphitheatre | |
6 Coat Check Room | |
6 Games Room |