I hereby claim:
- I am dsabanin on github.
- I am dsabanin (https://keybase.io/dsabanin) on keybase.
- I have a public key ASCR4oyyMHmDzrg6nI3aHvWXodl8NimeCb3qxTnv7qscywo
To claim this, I am signing this object:
class User < ActiveRecord::Base | |
test_context(:inherit => [:account_context]) do | |
@password = "123456" | |
@user = User.create(:login => "dima", | |
:first_name => "Dima", | |
:last_name => "Pupkin", | |
:password => @password, | |
:password_confirmation => @password, | |
:account => @account) |
def benchmark(name, &blk) | |
t1 = Time.now | |
ret = blk.call | |
time = Time.now - t1 | |
$STATSD.timing(name, time) | |
[ret, time] | |
end | |
retvalue, time = benchmark("svn-commit-time") do | |
`svn command blah` |
(use 'ring.adapter.simpleweb) | |
;; Define a basic ring handler | |
(defn handler [req] | |
{:status 200 | |
:headers {"Content-Type" "text/html"} | |
:body "Hello world from SimpleWeb"}) | |
;; Start the server on the specified port, returning a connection | |
(def connection (run-simpleweb handler {:port 8080})) |
strace -qfFxv -s 1024 -p PROCESS-PID |
(def first (fn [first] | |
(fn [second] first))) | |
(def second (fn [first] | |
(fn [second] second))) | |
(def make-pair (fn [first] (fn [second] (fn [func] ((func first) second))))) | |
(def TRUE first) | |
(def FALSE second) |
def diffs(repo, from, to) | |
repo.call_git("diff ?..?", from, to).stdout. | |
strip. | |
split(/diff --git.*?$/). | |
map(&:strip). | |
uniq. | |
map { |d| d.blank? ? nil : d }. | |
compact. | |
map { |d| [diff_head(d), d] } | |
end |
(defmacro raise-on-match | |
[matches & body] | |
(loop [matches (->> matches (partition-all 2) (reverse)) | |
res `(do ~@body)] | |
(when matches | |
(recur (rest matches) | |
`(raise-on ~(first matches) ~res))) | |
res)) | |
;; Usage |
I hereby claim:
To claim this, I am signing this object:
/Library/Backblaze.bzpkg/bzdata/bzexcluderules_editable.xml
.bzexclusions
tag:<!-- Exclude node_modules. -->
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />