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
[alias] | |
db = !git cherry-pick -n debug-only && git status | |
udb = !git revert -n debug-only && git status |
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://blog.jayfields.com/2012/05/agile-development-with-clojure.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+jayfields%2FmjKQ+%28Jay+Fields%27+Thoughts%29 | |
(defonce ignored-namespaces (atom #{})) | |
(defn reload-all [] | |
(doseq [n (remove (comp @ignored-namespaces ns-name) (all-ns))] | |
(require (ns-name n) :reload ))) |
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
CGPoint hitPoint = [sender convertPoint:CGPointZero toView:self.tableView]; | |
NSIndexPath *hitIndex = [self.tableView indexPathForRowAtPoint:hitPoint]; |
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
;; f需要被调用很多次,假设g的运算非常耗时,而在循环中a的值是不变的,b每次不一样,是否有自动的方法把f转化成curry形式,从而提高性能? | |
(defn f [a b] | |
(let [gb (g b) | |
ga (g a) | |
gga (g ga)] | |
(+ gga gb))) | |
=> | |
(defn f [a] |
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
sudo killall coreaudiod |
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
(defn f-> | |
([s] (f-> s ())) | |
([s fs] (if (and (list? s) | |
(= 2 (count s))) | |
(let [[f x] s] | |
(recur x (conj fs f))) | |
(conj (conj fs s) '->)))) | |
(defmacro r-> [sexp] | |
(f-> sexp)) |
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
git svn clone -s -r 40000:HEAD https://svn.parrot.org/parrot |
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
mvn -DaltDeploymentRepository=release-repo::default::file:local-path/releases clean deploy | |
mvn -DaltDeploymentRepository=snapshot-repo::default::file:local-path/snapshots clean deploy |
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
git config --add svn-remote.newbranch.url https://svn/path_to_newbranch/ | |
git config --add svn-remote.newbranch.fetch :refs/remotes/newbranch | |
git svn fetch newbranch [-r<rev>] | |
git checkout -b local-newbranch -t newbranch | |
git svn rebase newbranch |
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
sed 's/call //g' call-mvn.bat | sh |