Skip to content

Instantly share code, notes, and snippets.

@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@baroquebobcat
baroquebobcat / note.md
Created September 2, 2011 17:02
Upgrading from rails 3.1.0.rc to final notes

Asset Pipeline changes

There's a manifest it has a bug rails/rails#2772, which means if you use config.assets.prefix, you need to add config.assets.manifest = false to your config/application.rb.

Also, there is a new default in the production environment template.

   config.assets.digest=true

Without that, precompiled assets won't work correctly all the time.

# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
if ARGV.grep(/rubber:/).empty?
require File.expand_path('../config/application', __FILE__)
@madrobby
madrobby / everytimezone.coffee
Created April 17, 2011 13:36
First conversion of http://everytimezone.com/ JavaScript code to CoffeeScript
# Two things are important to note:
#
# 1) The code is fugly, because it was a JavaScript/iPad experiment.
# I know that it is ugly, so pretty please don't comment on that part.
# 2) I tried to use as many CoffeeScript features as possible,
# including but not limited to list comprehensions,
# heredocs, destructuring assignment and also the "do" operator
#
# I welcome comments about stuff that is not CoffeeScripty enough, or what I should
# write differently.
@o-sam-o
o-sam-o / Shell Commands Cheetsheet
Created March 19, 2011 02:05
Cheatsheet for shell commands that i want to remember
# Setup dir so changes to a ruby version and gemset on entry
rvm --rvmrc --create <ruby>@<gemset>
# Backup a mysql database
mysqldump -u [username] -p [databasename] > [backupfile.sql]
# Stop mac from sleeping
pmset noidle
# Strip quotes around digits in VIM
@croaky
croaky / .ackrc
Created November 25, 2009 03:21
mostly for the ability to ack cucumber feature files
--type-add=ruby=.haml,.rake,.rsel,.builder
--type-add=html=.html.erb,.html.haml
--type-add=js=.js.erb
--type-add=css=.sass
--type-set=cucumber=.feature
--ignore-dir=vendor
--ignore-dir=log
--ignore-dir=tmp
--ignore-dir=doc
--ignore-dir=coverage
@raggi
raggi / alias_task.rake
Created November 12, 2009 15:11
A helper to alias a task in rake
def alias_task(name, old_name)
t = Rake::Task[old_name]
desc t.full_comment if t.full_comment
task name, *t.arg_names do |_, args|
# values_at is broken on Rake::TaskArguments
args = t.arg_names.map { |a| args[a] }
t.invoke(args)
end
end