Skip to content
View split-coll.cljs
(defn split-coll [elem coll]
(loop [coll coll
parts []
part []]
(if-let [e (first coll)]
(if (= e elem)
(recur (rest coll) (conj parts part) [])
(recur (rest coll) parts (conj part e)))
(if (seq part)
(conj parts part)
View clojure.clj
(defmacro events [one two & items] (prn one two) (set items))
(events 1 2 3 4 5 6) ; => #{3 4 5 6}
1 2 ; <- printed
View keybase.md

Keybase proof

I hereby claim:

  • I am sickill on github.
  • I am sickill (https://keybase.io/sickill) on keybase.
  • I have a public key whose fingerprint is 42D4 E8CD 43BD 3BB8 EA3F 1EE0 9AA2 70F0 A59B 4381

To claim this, I am signing this object:

View play.rb
# This plays asciicast (v1 format - https://github.com/asciinema/asciinema/blob/master/doc/asciicast-v1.md) in your terminal:
# ruby play.rb asciicast.json
require 'json'
JSON.parse(File.read(ARGV[0]))['stdout'].each do |frame|
sleep frame[0]
STDOUT.write frame[1]
STDOUT.flush
end
View asciinema.yml
smtp_settings:
:address: "smtp.gmail.com"
:port: 587
:enable_starttls_auto: true
:user_name: "joe@gmail.com"
:password: "8s7df7syfysu"
:authentication: :plain
:domain: "gmail.com"
View gist:05c31e7fe98e20af8993
(deftest changes-at-test
(let [frames [[2 :a] [4 :b] [6 :c]]]
(is (= (changes-at frames 0) nil))
(is (= (changes-at frames 1) nil))
(is (= (changes-at frames 2) :a))
(is (= (changes-at frames 3) :a))
(is (= (changes-at frames 4) :a))
(is (= (changes-at frames 5) :a))
(is (= (changes-at frames 6) :b))
(is (= (changes-at frames 7) :b))
View gist:ebcd5d467dcc4b68806f
> player.test_runner.runner()
core.cljs:116
Testing player.view-test
core.cljs:116
FAIL in (fg-color-test) (at http:21956:204)
core.cljs:116 expected: (= (v/fg-color 1 false) 111)
core.cljs:116 actual: (not (= 1 111))
core.cljs:116
Ran 6 tests containing 34 assertions.
core.cljs:116 1 failures, 0 errors.
View test-runner.cljs
Running ClojureScript test: test
Loading URL: env/test/unit-test.html
Running test.
Testing player.view-test
FAIL in (fg-color-test) (:)
expected: (= (v/fg-color 1 false) 111)
actual: (not (= 1 111))
View gist:f48cb171c5019beece5e
~ % brew info asciinema
asciinema: stable 1.0.0 (bottled), HEAD
https://asciinema.org/
Not installed
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/asciinema.rb
==> Dependencies
Build: go ✘
View convert.rb
require 'json'
require 'open3'
class Hash
def slice *keys
select{|k| keys.member?(k)}
end
end
class Stdout
Something went wrong with that request. Please try again.