Skip to content

Instantly share code, notes, and snippets.


Marcin Kulik sickill

View GitHub Profile
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()
Testing player.view-test
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))
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
Not installed
==> Dependencies
Build: go ✘
sickill / convert.rb
Last active Nov 30, 2015
Convert from asciinema "format 1 JSON" to asciinema "player JSON"
View convert.rb
require 'json'
require 'open3'
class Hash
def slice *keys
select{|k| keys.member?(k)}
class Stdout
View Dockerfile
FROM ubuntu:14.04
RUN apt-get -y update
RUN apt-get -y install nginx
ADD example.conf /etc/nginx/conf.d/example.conf
RUN echo "daemon off;" >>/etc/nginx/nginx.conf
CMD ["/usr/sbin/nginx"]
sickill / how-to-install-ruby-2.1
Last active Aug 29, 2015
Installing Ruby 2.1 on Ubuntu 14.04 with ansible
View how-to-install-ruby-2.1
Install ansible on your laptop, then:
ansible-playbook -i production site.yml
After running this confirm ruby version on the server:
ubuntu@srv-blah:~$ which ruby
ubuntu@srv-blah:~$ ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux-gnu]
View Gemfile
# A sample Gemfile
source ""
gem 'rugged', :git => '', :branch => 'development', :submodules => true, :ref => 'fb28f860679f3a4bb29a9d1579f3b13754d81374'
View gist:9937627
# Running tests:
Finished tests in 42.043389s, 0.9752 tests/s, 2.1406 assertions/s.
test: MergeRequestsShow should display watch/unwatch for signed in user. (MergeRequestsShowTest):
Capybara::ElementNotFound: Unable to find field "Email or login"
/srv/gitorious/app/vendor/bundle/ruby/1.9.1/gems/capybara-2.1.0/lib/capybara/node/finders.rb:41:in `block in find'