Skip to content

Instantly share code, notes, and snippets.

View obrok's full-sized avatar
🐹

Paweł Obrok obrok

🐹
  • BlockFi
  • Cracow
View GitHub Profile

Sport

Szpej

  • Zestaw osobisty
    • Przyrzad + HMS
    • 2 HMS
    • Krotki rep
    • Dlugi rep
  • Ekspresy
  • Tyle co wpinek + 1 do wpiecia sie w stanowisko + 1 do przewiazania + 1 zapasowy
------------------------------------------------------------------------------
Screenshot
------------------------------------------------------------------------------
HiWi/50 N= DV/PV: 87/50 H: 786/786 P: 1114/1114 ----b-----------0 DrCh
^^^ ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ ^^^^^^
^^*^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^*^^^^^^^^^ ^^^^^^^^^^^^^^^^^..^
^^^===""""~~~^^^^ ^^*^^^&&&&&&&~~~~~~~~~~~~^*^^= =^^*^^^^^^^^^^^*.@^^
^^===="""~~~~~~o^^ ^^^&&&&&&o&&&&&&&~~~~~~~&&&=== ="""""""&&^~^^*^.^^
^^^"""""~~~^^^^^^^^ ^^^^^^^^&&&&&&&&&&&&&&&&&&&&&& """"""&&~~~^....^
defmodule Bench do
def bench do
:timer.tc(fn -> Enum.reduce(Range.new(0, 10000000), 0, &Kernel.+/2) end) |> IO.inspect
:timer.tc(fn -> Enum.reduce(Range.new(0, 10000000), 0, fn acc, n -> acc + n end) end) |> IO.inspect
end
end
------------------------------------------------------------------------------
Screenshot
------------------------------------------------------------------------------
DwMo/36 L+ DV/PV: 82/48 H: 640/640 P: 330/330 ----b-----------0 DrCh
^^^ ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^
^^*^^^^^^^^^^ ^^^^^^^^^^^*^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^ ^^^@.^
^^^^===""""~~~^^^^ ^^*^^^&&&&&&&~~~~~~~~~~~~^*^^== ^^*^^^^^^^^^^^*..^^
^^^^===="""~~~~~~o^^ ^^^&&&&&&o&&&&&&&~~~~~~~&&&===== """""""&&^~^^*^.^^
^^^^"""""~~~^^^^^^^^ ^^^^^^^^&&&&&&&&&&&&&&&&&&&&&&== """""""""&&~~~^....^
@obrok
obrok / gist:5228021
Created March 23, 2013 15:05
Wroclaw #asciihack
Post links to your game repositories as comments
Post links to your game repositories as comments
@obrok
obrok / mlint.sh
Created May 21, 2012 22:54
Tool to run an appropriate lint on every modified file
#!/bin/bash
# Requirements:
# - node.js (brew install node || open http://nodejs.org/dist/v0.6.18/node-v0.6.18.pkg)
# - jslint (brew install jslint)
# - coffeelint (npm install -g coffeelint)
# - csslint (npm install -g csslint)
# - reek (gem install reek)
for file in `git status -s | awk '{ print $2 }'`
@obrok
obrok / gist:2499900
Created April 26, 2012 14:16
Setting up fresh Ubuntu server for Rails

Setting up fresh Ubuntu server for Rails

Preparations

$ sudo -i

Set preferred editor

$ export EDITOR=vim
def self.routes
Raptor.routes(self) do
index :responder => JSONResponder
end
end
class JSONResponder
def initialize(resource, action, params)
@resource = resource
@action = action