Skip to content

Instantly share code, notes, and snippets.

View sixfeetover's full-sized avatar

Jeff Fraser sixfeetover

View GitHub Profile
@color_tu: #024769;
@color_te: #95CBE9;
@color_ae: #FF9900;
@color_au: #B02B02;
@color_im: #757575;
@border_color: #ddd;
@background_grey: #eee;
body { overflow-y: scroll; }
table { border-collapse: collapse; }
# When using Less (via More) for your rails app, this watches your app/stylesheets
# directory for changes and compiles all the .less files.
require 'watchr'
watch('app/stylesheets/*') { system('rake more:parse') }
# Development mode reloading
class Sinatra::Reloader < Rack::Reloader
def safe_load(file, mtime, stderr = $stderr)
if file == __FILE__
::Sinatra::Application.reset!
stderr.puts "#{self.class}: reseting routes"
end
super
end
end
/usr/lib/ruby1.9.1/gems/1.9.1/gems/railties-3.0.0.beta/bin/rails:2:in `exec': Permission denied - /home/jeff/Dropbox/path/to/script/rails (Errno::EACCES)
from /usr/lib/ruby1.9.1/gems/1.9.1/gems/railties-3.0.0.beta/bin/rails:2:in `<top (required)>'
from /usr/bin/rails:19:in `load'
from /usr/bin/rails:19:in `<main>'
@sixfeetover
sixfeetover / osx_homebrew_rvm_rails_unixodbc_sqlserver.md
Created September 4, 2010 19:49
Setup OS X 10.6.4 w/ homebrew, rvm, rails, unixodbc, freetds and SQL Server

Setup new mac from scratch

These commands are good as of 2010-11-18.

/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

Install xcode (download, or on the OS X install DVD)

http://developer.apple.com/technology/xcode.html
#! /bin/sh
# Description: Startup script for nginx webserver on Debian. Place in /etc/init.d and
# run 'sudo update-rc.d nginx defaults', or use the appropriate command on your
# distro.
#
# Author: Ryan Norbauer <ryan.norbauer@gmail.com>
# Modified: Geoffrey Grosenbach http://topfunky.com
set -e
@sixfeetover
sixfeetover / setup_continued.md
Created January 21, 2011 16:39
Setup ruby/rvm/rails on a fresh ubuntu system
# Log in, change password
passwd
# Add deploy user
adduser deploy
# Add user to sudoers
visudo
# Update apt packages and upgrade installed packages
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid
@sixfeetover
sixfeetover / syntax_highlighting.py
Created November 4, 2011 16:04 — forked from JeanMertz/syntax_highlighting.py
Ruby on Rails syntax highlight switcher for Sublime Text 2
import sublime, sublime_plugin
import os
class DetectFileTypeCommand(sublime_plugin.EventListener):
""" Detects current file type if the file's extension isn't conclusive """
""" Modified for Ruby on Rails and Sublime Text 2 """
""" Original pastie here: http://pastie.org/private/kz8gtts0cjcvkec0d4quqa """
def on_load(self, view):
filename = view.file_name()
# put this in lib
module Merb
module PartsMixin
# Dispatches a PartController.
# ==== Parameters
# opts<Hash>:: A Hash of Options. (see below)
#
# ==== Options
# An option hash has two parts.