0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install', 'gaze', '-g' ]
2 info using [email protected]
3 info using [email protected]
4 verbose node symlink /usr/local/bin/node
5 silly cache add args [ 'gaze', null ]
6 verbose cache add spec gaze
7 silly cache add parsed spec { raw: 'gaze',
7 silly cache add scope: null,
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
brew unlink libyaml | |
brew link libyaml |
Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev
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
# prepare | |
psql -U postgres -d osm -f /path-to-psql/share/contrib/postgis-2.1/postgis.sql | |
psql -U postgres -d osm -f /path-to/osmosis/script/pgsnapshot_schema_0.6.sql | |
# import to pgsql | |
osmosis --read-pbf file=./xxx-latest.osm.pbf --wp host=localhost database=osm user=postgres |
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
(defprotocol IPify | |
(as-ip-array [this] "Take a string convert to InetAddress[]") | |
(as-ip [this] "Take a string convert to InetAddress[] only returh first item")) | |
(extend-type String | |
IPify | |
(as-ip-array [this] | |
(InetAddress/getAllByName this)) | |
(as-ip [this] | |
(first (as-ip-array this)))) |
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
(defprotocol IAttr | |
(-get [this]) | |
(-set! [this v]) | |
(deftype MutT [:volatile-mutable x] | |
IAttr | |
(-get [this] x) | |
(-set! [this v] (set! x v))) |
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
(comment ; Fun with transducers, v2 | |
;; Still haven't found a brief + approachable overview of Clojure 1.7's new | |
;; transducers in the particular way I would have preferred myself - so here goes: | |
;;;; Definitions | |
;; Looking at the `reduce` docstring, we can define a 'reducing-fn' as: | |
(fn reducing-fn ([]) ([accumulation next-input])) -> new-accumulation | |
;; (The `[]` arity is actually optional; it's only used when calling | |
;; `reduce` w/o an init-accumulator). |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev
chmod -R a+rwx <file|dir> # a: all user