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 | |
interface Command {} | |
interface CommandHandler { | |
public function handle(Command $c); | |
} | |
class Register implements Command { | |
public function fullName() { |
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
ca () { | |
message=$(curl -s whatthecommit.com/index.txt) | |
git add . | |
git commit -a -m "$message"; | |
} |
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 | |
$stream = $fs->readStream($file); | |
// send the right headers | |
header("Content-Type: " . $fs->getMimetype($file)); | |
header("Content-Length: " . $fs->getSize($file)); | |
header("Content-disposition: attachment; filename=\"" . basename($file) . "\""); | |
// dump the attachement and stop the script |
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
# by Mitchell van Wijngaarden | |
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
#config windowHintsIgnoreHiddenWindows false | |
config secondsBetweenRepeat 0.1 | |
config checkDefaultsOnLoad true | |
config focusCheckWidthMax 3000 | |
config windowHintsSpread true |
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/sh | |
git clone -o laravel -b develop https://github.com/laravel/laravel.git $1 | |
cd $1 | |
git checkout --orphan master | |
git add . | |
git commit -m "Initial commit" |
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
### Keybase proof | |
I hereby claim: | |
* I am mitchellvanw on github. | |
* I am mitchellvanw (https://keybase.io/mitchellvanw) on keybase. | |
* I have a public key whose fingerprint is 0E5B 637C 1357 D0E0 1652 FD99 67A2 6380 8632 C211 | |
To claim this, I am signing this object: |
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 class D{private $ls = [];public function dispatch($es){if(!is_array($es)){$this->f($es);}foreach($es as $e){$this->f($e);}}public function listenOn($n,$l){$this->al($n,$l);}private function f($e){$ls=$this->gl($e->getName());if(!$ls)return;foreach($ls as $l){$l->handle($e);}}private function gl($n){if(!$this->hl($n))return;return $this->ls[$n];}private function hl($n){return isset($this->l[$n]);}private function al($n,$l){$this->ls[$n][] = $l;}} |
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
# Installation | |
curl -o laravel.phar http://laravel.com/laravel.phar | |
chmod 755 laravel.phar | |
mv laravel.phar /usr/local/bin/laravel | |
# Usage | |
laravel new <application_name> |