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 IOS7 sees a *.appcache file it freaks out and disables browser | |
# history until browser cache is cleared AND it is rebooted. | |
# Tell IOS7 users asking for a *.appcache file to GTFO with a 412 | |
# "precondition failed" response so they don't hurt themselves. | |
if ( $http_user_agent ~* '(iPad|iPhone);.*CPU.*OS 7_' ){ | |
set $test IOS7; | |
} | |
if ($request_filename ~* ^.+.appcache$) { | |
set $test "${test}_APPCACHE"; | |
} |
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
# Convert GET access_token to Cookie to avoid Referrer leaks. | |
location / { | |
if ($request_uri ~ (.*[\?&])access_token=[^&]*&?(.*)){ | |
add_header Set-Cookie access_token=$arg_access_token;secure;HttpOnly | |
return 301 $1$2; | |
} | |
} |
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
#Get latest debian image | |
FROM debian:wheezy | |
RUN echo "deb http://nginx.org/packages/debian/ wheezy nginx" >> /etc/apt/sources.list.d/nginx.list | |
RUN apt-key adv --fetch-keys "http://nginx.org/keys/nginx_signing.key" | |
# Update package repos | |
RUN apt-get update -y --fix-missing | |
RUN apt-get upgrade -y --fix-missing |
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
FROM abh1nav/java7 | |
# Download and extract Cassandra | |
RUN \ | |
mkdir /opt/cassandra; \ | |
wget -O - http://www.us.apache.org/dist/cassandra/2.1.2/apache-cassandra-2.1.2-bin.tar.gz \ | |
| tar xzf - --strip-components=1 -C "/opt/cassandra"; | |
ADD cassandra.yaml /opt/cassandra/conf/ | |
ADD run.sh /tmp/ |
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
<html> | |
<body> | |
<a href="#" onclick="die()">click me!</a> | |
<script> | |
function die () { | |
setTimeout(function () {die(); die()}, 0) | |
} | |
</script> | |
</body> | |
</html> |
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
valid_hash=$( cat /home/lrvick/.nfcauth ) | |
challange_hash=$( printf $1 | shasum -a 256 | sed 's/ .*//' ) | |
echo $valid_hash | |
echo $challange_hash | |
if [ "$valid_hash" == "$challange_hash" ]; then | |
echo "unlocked" | |
killall slock | |
fi |
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 | |
#YouTubeSucker 0.9999999423ish | |
#your media player and args of choice, must have flv support, mplayer or vlc will do the job | |
mediap="mplayer -fs" | |
terms="$*" | |
if [ "$terms" = "" ] ; then | |
echo 'Usage: yts.sh [YouTube URL] [search terms]' | |
fi |
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
present_happiness = 1 | |
trauma_happiness = present_happiness/10 | |
post_trauma_happiness = present_happiness*2 | |
trauma_years = 1 | |
years_left = 43 |
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
#!/usr/bin/python2.6 | |
import os.path | |
import json | |
import urllib2 | |
import urllib | |
import urlparse | |
import BaseHTTPServer | |
import webbrowser | |
APP_ID = '218248774869881' |
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/sh | |
SERVICE=$1 | |
BRANCH=$2 | |
HEALTH_URL=$3 | |
if [ -z "$HEALTH_URL" ]; then | |
echo "Syntax: roll-restart someservice somebranch http://localhost:80" | |
exit | |
fi |
OlderNewer