Skip to content

Instantly share code, notes, and snippets.

View talpah's full-sized avatar

Cosmin I talpah

  • Bucharest, Romania
  • 09:01 (UTC +03:00)
View GitHub Profile
@talpah
talpah / sad.php
Last active September 21, 2015 12:10 — forked from anonymous/sad.php
Just noticed that sad() is not called on a class instance
<?php
$thefeels = new Feelings();
function sad() {
global $thefeels;
return $thefeels->is_checked() ? $thefeels : $thefeels->is_sad();
}
class Feelings {
private $sad = true;
private $feelings_checked = false;
public function is_sad() {
@talpah
talpah / README.md
Last active December 12, 2015 03:38 — forked from dlsniper/README.md

You should download each of the three versions of Symfony2 in /var/www/benchmark/sf2<X> where <X> is the minor version. Then

chmod +x benchmark.sh
sudo ./benchmark.sh
@talpah
talpah / recreate dir structure for gists
Created January 29, 2013 07:57
simple bash commands to recreate directory structure from a cloned gist (only condition is that you don't have underscores in the original filenames)
for f in *; do a=$(echo $f | cut -d '_' --output-delimiter='/' -f 2-); b=$(dirname $a); mkdir -p $b; mv $f $a; done