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
| git config alias.publish '! git push -f origin $(git commit-tree HEAD^{tree} -m "Squash"):master' |
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 | |
| SSH_ENV="$HOME/.ssh/environment" | |
| function start_agent { | |
| /usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} | |
| chmod 600 "${SSH_ENV}" | |
| . "${SSH_ENV}" > /dev/null | |
| } |
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 | |
| use Symfony\Component\HttpFoundation\Request; | |
| $loader = require __DIR__.'/../app/autoload.php'; | |
| class RewriteRequest extends Request | |
| { | |
| protected $baseUrlFixed = null; |
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
| git config alias.commit-reset '!f() { target="$1"; shift; git merge $(git commit-tree "$target^{tree}" -p HEAD -m "$*"); }; f' |
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 | |
| class Template { | |
| private $extends = null; | |
| private $template_dir; | |
| private $args; | |
| private $template; | |
| public function __construct($template_dir) | |
| { |
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 template(string $template_75NKTrkhX8ZWDF9R, array $args_75NKTrkhX8ZWDF9R = []) | |
| { | |
| extract($args_75NKTrkhX8ZWDF9R, EXTR_SKIP); | |
| ob_start(); | |
| include TEMPLATE_DIR.$template_75NKTrkhX8ZWDF9R; | |
| return ob_get_clean(); | |
| } |
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 | |
| class ConnectionForFunAndProfit extends \Doctrine\DBAL\Connection | |
| { | |
| /** | |
| * Wraps Connection::connect to prevent credentials leakage | |
| * @return bool | |
| */ | |
| public function connect() | |
| { |
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
| javascript:window.location="http://youtube.com/embed/"+document.location.href.match(/(\?|&)v=([^&]+)/)[2] |