Skip to content

Instantly share code, notes, and snippets.

View johnloy's full-sized avatar

John Loy johnloy

View GitHub Profile
@ttscoff
ttscoff / Quix commands for domain navigation
Created February 9, 2011 01:46
Bookmarklets for moving up or skipping to top levels of a domain, in [Quix format](http://quixapp.com/help/syntax/)
> See <http://quixapp.com/help/syntax/> for more info on Quix syntax and usage
up javascript:(function(){window.location=document.location.href.replace(/\/$/,'').split('/').slice(0,-1).join('/')+"/";})(); Move up one level in the sites directory structure
top javascript:(function(){window.location=document.location.protocol+"//"+document.location.host;})(); Jump to top level of the current site
@millenomi
millenomi / gourl.sh
Created January 14, 2011 16:23
This is a wrapper around the 'curl' command-line tool that adds a few useful features.
#!/bin/bash
if [ "$#" == "0" ]; then
echo "usage: $0 [CURL FLAGS|--json FILE|--https|--dry-run]* URL" >&2
echo "You can set the BASE_URL environment variable; if you do, all relative URLs will be have the BASE_URL appended in front of them. (Note that this appends blindly the two strings together, doing no resolution work.)" >&2
exit 1
fi
args=("$@")
verbatim_args=()