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
| map <esc>l :bn<cr> | |
| map <esc>h :bp<cr> |
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
| #!/bin/sh | |
| curl "http://<myhost>:8080/git/notifyCommit?url=<path-to-repo>" |
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
| (defmacro defprop [multiname func kvs] | |
| (eval | |
| `(do | |
| (defmulti ~multiname ~func) | |
| ~@(for [[k v] (seq kvs)] | |
| `(defmethod ~multiname ~k [m#] ~v))))) |
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
| function! s:repl.includes_file(file) dict abort | |
| let is_zipfile = matchstr(a:file, '\C^zipfile:.*::') | |
| let is_fugitive = matchstr(a:file, '\C^fugitive:\/\/.*') | |
| if !empty(is_zipfile) | |
| let file = substitute(a:file, '\C^zipfile:\(.*\)::', '\1/', '') | |
| elseif !empty(is_fugitive) | |
| let file = substitute(a:file, '\C^fugitive:\/\/\(.*\)', '\1', '') | |
| let file = substitute(file, '\/\.git\/\/[^\/]\+', '', '') | |
| else | |
| let file = a: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
| (ns clj-async-tests.core | |
| (:require [clojure.core.async :as async | |
| :refer [go chan >! <! >!! <!! timeout close! thread alts! alts!!]])) | |
| (defn walk [t] | |
| (cond (nil? t) | |
| nil | |
| :else | |
| (let [[l v r] t] | |
| (concat (walk l) [v] (walk r))))) |
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
| (require 'package) | |
| (setq package-archives | |
| '(("marmalade" . "http://marmalade-repo.org/packages/"))) | |
| (package-initialize) | |
| (mapc | |
| (lambda (package) | |
| (or (package-installed-p package) | |
| (if (y-or-n-p (format "Package %s is missing. Install it? " package)) | |
| (package-install package)))) |
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 rhizome-fun.core | |
| ; [rhizome "0.2.0"] | |
| (:require [rhizome.viz :refer [view-graph save-graph]])) | |
| (def alpha-nodes (mapv (comp keyword str) | |
| "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")) | |
| (defn random-from [nodes] | |
| (let [n (rand-int (count nodes)) | |
| pick (nodes n) |
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
| import Tkinter | |
| import Image, ImageTk | |
| im = Image.open('pic.bmp') | |
| root = Tkinter.Tk() | |
| dither8 = [[ 0, 32, 8, 40, 2, 34, 10, 42], | |
| [48, 16, 56, 24, 50, 18, 58, 26], | |
| [12, 44, 4, 36, 14, 46, 6, 38], | |
| [60, 28, 52, 20, 62, 30, 54, 22], | |
| [ 3, 35, 11, 43, 1, 33, 9, 41], |
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
| file looks like this: | |
| ; ras/test.tim | |
| (ns ras.test) | |
| ; here's the error: | |
| ; Error detected while processing function timl#loader#source..timl#compiler#build..<SNR>95_emit..timl#call..150..timl#type#apply..timl#lazy_seq#seq..<SNR>97_val..timl#call..289..<SNR>72_predicate | |
| ..timl#coll#chunked_seqp: |
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 fact [n] | |
| (cond (zero? n) 1 | |
| :else (* n (fact (dec n)) ))) | |
| (defn fact-tail [n] | |
| (loop [n n acc 1] | |
| (cond (zero? n) acc | |
| :else (recur (dec n) (* acc n))))) |
OlderNewer