I hereby claim:
- I am druid628 on github.
- I am druid628 (https://keybase.io/druid628) on keybase.
- I have a public key ASABi_-5oNF0TF1OYmFVUTDcWOswkWL0LouSi-ioepimNAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| ### Keybase proof | |
| I hereby claim: | |
| * I am druid628 on github. | |
| * I am druid628 (https://keybase.io/druid628) on keybase. | |
| * I have a public key whose fingerprint is 607A EDE2 ADB2 6A44 D5DB A384 49E6 36E2 3685 70AF | |
| To claim this, I am signing this object: | 
| <?php | |
| function curry(\Closure $f) | |
| { | |
| $a = []; | |
| $t = 'function($%s) use ($f, $a) { $a[] = $%s; return %s };'; | |
| return eval('return ' | |
| .array_reduce( | |
| array_reverse((new \ReflectionObject($f))->getMethod('__invoke')->getParameters()), | 
| <?php | |
| // Based on http://www.php.net/manual/en/reflectionclass.newinstancewithoutconstructor.php#108466 | |
| //dependency to inject | |
| class dep {} | |
| class a { | |
| /** | |
| * @inject | |
| * @var dep | 
| #!/usr/bin/php | |
| <?php | |
| /** | |
| * .git/hooks/pre-commit | |
| * | |
| * This pre-commit hooks will check for PHP error (lint), and make sure the code | |
| * is PSR compliant. | |
| * | |
| * Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer) | |
| * | 
| <?PHP | |
| $context = stream_context_create(array('http' => array('header' => 'Host: www.govtrack.us'))); | |
| $url = 'http://www.govtrack.us/api/v2/vote_voter?vote=113312'; | |
| $s649 = json_decode(file_get_contents($url, 0, $context), true); | |
| foreach ($s649['objects'] as $key => $object) { | |
| $name = $object['person']['name']; | |
| $vote = substr($object['option']['value'], 0, 1); | |
| echo "$name -- $vote\n"; | |
| } | 
| <?PHP | |
| # src/druid628/traittesting/MP3Player.php | |
| namespace druid628\traittesting; | |
| use druid628\traittesting\traits as TRAITS; | |
| class MP3Player | |
| { | |
| use TRAITS\Track | |
| { | 
| # Shell need to knows: | |
| ${PWD##*/} # current directory name not path cheaper than basename $PWD | 
| #!/bin/bash | |
| # Gotcha! | |
| if [ $# -ne 1 ]; then | |
| echo "No directory using current." | |
| exit 0 | |
| fi | |
| if [ ! -d $1 ]; then | |
| echo "That is not a directory dumbass." | 
| #!/usr/bin/groovy | |
| /** | |
| * Del.icio.us RSS to HTML converter | |
| * command line groovy script execution 1 required argument | |
| * with 1 optional argument | |
| * | |
| * | |
| * syntax: | |
| * groovy delicious http://feeds.delicious.com/v2/rss/<user>?private=<key>\&count=<count> [ /path/to/output/file ] | |
| * groovy delicious http://feeds.delicious.com/v2/rss/<user>?count=<count> [ /path/to/output/file ] |