This file contains hidden or 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
| set -g default-terminal "screen-256color" | |
| # Behave like screen; at least the stuff I use | |
| unbind-key C-b | |
| set-option -g prefix C-a | |
| bind-key C-a last-window | |
| set-window-option -g mode-keys vi | |
| # Make window splitting more intuitive | |
| unbind % | |
| bind-key | split-window -h |
This file contains hidden or 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
| <!-- challenge description: | |
| - a given set of infinite poker chips in theses sizes: 500, 100, 50, 25, 10, 5, 2, 1 | |
| - enter a number | |
| - tell the user the minimum number of chips necessary to represent the value | |
| --> | |
| <!-- initial 91 char solution ; thx to @neuling for the inspiration and @johannesnagl saving me one extra char --> | |
| <p onclick="i=prompt();for(a of[500,100,50,25,10,5,2,1])if(e=~~(i/a))alert(e+' '+a,i%=a)">. | |
| <!-- since it wasn't specified that spitting out 0 chips would be prohibited, another solution --> |
This file contains hidden or 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
| #!/usr/bin/env php | |
| <?php declare(strict_types = 1); | |
| // Source: https://gist.github.com/mfn/256636242cbe8a51252ce28181a6b074 | |
| $command = array_shift($argv); | |
| if (2 !== count($argv)) { | |
| echo "Please provide a XML file and a slice like `$command tests.xml 2/4`\n"; |
This file contains hidden or 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 declare(strict_types=1); | |
| /* | |
| Usage: php endomondo_json2gpx.php <path_to_file.json> […<path_to_other_file.json>] | |
| The endomondo json format parsed here; only the fields actually used by this converted: | |
| [ | |
| {"sport": "…"}, |
This file contains hidden or 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
| #!/usr/bin/env php | |
| <?php declare(strict_types = 1); | |
| $command = array_shift($argv); | |
| if (3 !== count($argv)) { | |
| echo <<<USAGE | |
| Usage: $command path/to/composer.json path/to/phpunit.xml path/to/slice.xml > new_phpunit.xml | |
| Based on your composer PSR-4 autoload configuration, the classes referenced |
OlderNewer