Requires installed gitolite in /home/git and following directory structure
/var
/www
/apps
/hosts
/libs
| // Simulating infinite-length leading lookbehind in JavaScript. Uses XRegExp. | |
| // Captures within lookbehind are not included in match results. Lazy | |
| // repetition in lookbehind may lead to unexpected results. | |
| (function (XRegExp) { | |
| function prepareLb(lb) { | |
| // Allow mode modifier before lookbehind | |
| var parts = /^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*)\)$/.exec(lb); | |
| return { |
| #!/bin/bash | |
| current_branch="$(git symbolic-ref HEAD 2>/dev/null)" || current_branch="(unknown)" | |
| current_branch=${current_branch##refs/heads/} | |
| github_username="JanTvrdik" | |
| github_token="..." | |
| if [[ $current_branch = "(unknown)" ]] | |
| then |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| #!bash.exe | |
| export SSH_AUTH_SOCK=/tmp/.ssh-socket | |
| echo ; | |
| echo Starting connection with ssh-agent... | |
| ssh-add -l 2>&1 >/dev/null | |
| if [ $? = 2 ]; then | |
| rm -f /tmp/.ssh-script /tmp/.ssh-agent-pid /tmp/.ssh-socket | |
| # Exit status 2 means couldn't connect to ssh-agent; start one now | |
| echo Creating new ssh-agent... | |
| ssh-agent -a $SSH_AUTH_SOCK > /tmp/.ssh-script |
| <?php | |
| // advanced bit-twiddling | |
| abstract class AbstractIntArray { | |
| protected $length; | |
| protected $data; | |
| protected $typeSize; | |
| function __construct($length) { |
| <?php | |
| ob_start(function($s, $flag) { | |
| if ($flag & PHP_OUTPUT_HANDLER_START) { | |
| $e = new \Exception; | |
| $s = nl2br("Output started here:\n{$e->getTraceAsString()}\n\n") . $s; | |
| } | |
| return $s; | |
| }, 2); |
| /** | |
| * Startup | |
| */ | |
| public function startup() | |
| { | |
| parent::startup(); | |
| // plain text output when http request | |
| $this->getHttpResponse()->setContentType('text/plain'); |
| REGEDIT4 | |
| [HKEY_CLASSES_ROOT\editor] | |
| @="URL:editor Protocol" | |
| "URL Protocol"="" | |
| [HKEY_CLASSES_ROOT\editor\shell\open\command] | |
| @="wscript \"C:\\bin\\scripts\\run-editor.js\" \"%1\"" |