This file contains hidden or 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
# HTTP protocol | |
server { | |
underscores_in_headers on; | |
listen 80; | |
server_name yourwebsite.com; | |
return 301 https://$server_name$request_uri; | |
} | |
# HTTPS server | |
server { |
This file contains hidden or 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 | |
# This file must be executable | |
# chmod u+x .git/hooks/prepare-commit-msg | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
if [ -n "$BRANCH_NAME" ] && [ "$BRANCH_NAME" != "master" ]; then | |
# use ~ instead of / to accomodate branch names with forward slash | |
# e.g. branch name "user/feature-name-" | |
sed -i.bak -e "1s~^~[$BRANCH_NAME] ~" $1 | |
fi |
This file contains hidden or 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
# In your terminal, do this to make an SSH Proxy | |
# ssh -D <your computers IP>:8080 -N -C <username>@<remote server IP> -p <port number> | |
# ssh -D 192.168.0.100:8080 -N -C [email protected] | |
# Follow this to put in additional setup in your computer and phone | |
# http://www.systutorials.com/4876/how-to-configure-ios-for-iphone-and-ipad-to-use-socks-proxy-created-by-ssh/ |
This file contains hidden or 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
/** | |
* sendOverride() | |
* Override response.send to do nothing when response is already sent | |
* This is to minimize the error message | |
*/ | |
function responseSendOverride() { | |
return function(req,res,next){ | |
var _send = res.send; | |
var sent = false; |
This file contains hidden or 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() { | |
/* == GLOBAL DECLERATIONS == */ | |
TouchMouseEvent = { | |
DOWN: "touchmousedown", | |
UP: "touchmouseup", | |
MOVE: "touchmousemove" | |
} | |
/* == EVENT LISTENERS == */ |
NewerOlder