Skip to content

Instantly share code, notes, and snippets.

#!/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"
#!/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
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
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
? openssl-samples cd EXAMPLE.COM
? EXAMPLE.COM openssl genrsa -out example.com.key 2048
Generating RSA private key, 2048 bit long modulus
.................................................+++
..............................................................................................+++
e is 65537 (0x10001)
? EXAMPLE.COM openssl req -new -sha256 -key example.com.key -out www.example.com.csr
You are about to be asked to enter information that will be incorporated
? INTERMEDIATE openssl ca -config intermediate.cnf -in ../EXAMPLE.COM/www.example.com.csr -out www.example.com.crt
Using configuration from intermediate.cnf
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number: 2097152 (0x200000)
Validity
Not Before: Jan 26 21:14:39 2015 GMT
Not After : Jan 26 21:14:39 2016 GMT
Subject:
? openssl-samples find .
.
./EXAMPLE.COM
./EXAMPLE.COM/example.com.key
./EXAMPLE.COM/www.example.com.crt
./EXAMPLE.COM/www.example.com.csr
./INTERMEDIATE
./INTERMEDIATE/certs
./INTERMEDIATE/crl
./INTERMEDIATE/index.txt
#
# OpenSSL example configuration file.
# This is mostly being used for generation of certificate requests.
#
# This definition stops the following lines choking if HOME isn't
# defined.
HOME = .
RANDFILE = $ENV::HOME/.rnd
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BBEditDocumentType</key>
<string>CodelessLanguageModule</string>
<key>BBLMLanguageDisplayName</key>
<string>Dell Switch</string>
<key>BBLMLanguageCode</key>
<string>DlSw</string>
@dschneller
dschneller / de.danielschneller.discoverydactivedirectory.plist
Created April 13, 2015 11:23
LaunchDaemon to enable "Active Directory Mode" for OSX Yosemite on Login. Put into /Library/LaunchDaemons. Fixes ".local" name resolution.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>de.danielschneller.discoverydactivedirectory</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/discoveryutil</string>
<string>activedirectory</string>