$ sudo install -o redis -g redis -d /var/lib/redis2
$ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf
" git commit message config | |
autocmd FileType gitcommit set textwidth=72 | |
autocmd FileType gitcommit set colorcolumn=73 | |
" git populate commit template with variables | |
" https://vi.stackexchange.com/a/11900 | |
function! s:expand_commit_template() abort | |
let branch = split(matchstr(system('git rev-parse --abbrev-ref HEAD'), '\p\+'), "-") | |
let context = { |
[${TICKET_SYSTEM}-${TICKET_NUMBER}] Subject line | |
# body message goes below |
[ -d /usr/share/fonts/opentype ] || sudo mkdir /usr/share/fonts/opentype | |
sudo git clone https://github.com/adobe-fonts/source-code-pro.git /usr/share/fonts/opentype/scp | |
sudo fc-cache -f -v |
function Util() { | |
Util.guid = function() { | |
return this.s4() + this.s4() + '-' + this.s4() + '-' + this.s4() + '-' + this.s4() + '-' + this.s4() + this.s4() + this.s4(); | |
} | |
Util.s4 = function() { | |
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1); | |
} | |
} |
#!/bin/bash | |
SCRIPT=`basename ${BASH_SOURCE[0]}` | |
CODE="/Users/$USER/code" | |
exitWithMessageAndCode() { | |
echo "${1}" | |
exit ${2} | |
} |
/** | |
* Javascript implementation of String.format or printf | |
* | |
* example of usage | |
* 'vincenty lat1: {0} lon1: {1} lat2: {2} lon2: {3}'.format(lat1, lon1, lat2, lon2) | |
* | |
* outputs | |
* vincenty lat1: 40.689247 lon1: -74.044502 lat2: 40.7747222222 lon2: -73.8719444444 | |
* | |
* http://stackoverflow.com/questions/610406/javascript-equivalent-to-printf-string-format/4673436#comment46715555_4673436 |
Informational Responses | |
100 | |
Error Text: continue | |
Description: This interim response indicates that everything so far is OK and that the client should continue with the request or ignore it if it is already finished. | |
HTTP 1.0 only | |
101 | |
Error Text: switching protocol |
<?php namespace JSONRPC; | |
class jsonRPCClient { | |
/** | |
* Debug state | |
* | |
* @var boolean | |
*/ | |
private $debug; |