Skip to content

Instantly share code, notes, and snippets.

View jeffbyrnes's full-sized avatar

Jeff Byrnes jeffbyrnes

View GitHub Profile
@pshima
pshima / unicorn.conf
Created December 15, 2011 07:03
Unicorn logrotate
/path/to/unicorn/log/unicorn.stderr.log
/path/to/production/log/production.log
{
daily
missingok
rotate 180
compress
dateext
# this is important if using "compress" since we need to call
@adarowski
adarowski / gist:1229764
Created September 20, 2011 17:45
box_gradient
Write this mixin once:
@mixin box_gradient($start, $end)
background-color: $start
background-image: -webkit-gradient(linear, left top, left bottom, from($start), to($end))
background-image: -webkit-linear-gradient(top, $start, $end)
background-image: -moz-linear-gradient(top, $start, $end)
background-image: -ms-linear-gradient(top, $start, $end)
background-image: -o-linear-gradient(top, $start, $end)
background-image: linear-gradient(top, $start, $end)
@aronwoost
aronwoost / README.md
Created July 25, 2011 19:46
How to install LAMP on a EC2 Amazon AMI

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages

#!/usr/bin/env sh
#configurables
DBINSTANCE="yourdbinstanceID"
ENDPOINT="XXXXXXXXXXXX.us-east-1.rds.amazonaws.com"
USER='yourUser'
PASSWD='yourPassword'
DB1="yourDatabase1 yourDatabase2"
BUCKET='s3://your-bucket'
BACKUP_HOME='/mnt/backups'

Objective-C Coding Convention and Best Practices

Most of these guidelines are to match Apple's documentation and community-accepted best practices. Some are derived some personal preference. This document aims to set a standard way of doing things so everyone can do things the same way. If there is something you are not particularly fond of, it is encouraged to do it anyway to be consistent with everyone else.

This document is mainly targeted toward iOS development, but definitely applies to Mac as well.

Operators

NSString *foo = @"bar";
@rafi
rafi / post-receive
Created March 25, 2010 19:34
Deploying with Git
mkdir ~/git/website.git && ~/git/cd website.git
git init --bare
mkdir ~/webapps/website
git config core.bare false
git config core.worktree /home/rafi/webapps/website ; NO TRAILING SLASH!!! Will screw up things real bad.
git config receive.denycurrentbranch ignore
; create a hook
cat > hooks/post-receive
#!/bin/sh
# --------------------------------------------
# General
# --------------------------------------------
set :shared_children, %w(cache logs) # Shared directories, these directories contain generated content which should not be wiped out during deployments.
set :application, "domain.com" # Application name
set :deploy_to, "/var/www/#{application}/#{stage}" # Path where files are deployed to ...
# --------------------------------------------
# Server
# --------------------------------------------
@bcardarella
bcardarella / .bash_profile
Created February 4, 2009 22:25
Git Autocompletion
source ~/.git-completion.sh
alias gco='git co'
alias gci='git ci'
alias grb='git rb'