Skip to content

Instantly share code, notes, and snippets.

View infolock's full-sized avatar
👨‍👩‍👦‍👦
nqdq

infolock infolock

👨‍👩‍👦‍👦
nqdq
View GitHub Profile
@infolock
infolock / .htaccess
Last active December 20, 2015 00:48
htaccess file containing Apache Mod Rewrite Rule(s) for doing a Subdomain Redirect (CloudFlare as the Nameserver, Godaddy As the host) The nginx conf file related to this htaccess file can be found here: https://gist.github.com/infolock/6044150 More information can be found in the full article: http://phpadvocate.com/blog/2013/07/apache-godaddy-…
# Author Jonathon Hibbard
##################### Godaddy Apache .htaccess for example.com #####################
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
##################### Try and prevent looping madness #####################
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]
server {
listen 80;
server_name images.example.com;
access_log /var/sites/images.example.com/logs/access.log;
error_log /var/sites/images.example.com/logs/error.log;
root /var/sites/images.example.com/htdocs;
location / {
index index.php index.html index.htm;
}
location = /favicon.ico {
@infolock
infolock / chmod_files_and_dirs.sh
Created October 10, 2013 23:46
*nix recursive find and change mod access for files and folders within a given path
# Recursively find all files in the current directory and change to access of 644
find ./ -type f -exec chmod 644 {} \;
# Recursively find all directories in the current directory and change to access of 755
find ./ -type d -exec chmod 755 {} \;
@infolock
infolock / .gitignore
Created October 3, 2016 14:15
Boilerplate Gitignore for macOS web (JS) development
bower_components/
node_modules/
tmp/
.AppleDouble
.LSOverride
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes