This file contains 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
<script type="text/javascript"> | |
<!-- | |
// Jump to the best post (first first unread or most recent) in a thread. | |
// Originally by Todge, but completely rewritten by Ben Loveridge. | |
if(document.location.href.match('board=')&&!document.location.href.match('action=')) { | |
var table_cells = document.getElementsByTagName('td'), | |
create_cell_click_fn = function(href) { | |
return function() { if (!window.pb_bubble) { window.location.href = href; } }; | |
}, | |
cell, is_topic_cell, has_new_post, new_post_href, best_post_href, last_post_cell, last_post_groups, last_post_href; |
This file contains 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
require 'formula' | |
class GitFlowCompletion < Formula | |
homepage 'https://github.com/bobthecow/git-flow-completion' | |
url 'https://github.com/bobthecow/git-flow-completion/tarball/0.4.1.0' | |
md5 '95c05d1a278c1c41067bd7cc6c281ecd' | |
head 'https://github.com/bobthecow/git-flow-completion.git', :branch => 'develop' | |
end |
This file contains 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
/** | |
* Function: getRandomId | |
* Generates a unique-ish hex string between 1 and 32 characters long. | |
*/ | |
rrandomidreplace : /x/g, | |
getRandomId : function(length) { | |
length = length && length > 0 && length <= 32 ? length : 32; | |
function getHexChar() { | |
var r = Math.random()*16|0; | |
return r.toString(16); |
This file contains 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
# prompt including cwd, username, hostname, git branch # | |
export PS1="\[\e[0;32m\]\u\[\e[m\]\[\e[1;33m\]@\[\e[m\]\[\e[1;32m\]\h\[\e[m\]\[\e[0;33m\]:\[\e[m\]\[\e[1;37m\]\w\[\e[m\] \[\e[0;33m\]\$(git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/{\1} /')\[\e[0;35m\]$ \[\e[m\]" | |
export SUDO_PS1="\[\e[0;32m\]\u\[\e[m\]\[\e[1;33m\]@\[\e[m\]\[\e[1;32m\]\h\[\e[m\]\[\e[0;33m\]:\[\e[m\]\[\e[1;37m\]\w\[\e[m\] \[\e[0;33m\]\$(git branch 2> /dev/null | grep -e '\* ' | sed 's/^..\(.*\)/{\1} /')\[\e[0;35m\]$ \[\e[m\]" | |
# terminal colors # | |
export CLICOLOR='true' |
This file contains 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
if (phantom.state.length === 0) { | |
if (phantom.args.length === 0) { | |
console.log("Simple JasmineBDD test runner for PhantomJS"); | |
console.log("Usage: phantomjs-testrunner.js url_to_runner.html"); | |
console.log("Accepts http:// and file:// urls"); | |
console.log(""); | |
console.log("NOTE: This script depends on jasmine.TrivialReporter being used\non the page, for the DOM elements it creates.\n"); | |
phantom.exit(); | |
} else { | |
var address = phantom.args[0]; |
This file contains 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
" Version Control (handy for VCS where open files can be changed by a pull) | |
set autoread | |
" Keybinding to format JSON | |
map <leader>jt <Esc>:%!python -m json.tool<CR><Esc>:set filetype=json<CR> | |
" Auto-trim trailing whitespace | |
autocmd FileType css,javascript,html,php,python,xml autocmd BufWritePre <buffer> :call setline(1,map(getline(1,"$"),'substitute(v:val,"\\s\\+$","","")')) | |
" Set sync area to avoid broken syntax highlighting |
This file contains 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
for y in 1; do TMPVAR__=; for x in `find ${DIRNAME} -name "tests" -type d`; do TMPVAR__+="--no-instrument=`echo $x | awk -F${DIRNAME}/ '{print $2}'` "; done; jscoverage ${DIRNAME} ${DIRNAME}_coverage $TMPVAR__; TMPVAR__=; done; |
This file contains 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 | |
shift # get rid of -c | |
# if no commands, just open a shell | |
if [[ $# -eq 0 ]]; then | |
/bin/bash -l | |
# if the first arg is a git- command, that means it is something like git-push, etc... so forward it | |
elif [[ $1 == git-* ]]; then | |
ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no git@localhost $* |
This file contains 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
[alias] | |
man = help | |
unadd = reset HEAD | |
#co = checkout | |
co = "!f(){ git checkout \"$@\" && git sup; }; f" | |
feature = "!git reset HEAD && git checkout -b feature/\"$1\" && git commit --allow-empty -m \"Created feature branch $1\" && git push --set-upstream origin feature/\"$1\" && echo Branch feature/$1 published to origin" | |
cp = cherry-pick | |
sma = submodule add | |
st = status | |
br = branch |
This file contains 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
REPONAME=${1%/} # trim trailing slash | |
if [ ! -d "$REPONAME" ]; then | |
# Make a temporary working directory | |
mkdir $REPONAME && cd $REPONAME | |
echo .DS_Store > .gitignore # ignore a common MacOS file | |
# make an initial commit | |
git init && git add .gitignore && git commit -m "initial commit" | |
else |
NewerOlder