Skip to content

Instantly share code, notes, and snippets.

View jiriknesl's full-sized avatar
🖐️
Building

Jiri Knesl jiriknesl

🖐️
Building
View GitHub Profile
### Keybase proof
I hereby claim:
* I am jiriknesl on github.
* I am jiriknesl (https://keybase.io/jiriknesl) on keybase.
* I have a public key ASBBs0CZwQ8Fyt8tKl4nfYwUfK6dbMsysdWN-GTWluXOogo
To claim this, I am signing this object:
_ = require "underscore"
assert = require "assert"
Array.prototype.max = -> _.max this
Array.prototype.min = -> _.min this
Array.prototype.zip = (b) -> _.zip this, b
Array.prototype.stredniHodnota = -> (this.max() - this.min())/2 + this.min()
Array.prototype.reduceInitialZero = (callback) -> _.reduce ([0].concat this), (memo, val) -> callback(memo, val)
a = [ 11994, 12887, 13864, 15033, 16017, 16951, 18124, 19055, 20343, 21856]
@jiriknesl
jiriknesl / gist:622042
Created October 12, 2010 11:38
ZSH mercurial branch in right command
function precmd ()
{
export RPS1="$(hg branch 2>/dev/null)"
}
def perform
begin
timeout (9) {
puts "Performing taks for airline #{@airline_id}"
command = assembly_command @command, get_arguments
puts command
pid = fork do
exec(command)
sleep 9
end