Skip to content

Instantly share code, notes, and snippets.

View jcanfield's full-sized avatar
💭
If I do not respond quickly, try me on Twitter at @creativeboulder.

Joshua Canfield jcanfield

💭
If I do not respond quickly, try me on Twitter at @creativeboulder.
View GitHub Profile
@jcanfield
jcanfield / schoolofprivacy-proxylist.md
Last active November 1, 2015 05:40
Open Proxy List (Updated on October 31, 2015)

OPEN/PUBLIC PROXY SERVER LIST

Last Update on October 31, 2015

LIST-

  • 185.26.183.14:80
  • 200.124.8.198:3128
  • 162.208.49.45:3127
  • 80.191.127.243:8080
@jcanfield
jcanfield / .bash_profile
Created October 30, 2015 10:55 — forked from natelandau/.bash_profile
Mac OSX Bash Profile - Sections: # 1. Environment Configuration # 2. Make Terminal Better (remapping defaults and adding functionality) # 3. File and Folder Management # 4. Searching # 5. Process Management # 6. Networking # 7. System Operations & Information # 8. Web Development # 9. Reminders & Notes
# ---------------------------------------------------------------------------
#
# 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
@jasperf
jasperf / .htaccess
Last active March 25, 2019 23:50
.htaccess boilerplate including expire headers, mod pagespeed, cache control headers, Gzip, Deflate #htaccess #seo
# BEGIN Expire headers
AddDefaultCharset UTF-8
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 7200 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
@squarism
squarism / iterm2.md
Last active June 25, 2025 06:14
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@jcanfield
jcanfield / semantic-markup-example-html5.html
Last active August 29, 2015 14:27 — forked from Hogent/semantic-markup-example-html5.html
Gist for article on HTML5 semantics
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Page Title | Site Name</title>
<meta name="description" content="page description">
<link rel="stylesheet" href="style.css">
<!--[if lt IE 9]>
<script src="html5shiv.js"></script>
<![endif]-->
@a-c-t-i-n-i-u-m
a-c-t-i-n-i-u-m / freenom.com.ddns.sh
Created July 7, 2015 12:07
Dynamic DNS support shell script for freenom.com
#!/bin/bash
# settings
# Login information of freenom.com
freenom_email="main@address"
freenom_passwd="pswd"
# Open DNS management page in your browser.
# URL vs settings:
# https://my.freenom.com/clientarea.php?managedns={freenom_domain_name}&domainid={freenom_domain_id}
freenom_domain_name="domain.name"
@hgascon
hgascon / script.sh
Created June 11, 2015 13:58
Fast remote directory rsync over ssh
rsync -aHAXxv --numeric-ids --delete --progress -e "ssh -T -c arcfour -o Compression=no -x" user@<source>:<source_dir> <dest_dir>
@SimpleHomelab
SimpleHomelab / .bash_aliases
Last active May 8, 2021 02:17
bash_aliases for Ubuntu HTPC and Home Servers
# UPDATE AND UPGRADE
alias update='sudo apt-get update'
alias upgrade='sudo apt-get upgrade'
# PACKAGE MANAGEMENT
alias install='sudo apt-get install'
alias uninstall='sudo apt-get remove'
alias aptsearch='sudo apt-cache search'
alias addkey='sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com'
alias finstall='sudo apt-get -f install'

I'm gradually getting serious about switching to Docker to deploy lemp webapps. I've chased the topic of best practices around the web for a while and landed on information like http://phusion.github.io/baseimage-docker/ docker/compose#928 and https://groups.google.com/forum/#!topic/docker-user/gk-oSwgxyo4

I basically maintain "two" roughly mirrored environments: one webdevs are working against in vagrant and one in the cloud (qa, staging, prod). The webdev's typically work on 2-5 sites at a time depending on the SLA and new client volume. I began using fig and am about to migrate to docker-compose. If I store everything in a client specific fig file, it tends to rapidly consume the memory of the vm. This makes it complicated for the webdev to switch between client webapps. I've seen this more readily when dealing with the database containers.

In my mind, the answer to the memory problem is to have one db container that can run databases for multiple clients. Are there other