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 | |
| namespace Your\Owns; | |
| use Wandu\DI\Container; | |
| use Wandu\DI\ContainerInterface; | |
| class Application extends Container | |
| { | |
| /** @var \Wandu\DI\ContainerInterface */ | |
| public static $instance; |
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 | |
| function benchmark( $callback, $times = 100 ) { | |
| if ( !($callback instanceof Closure) ) return false; | |
| $st = explode(" ", microtime()); | |
| for ($i = 0; $i < $times; $i++) { | |
| $ret = $callback( $i ); | |
| } | |
| $et = explode(" ", microtime()); |
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
| #!/bin/sh | |
| # Just copy and paste the lines below (all at once, it won't work line by line!) | |
| # MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
| function abort { | |
| echo "$1" | |
| exit 1 | |
| } | |
| set -e |
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 | |
| /** | |
| * Base On wan2land/wandu-console | |
| */ | |
| use \Wandu\Console\Argv; | |
| use \Wandu\Console\Request; | |
| use \Wandu\Console\Response; | |
| require __DIR__.'/../vendor/autoload.php'; |
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 | |
| echo "Load Deploy :)\n---------------------------------------\n"; | |
| require __DIR__.'/../vendor/autoload.php'; | |
| deployer(); | |
| $file_path = $_SERVER['PWD'].'/deployer.php'; | |
| if ( file_exists( $file_path ) ) { |
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
| { | |
| "repositories" : [ | |
| { | |
| "type" : "pear", | |
| "url" : "http://pear.php.net" | |
| } | |
| ], | |
| "require-dev": { | |
| "phpunit/phpunit": "3.7.*", | |
| "phpdocumentor/phpdocumentor": "2.*", |
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
| //참고 : http://jsperf.com/count-the-number-of-characters-in-a-string | |
| //www.lsauer.com 2012 | |
| //Answer to: | |
| //http://stackoverflow.com/questions/881085/count-the-number-of-occurances-of-a-character-in-a-string-in-javascript/10671743#10671743 | |
| //There are at least four ways. The best option, which should also be the fastest -owing to the native RegEx engine -, is placed at the top. //jsperf.com is currently down, otherwise I would provide you with performance statistics. | |
| #1. | |
| ("this is foo bar".match(/o/g)||[]).length | |
| //>2 |
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
| export PATH="~/.composer/vendor/bin:$PATH" #vendor들의 바이너리 포함. | |
| export PATH="~/.composer/bin:$PATH" # 혹시 필요에 따라서 만들 바이너리 포함. 여기서는 deployer때문에 사용. |
NewerOlder