Skip to content

Instantly share code, notes, and snippets.

Avatar

Jan Pecha janpecha

View GitHub Profile
@lexaurin
lexaurin / .gitconfig
Last active Dec 11, 2015
How to manage changelog by git tags? Prefix tags with "v" letter and use this alias:
View .gitconfig
[alias]
changelog = "!git tag -l v* -n20 | sed -n 'H;${;g;s/\\n[^v]/\\x00/g;p}' | sort -rV | tr \\\\000 \\\\n | less"
@juzna
juzna / intro.md
Created Aug 20, 2012
Nette\Object performance tests
View intro.md

Nette\Object performance tests

I guess you already saw a short note Latency Numbers Every Programmer Should Know. I wanted to check how well Nette performs with its magic properties on Nette\Object.

You can see the testing code below together with raw output on my machine.

It show how much time in seconds it took to execute one million iterations of a particular action, thus it is also time in microseconds of one such call. You should compare it to null test, which execute empty iterations.

Results

@senko
senko / onchange.sh
Created Aug 18, 2011
Watch current directory and execute a command if anything in it changes
View onchange.sh
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of