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
# Redirecting www version to non-www version | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ http://%1/$1 [R=301,L] | |
</IfModule> |
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 | |
# Set defaults if not provided by environment | |
CHECK_DELAY=${CHECK_DELAY:-5} | |
CHECK_IP=${CHECK_IP:-8.8.8.8} | |
PRIMARY_IF=${PRIMARY_IF:-eth0} | |
PRIMARY_GW=${PRIMARY_GW:-1.2.3.4} | |
BACKUP_IF=${BACKUP_IF:-eth1} | |
BACKUP_GW=${BACKUP_GW:-2.3.4.5} |
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 | |
# | |
# crashplanFixup.sh for Macintosh OS X 10.9 (and probably earlier versions) | |
# | |
# This script will prevent CrashPlan from de-duplicating data on files greater than 1k. | |
# Based on information from http://networkrockstar.ca/2013/09/speeding-up-crashplan-backups/ | |
# | |
# NOTE: Must be run with sudo! IE: $ sudo sh ./crashplanFixup | |
# | |
# v1.1 2014-03-13 by [email protected] |
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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
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
var https = require('https'); | |
var storesUrl = 'https://reserve.cdn-apple.com/GB/en_GB/reserve/iPhone/stores.json'; | |
var stockUrl = 'https://reserve.cdn-apple.com/GB/en_GB/reserve/iPhone/availability.json'; | |
var stockLastUpdated; | |
var stores; | |
var stock; |
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 | |
# A script to set up a new mac. Uses bash, homebrew, etc. | |
# Focused for ruby/rails development. Includes many utilities and apps: | |
# - homebrew, rvm, node | |
# - quicklook plugins, terminal fonts | |
# - browsers: chrome, firefox | |
# - dev: iterm2, sublime text, postgres, chrome devtools, etc. | |
# - team: slack, dropbox, google drive, skype, etc |
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 | |
if [ -z "$1" ]; then | |
echo "Usage: git pr [clean] [<remote>] <id-or-url>" | |
echo "" | |
echo "Examples:" | |
echo "git pr 42 --> git fetch origin pull/42/head:pr/origin/42" | |
echo "git pr upstream 42 --> git fetch upstream pull/42/head:pr/upstream/42" | |
echo "git pr https://github.com/peerigon/phridge/pull/1 --> git fetch https://github.com/peerigon/phridge.git pull/1/head:pr/peerigon/phridge/1" | |
echo "git pr clean --> Deletes all branches that match pr/*/* and pr/*/*/*" |
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 | |
# Modified following this issue: https://github.com/wbond/sublime_terminal/issues/89 | |
CD_CMD="cd "\\\"$(pwd)\\\"" && clear" | |
if echo "$SHELL" | grep -E "/fish$" &> /dev/null; then | |
CD_CMD="cd "\\\"$(pwd)\\\""; and clear" | |
fi | |
VERSION=$(sw_vers -productVersion) | |
OPEN_IN_TAB=0 |
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
##================================================ | |
# Prevent directory listing. | |
##================================================ | |
IndexIgnore * | |
##================================================ | |
# Set Charset. | |
##================================================ | |
AddDefaultCharset utf-8 |
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
#based on http://www.forshee.me/2016/03/02/ubiquiti-edgerouter-lite-setup-part-2-firewall-setup.html | |
configure | |
edit firewall name allow-est-drop-inv | |
set default-action drop | |
set enable-default-log | |
set rule 1 action accept | |
set rule 1 state established enable | |
set rule 1 state related enable | |
set rule 2 action drop |
OlderNewer