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/bash | |
| # Convert TSV data to backlog Wiki table format. | |
| function read_stdin() { | |
| IFS= read line | |
| while [ "x$line" != "x" ]; do | |
| if [ "x$contents" != "x" ]; then | |
| contents=$contents"\n" | |
| fi | |
| contents=$contents$line |
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
| public class HogeImpl implements Hoge { | |
| @Inject | |
| Foo foo; | |
| public HogeImpl(/*No args*/) { | |
| } | |
| } |
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
| # golang | |
| export GOROOT=/usr/local/go | |
| export GOPATH=$HOME/go | |
| export PATH=$GOPATH/bin:$GOROOT/bin:$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
| { | |
| "globals": { | |
| "module": false | |
| }, | |
| "esversion": 6, | |
| "strict": "global", | |
| "node": true | |
| } |
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
| class FooController extends Controller | |
| { | |
| public function __construct() | |
| { | |
| $this->middleware(function ($request, $next) { | |
| echo "before filter"; | |
| $response = $next($request); | |
| echo "after filter"; | |
| return $response; | |
| }); |
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 | |
| // Put me into tests/autoload.php | |
| require_once __DIR__.'/../vendor/autoload.php'; | |
| try { | |
| $env = env('APP_ENV'); | |
| $filename = sprintf(".env.%s", $env); | |
| (new Dotenv\Dotenv(dirname(__DIR__), $filename))->load(); | |
| } catch (Dotenv\Exception\InvalidPathException $e) { | |
| echo ".env for test is missing."; |
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
| " curl https://gist.githubusercontent.com/grohiro/754ec5e14c1bc9be5ee8767fb5b7d17d/raw/55bcf89fad62fdbb1507b5fa1e2648532920cb73/vimrc.local > .vimrc.local | |
| " Vim | |
| "setl ts=2 | |
| "setl sw=2 | |
| "setl sts=2 | |
| "setl expandtab | |
| "execute "set rtp+=".expand('<sfile>:p:h')."/.vim" | |
| " PHP | |
| "let g:quickrun_config['phpunit']['cmdopt'] = '-c ' . expand('<sfile>:p:h') . '/phpunit.xml' |
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 Deployer; | |
| // deployer dotenv:upload stage | |
| // deployer dotenv:dump | |
| // deployer dotenv:export | |
| // deployer dotenv stage | |
| set('dotenv_path', '{{deploy_path}}/shared/.env'); |
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/bash | |
| # Switch environment | |
| # Usage: swenv [env] | |
| # curl -O https://gist.githubusercontent.com/grohiro/9279e3367c0436a1b130a1bac2e7a83b/raw/3eb4b4eee9eeb4a14c531521cf5875e138300d1f/swenv | |
| if [ "$1" != "" ];then | |
| env_file=.env.$1 | |
| else | |
| env_file=.env | |
| fi |
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
| task('logrotate:link', function () { | |
| run('sudo ln -fs {{ current_path }}/etc/logrotate.conf /etc/logrotate.d/AppName'); | |
| }); | |
| // Create a symlink to rotate laravel logs. | |
| on(host('stage'), function ($host) { | |
| after('deploy:symlink', 'logrotate:link'); | |
| }); |
OlderNewer