Skip to content

Instantly share code, notes, and snippets.

@tobiashm
tobiashm / contrast-color.gemspec
Last active March 24, 2024 01:03
contrast-color for SASS
Gem::Specification.new do |spec|
spec.name = 'contrast-color'
spec.version = '0.1.1'
spec.platform = Gem::Platform::RUBY
spec.author = 'Tobias H. Michaelsen'
spec.email = 'tobias.michaelsen@gmail.com'
spec.summary = 'Generate contrast colors in SASS'
spec.description = 'A simple extension to SASS that alows you to calculate colors that conforms to WAI and WCAG20 contrast requirements.'
spec.homepage = 'https://gist.github.com/243103'
spec.license = 'MIT'
@seangaffney
seangaffney / .bash_alias
Created July 25, 2011 15:24
HAWTEST BASH PROFILE EVAR
alias lls='ls -lha'
alias ~='cd ~'
alias reload="source ~/.bash_profile"
alias pyserver="python -m SimpleHTTPServer"
# Projects
alias cdb1="cd ~/Sites/blah1"
alias cdb2="cd ~/Sites/blah2"
@chriseppstein
chriseppstein / readme.md
Created August 31, 2011 21:57 — forked from mislav/Gemfile
How to integrate Compass with Rails 3.1 asset pipeline

This gist is no longer valid. Please see Compass-Rails for instructions on how to install.

@chriseppstein
chriseppstein / 0_selector_hacks.scss
Created September 14, 2011 04:27
This gist demonstrates some uses of the new sass feature: Passing content blocks to mixins.
@mixin ie6 { * html & { @content } }
#logo {
background-image: url("/images/logo.png");
@include ie6 { background-image: url("/images/logo.gif"); }
}
@watson
watson / ability.rb
Created October 5, 2011 09:50
Active Admin CanCan integration with shared front/backend User model and multi-level autherization
# app/models/ability.rb
# All front end users are authorized using this class
class Ability
include CanCan::Ability
def initialize(user)
user ||= User.new
can :read, :all
@jgv
jgv / gist:1502777
Created December 20, 2011 19:03 — forked from trevorturk/gist:34895
Allow "uploads via url" with Rails and Paperclip
#
# See also: http://almosteffortless.com/2008/12/11/easy-upload-via-url-with-paperclip/
#
# Allow "uploads via url" with Rails and Paperclip
#
# http://www.thoughtbot.com/projects/paperclip
# http://github.com/thoughtbot/paperclip/tree/master
# http://groups.google.com/group/paperclip-plugin/browse_thread/thread/456401eb93135095
#
# This example is designed to work with a "Photo" model that has an "Image" attachment
@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
@ryanwood
ryanwood / postgresql.rb
Created December 30, 2011 14:54
Postgres 8.4.6 Homebrew forumula
require 'formula'
require 'hardware'
class Postgresql < Formula
homepage 'http://www.postgresql.org/'
url 'http://ftp2.uk.postgresql.org/sites/ftp.postgresql.org/source/v8.4.6/postgresql-8.4.6.tar.bz2'
md5 'fcc3daaf2292fa6bf1185ec45e512db6'
depends_on 'readline'
depends_on 'libxml2' if MACOS_VERSION < 10.6 # Leopard libxml is too old
@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
#