Skip to content

Instantly share code, notes, and snippets.


Marcin Kulik sickill

View GitHub Profile
sickill / gist:1694742
Created Jan 28, 2012
Install Cyanogenmod7 on HTC Desire S with hboot 2.00.0002
View gist:1694742

There's no need to make the phone S-OFF (like some people say).

  • Disable fast/quick reboot (Settings » Power » Fastboot)

  • Download fastboot binary

  • Unlock bootloader:

    Put the phone in Fastboot USB mode (Turn off, hold Volume Down + Power)

View web-controllers-doc_controller.ex
defmodule Asciinema.DocController do
use Asciinema.Web, :controller
def show(conn, _params) do
|> put_layout(:docs)
|> render("show.html")
sickill / poolboy_demo.ex
Created May 8, 2017 — forked from henrik/poolboy_demo.ex
Example of using Poolboy in Elixir to limit concurrency (e.g. of HTTP requests).
View poolboy_demo.ex
defmodule HttpRequester do
use GenServer
def start_link(_) do
GenServer.start_link(__MODULE__, nil, [])
def fetch(server, url) do
# Don't use cast:
timeout_ms = 10_000
View asciinema-theme-monokai.css
/* Based on Monokai from base16 collection - */
.asciinema-theme-monokai .asciinema-terminal {
color: #f8f8f2;
background-color: #272822;
border-color: #272822;
.asciinema-theme-monokai .fg-bg {
color: #272822;
.asciinema-theme-monokai .bg-fg {
sickill / cleanup-input-stream.clj
Last active Mar 1, 2017
InputStream wrapper which calls given callback after the stream is closed.
View cleanup-input-stream.clj
(ns example
(defn cleanup-input-stream
"InputStream wrapper which calls given callback after
the stream is closed."
[is cleanup]
(proxy [FilterInputStream] [is]
(close []
(proxy-super close)
View streams.clj
(ns cheshire.experimental
(:require [cheshire.core :refer :all]
[ :refer :all])
(:import ( ByteArrayInputStream FilterInputStream
(defn escaping-input-stream
(let [new-is (proxy [FilterInputStream] [is]
sickill /
Last active Feb 8, 2017
Naive comparison of reduce/sum performance of Clojure 1.8, ClojureScipt (Planck 2.0, Lumo 1.1.0), Ruby 2.4, JRuby and Elixir 1.3.2

Naive micro-benchmark of reduce/sum I made to get the idea of raw performance range of different dynamic languages / different runtimes.

For each of these I repeated the execution until the timing stopped changing in major way (JIT etc), and saved only the last run.

Don't take it too seriously ;)

sickill / danny.datalog
Created Jan 26, 2017
"Find actors older than Danny Glover"
View danny.datalog
[:find ?actor
[?d :person/name "Danny Glover"]
[?d :person/born ?danny-age]
[?a :person/name ?actor]
[?a :person/born ?actor-age]
[?m :movie/cast ?a]
[(< ?actor-age ?danny-age)]]
View gist:413c68c9edf85d5af96a
nREPL: Establishing direct connection to localhost:32323 ...
nREPL: Direct connection established
Connected. Clojure isn't a language, it's a building material.
Error in `cider-repl--state-handler': (void-function seq-find)
error in process filter: Symbol's function definition is void: seq-find [2 times]
sickill / nginx.conf
Created Apr 25, 2012 — forked from lucasmazza/
Nginx upstart script that WORKS with Passenger.
View nginx.conf
description "nginx http daemon"
start on runlevel [2]
stop on runlevel [016]
console owner
exec /opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf -g "daemon off;"