Skip to content

Instantly share code, notes, and snippets.

View chriskottom's full-sized avatar
😁
Hustlin'

Chris Kottom chriskottom

😁
Hustlin'
View GitHub Profile
@chriskottom
chriskottom / .gitignore for Rails projects
Created September 5, 2009 07:30
.gitignore for Rails projects
*~
\#*\#
*.cache
*.log
*.pid
.bundle
.sass-cache/
config/database.yml
db/*.sqlite3
doc/api
require 'nokogiri'
require 'pstore'
#
# Rack::DomainSprinkler
#
# Modifies outgoing HTML markup so that common static assets like script source
# files, images, and stylesheets will be served from one of a number of domains
# rather than just a single one in order to improve parallelization of resource
@chriskottom
chriskottom / ruby_uninstall.sh
Created October 7, 2010 13:42
Complete uninstall of Ruby and all dependencies
#!/bin/bash
#
# ruby_uninstall.sh
# A Bash script for complete tear-down of my Ruby development environment.
# The script is custom made for my own personal configuration.
# - Removal of RVM artifacts stored under my home directory
# - Single base instance of Ruby installed from source under $PREFIX
# - Removal of executables for libraries and gems in my environment
#
@chriskottom
chriskottom / ruby_install.sh
Created October 7, 2010 16:54
Bash script to install Ruby with RVM and selected dependencies on my system
#!/bin/bash
#
# ruby_install.sh
# A simple Bash script for building up my Ruby development environment on a clean system.
# The configuration used is the one that I like.
# - Base system Ruby = version 1.9.2
# - Ruby installed from source
# - Installation of RVM + Rubies
# - Configuration of gemset for local instance of Passenger
@chriskottom
chriskottom / admin-cleanup.rake
Created November 13, 2010 13:19
simple Rake task for cleanup of Rails directory
namespace :admin do
desc "Clean up all temporary files in the application directory"
task :cleanup, :needs => :environment do
puts "Removing temporary directory contents"
tmp_files = []
%w{ cache pids sessions sockets }.each do |dir|
tmp_files += Dir.glob( File.join(Rails.root, "tmp", dir, "*") )
end
File.delete(*tmp_files)
@chriskottom
chriskottom / reset.css
Created April 19, 2011 07:30
A simple CSS stylesheet that I use for browser default resets
/* -------- CSS RESET -------- */
body, html, div, blockquote, img, label, p, h1, h2, h3, h4, h5, h6,
pre, ul, ol, li, dl, dt, dd, form, a, fieldset, th, td {
margin: 0;
padding: 0;
border: 0;
outline: none;
}
body {
line-height: 1;
@chriskottom
chriskottom / base.css
Created April 19, 2011 07:32
A simple CSS stylesheet that I use to create some sane default settings after reset
/* -------- BASE STYLES -------- */
html, body {
height: 100%;
}
h1 { font-size: 2em; }
h2 { font-size: 1.5em }
h3 { font-size: 1.17em }
h4 { font-size: 1em }
h5 { font-size: .83em }
h6 { font-size: .67em }
@chriskottom
chriskottom / application.html.haml
Created April 19, 2011 12:49
A HAML-based replacement for the standard Rails layout template
!!! 5
%html
%head
= stylesheet_link_tag "reset", "base", "formtastic", "formtastic_changes", "application", :cache => "apprequest"
= javascript_include_tag :defaults
= csrf_meta_tag
%title= content_for(:title).empty? ? app_name : "#{ content_for(:title) } | #{ app_name }"
%body{ :class => content_for(:body_class) }
#wrap
#header
@chriskottom
chriskottom / gist:6248150
Last active December 21, 2015 04:18 — forked from elefontpress/gist:6159651
Hourly contract template

Hourly Contract

Date: [[Date of Document]] Between [Our Company] and [Your Company]

Summary

This document forms the basis for collaboration between [Our Company] (hereafter, "Provider") and [Your Company] (hereafter, "Customer"). In this contract you won’t find complicated legal terms or large passages of unreadable text. It is intentionally written in plan language in order to be understandable and protect the interests of both parties, now and in the future.

@chriskottom
chriskottom / deploy.rb
Created September 10, 2013 09:23
A simplified Capistrano recipe for deployment of static websites from a local directory
set :application, 'Example' # the name of your app
set :location, 'example.com' # server address
set :user, 'deploy' # remote user (unprivileged deployment user)
set :group, 'www-data' # remote group (should be the group your web server runs as)
set :use_sudo, false
set :scm, 'none'
set :deploy_via, :copy
set :repository, '.'
set :deploy_to, '/var/www/example'