Skip to content

Instantly share code, notes, and snippets.

volume_displayname () {
if [[ "-n" = "$1" ]]; then
volid="$2";
else
volid="$1";
fi
name=$(cinder show $volid | grep display_name | awk -F "|" ' { print $3 }' | tr -d ' ')
if [[ "-n" = "$1" ]]; then
echo -n $name;
else
GET /feed/m4a/ HTTP/1.1
Host: fokus-europa.de
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Cookie: _pk_id.26.7efe=7d48f8e7b01d3a34.1405527043.1.1405527054.1405527043.; _pk_ses.26.7efe=*
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.77.4 (KHTML, like Gecko) Version/7.0.5 Safari/537.77.4
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive
#!/bin/bash
# create 512MB RAMDISK (512k blocks)
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1048576`
# create symlink for iPhone Simulator if not present yet
mkdir /Volumes/ramdisk/iPhone\ Simulator
rm -R ~/Library/Application\ Support/iPhone\ Simulator/
ln -s /Volumes/ramdisk/iPhone\ Simulator/ ~/Library/Application\ Support/iPhone\ Simulator
#!/bin/bash -x
REPO="${1}"
SHA1="${2}"
OPEN="${3}"
repofragment=$(cd "$REPO"; git remote -v | grep origin | grep push | sed -e 's/.*github\.com.\(.*\)\.git.*/\1/')
url="https://github.com/${repofragment}/commit/${SHA1}"
echo "${url}" | pbcopy
[ -z "${OPEN}" ] || open "$url"