This file contains hidden or 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
| ;; Datomic example code | |
| (use '[datomic.api :only (db q) :as d]) | |
| ;; ?answer binds a scalar | |
| (q '[:find ?answer :in ?answer] | |
| 42) | |
| ;; of course you can bind more than one of anything | |
| (q '[:find ?last ?first :in ?last ?first] | |
| "Doe" "John") |
This file contains hidden or 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
| # Download diffmerge from http://www.sourcegear.com/diffmerge/ | |
| git config --global merge.tool diffmerge | |
| git config --global mergetool.diffmerge.cmd "diffmerge --merge --result=\$MERGED \$LOCAL \$BASE \$REMOTE" | |
| git config --global mergetool.diffmerge.trustExitCode true | |
| git config --global mergetool.keepBackup false | |
| git config --global diff.tool diffmerge | |
| git config --global difftool.diffmerge.cmd "diffmerge \$LOCAL \$REMOTE" |
This file contains hidden or 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
| (ns myreader.core | |
| "Reader Literals Test" | |
| (:require [clojure.string :as str])) | |
| (defn debug-print | |
| "Gauche debug print" | |
| [x] | |
| `(let [res# ~x] | |
| (println "?=" res#) | |
| res#)) |
This file contains hidden or 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
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
This file contains hidden or 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
| # http://gitready.com/intermediate/2009/02/06/helpful-command-aliases.html | |
| git config --global alias.rb rebase | |
| git config --global alias.st status | |
| git config --global alias.ci commit | |
| git config --global alias.br branch | |
| git config --global alias.co checkout | |
| git config --global alias.df df | |
| git config --global alias.lg log -p | |
This file contains hidden or 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
| ;; lein settings | |
| (defproject foo "1.0.0-SNAPSHOT" | |
| :description "Test App" | |
| :dependencies [[com.datomic/datomic "0.1.2678"] | |
| [frinj "0.1.2" :exclusions [org.clojure/clojure]]]) | |
| ;; load libs | |
| (use 'frinj.core 'frinj.calc) | |
| (frinj-init!) | |
| (use '[datomic.api :only (q db) :as d]) |
This file contains hidden or 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
| // set any object | |
| [[NSUserDefaults standardUserDefaults] setObject:@"this is some string" forKey:@"test"]; | |
| [[NSUserDefaults standardUserDefaults] synchronize]; | |
| // retrieve object | |
| [[NSUserDefaults standardUserDefaults] objectForKey:@"test"]; |
This file contains hidden or 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
| (ns alephtest.core | |
| (:require [lamina.core :as l]) | |
| (:require [aleph.http :as a]) | |
| (:require [ring.adapter.jetty :as jetty])) | |
| ;; https://github.com/ztellman/aleph | |
| (def counter (atom 0)) | |
| (defn say-hello [] | |
| (let [n (swap! counter inc)] |
This file contains hidden or 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
| (defun clojure-reset-namespace () | |
| "Reloads the current Clojure namespace by first removing it and | |
| then re-evaluating the slime buffer. Use this to remove old | |
| symbol definitions and reset the namespace to contain only what | |
| is defined in your current Emacs buffer." | |
| (interactive) | |
| (save-buffer) | |
| (slime-interactive-eval (concat "(remove-ns '" (slime-current-package) ")")) | |
| (slime-compile-and-load-file)) |
This file contains hidden or 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
| # In case you had some strange python installation | |
| # NOTE: .pydistutils.cfg seems to be not compatible with brew install python | |
| # areas I needed to clean before installation | |
| # clean up ~/Library/Python | |
| # clean up .local | |
| # preconditions: | |
| # xcode with command line tools installed | |
| xcode-select --install |