This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# set -x | |
for t in `git tag` ; do git tag -d $t > /dev/null ; done | |
for branch in `git -c "color.ui"=false branch -r`; do | |
if echo "$branch" | \grep -v "^tag" 2>&1 >/dev/null ; then | |
continue | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Define your constante here */ | |
define('DESTINATION_BASE', '/home/sensio/dev/danone_prod/'); | |
define('DESTINATION_FOLDER_BASENAME', 'DANONEPRO_PHP_%s'); | |
define('DESTINATION_FOLDER_DOC_BASENAME', 'DANONEPRO_PHP_DOC_%s'); | |
/* Do not touch after */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import local, abort, lcd, settings | |
from fabric.colors import red, green | |
from fabric.decorators import task | |
import os | |
@task | |
def post_commit(sha1=None, push=False): | |
""" | |
Call this task after a commit. | |
Sample of post-commit hook: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(k,l,r,m,i,e,c,o,g){ | |
for(i in window) k.push(i) | |
e = document.createElement("iframe") | |
e.style.display = "none" | |
document.body.appendChild(e) | |
c = e.contentWindow | |
for(o in c) l.push(o) | |
for(g=k.length;m < g;m++) if(!~l.indexOf(k[m])) r.push(k[m]) | |
return r | |
})([],[],[],0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Forms::createFormFactory()->createBuilder(); | |
// see https://github.com/sensiolabs/connect/blob/master/tests/SensioLabs/Connect/Bridge/Symfony/Form/ErrorTranslatorTest.php#L18 | |
// With form on master (commit 0277f1a9c3bec27083c8aa79837c26b6f81b1ae8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/composer.lock | |
/vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
sleep(10); | |
header('Content-Type: text/css'); | |
echo 'h1 { color: red; }'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function foo() | |
{ | |
$bool = true; | |
a: | |
try { | |
$bool = $this->do() | |
} catch($e) | |
goto a; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function waitContinue($message, $timeout, closure $timeoutCallback) { | |
$read = array(STDIN); | |
$write = null; | |
$except = null; | |
$answer = ''; | |
fwrite(STDOUT, trim($message) . ': '); |