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
# ~/.bashrc | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac | |
# don't put duplicate lines or lines starting with space in the history. | |
HISTCONTROL=ignoreboth |
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
# ~/.bash_login | |
export PS1="\e[36;1m\]>\e[93;1m\] changeme \e[36;1m\]\W\e[0m\] " | |
alias d='docker' | |
alias dco='docker-compose' | |
alias da="direnv allow" | |
alias ..='cd ..' |
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
# ~/.bash_logout | |
# when leaving the console clear the screen to increase privacy | |
if [ "$SHLVL" = 1 ]; then | |
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q | |
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
#!/usr/bin/env ruby | |
require 'thor' | |
require 'readline' | |
begin | |
require 'tracker_api' | |
rescue LoadError | |
puts 'Please install the tracker_api gem.' | |
puts 'Exiting ...' |
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 | |
echo "-------------------------------" | |
echo "Starting user-data execution..." | |
echo "-------------------------------" | |
cd /root | |
# | |
# Setup swap for better performance |
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
### Keybase proof | |
I hereby claim: | |
* I am edjames on github. | |
* I am grokling (https://keybase.io/grokling) on keybase. | |
* I have a public key whose fingerprint is 8186 635A FD92 0FFF 896F D1B8 A55F 2A0A 4CF6 1080 | |
To claim this, I am signing this object: |
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
class MultiCache | |
include Singleton | |
attr_reader :rails_cache, :custom_cache | |
def initialize | |
@rails_cache = Rails.cache | |
@custom_cache = ActiveSupport::Cache::MemCacheStore.new( | |
'your-cache-ip-address', :namespace => 'rails4-namespace') | |
end |
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
# .memcached-dump.macdots_function | |
# mac-dots custom function | |
# requires mac-dots version >= 0.7.5 | |
# https://gist.github.com/edjames/9d5681d608b302dba855 | |
# Usage: | |
# $> memcached-dump | |
memcached-dump() { |
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
gource -1280x720 -o - --title "VZ-APP" --hide date,filenames,mouse --start-date '2014-08-01 00:00:01' --disable-bloom --logo app/assets/images/homepage/play_symbol.png --auto-skip-seconds 1 --seconds-per-day 0.25 --start-position 0.7 --font-size 6 | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4 | |
gource -768x540 -o - --title "VZ-APP" --start-date '2014-08-01 00:00:01' --disable-bloom --logo app/assets/images/homepage/play_symbol.png --auto-skip-seconds 1 --seconds-per-day 0.5 --font-size 6 | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4 | |
hide options: bloom,date,dirnames,files,filenames,mouse,progress,tree,users,usernames | |
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
upstream app { | |
server unix:/srv/app/current/tmp/sockets/unicorn.sock fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name www.app.com; | |
rewrite ^/(.*) http://app.com/$1 permanent; | |
} | |
server { |
NewerOlder