-
this is all dependent on the "magic" option being set to the default,
magic
(:set magic?
will tell you what you're set on) -
vim regexes are beyond reason
-
(defn
finds a literal paren, and\(defn\)
creates a group. -
|
finds a literal pipe and,\|
separates alternatives
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
Updating the search index. This may take a few minutes... | |
Searching over Artifact ID... | |
== Showing page 1 / 1 | |
[heroku/lein-template "0.1.0"] Template for new ring-based Leiningen projects for Heroku. | |
[cljs-template/lein-template "0.1.5"] A lein-newnew template for clojurescript projects | |
[noir/lein-template "1.3.0"] A lein-newnew template for generating new noir projects. | |
[lein-gnome/lein-template "0.1.0-SNAPSHOT"] A template for new Gnome Shell extensions. | |
[pallet/lein-template "0.2.0"] Leiningen plugin for creating Pallet projects | |
[pallet/lein-template "0.2.1"] Leiningen plugin for creating Pallet projects | |
[cljs-template-one/lein-template "0.1.5"] A lein-newnew template for clojurescript projects |
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
(require '[delimc.core :as d]) | |
(defmacro amb [xs] | |
`(d/shift k# (doseq [x# ~xs] | |
(k# x#)))) | |
(d/reset | |
(let [a (amb [1 2 3]) | |
b (amb ["a" "b" "c"])] | |
(println a b))) |
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
> parseInt('000039') | |
3 | |
> parseInt('000039', 10) | |
39 |
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
$ ./hello_world | |
Hello World! | |
$ ./hello_world > output && cat output | |
Hello World! | |
$ ./hello_world >> output && cat output | |
Hello World! | |
Hello World! | |
$ ./hello_world >> output && cat output | |
Hello World! | |
Hello World! |
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
(require '[backtick :refer [template syntax-quote]]) | |
;=> nil | |
(let [x 2] (template (foo ~x))) | |
;=> (foo 2) | |
(let [x 2] (syntax-quote (foo ~x))) | |
;=> (user/foo 2) |
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
√ Zephyros (window manager) needs universal access: | |
http://www.tekrevue.com/2013/06/25/how-to-enable-access-for-assistive-devices-in-os-x-mavericks/ | |
√ gcc can’t find stdio.h (& similar) - /usr/include got blown away | |
xcode-select --install | |
see https://github.com/mxcl/homebrew/issues/20427 | |
√ java install got blown away & replaced with a stub that says to download java | |
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html |
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
# General comment: I assume here that I'm just doing it wrong as I haven't been using Arel that long. | |
# If I knew for sure this was broken I'd just file a bug instead. | |
# Note that these specific ActiveRelations are just a trimmed-down example; the actual use case would | |
# really be better with a UNION, I promise. | |
1.9.3-p448 :301 > users = User.where(:email => "one@two.com").union(User.where(:email => "foo@bar.com")) | |
# => #<Arel::Nodes::Union:0x8d1e608 @left=#<Arel::Nodes::SelectStatement:0x8d1eb58 @cores=[#<Arel::Nodes::SelectCore:0x8d1eb44 @source=#<Arel::Nodes::JoinSource:0x8d1eb30 @left=#<Arel::Table:0x9b6d628 @name="users", @engine=User(id: integer, email: string, encrypted_password: string, reset_password_token: string, reset_password_sent_at: datetime, remember_created_at: datetime, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: string, last_sign_in_ip: string, created_at: datetime, updated_at: datetime, company_id: integer, locale: string, au |
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
git filter-branch -f --prune-empty --index-filter 'git rm -rf --cached --ignore-unmatch vendor' --tag-name-filter cat -- --all | |
git filter-branch -f --prune-empty --index-filter 'git rm -rf --cached --ignore-unmatch vendor' --tag-name-filter cat -- --all | |
git -c gc.reflogExpire=0 -c gc.reflogExpireUnreachable=0 -c gc.rerereresolved=0 \ | |
-c gc.rerereunresolved=0 -c gc.pruneExpire=now gc --aggressive --prune=now |
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
colin:level08-code/ (master✗) $ gem install restclient | |
ERROR: Could not find a valid gem 'restclient' (>= 0) in any repository | |
^CERROR: Interrupted | |
colin:level08-code/ (master✗) $ gem install rest_client | |
ERROR: Could not find a valid gem 'rest_client' (>= 0) in any repository | |
^CERROR: Interrupted | |
colin:level08-code/ (master✗) $ gem install RestClient | |
ERROR: Could not find a valid gem 'RestClient' (>= 0) in any repository | |
^CERROR: Interrupted | |
colin:level08-code/ (master✗) $ gem install rest-client |