Skip to content

Instantly share code, notes, and snippets.

// Clamps a block of text to a certain number of lines,
// followed by an ellipsis in Webkit and Blink based browsers
// Reference: http://dropshado.ws/post/1015351370/webkit-line-clamp
@mixin text-clamp($lines: 2, $line-height: false) {
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: $lines;
// Fallback for non-Webkit browsers
@niels
niels / Gemfile
Created April 5, 2013 14:07
Working Rails 4 w/ Compass
source "https://rubygems.org"
gem "devise", git: "git://github.com/plataformatec/devise.git", branch: "rails4"
gem "devise-i18n", "~> 0.6.5"
gem "jbuilder", "~> 1.0.1"
gem "jquery-rails"
gem "haml", "~> 4.0.1"
gem "mongoid", git: "git://github.com/mongoid/mongoid.git", branch: "master"
gem "simple_form", "~> 3.0.0.beta1"
gem "rails", "4.0.0.beta1"
@edwardhotchkiss
edwardhotchkiss / syntax.css
Created March 9, 2012 04:34 — forked from scotu/solarized.css
Solarized Light Pygments CSS / Jekyll
.highlight {
background-color: #efefef;
padding: 7px 7px 7px 10px;
border: 1px solid #ddd;
-moz-box-shadow: 3px 3px rgba(0,0,0,0.1);
-webkit-box-shadow: 3px 3px rgba(0,0,0,0.1);
box-shadow: 3px 3px rgba(0,0,0,0.1);
margin: 20px 0 20px 0;
overflow: hidden;
@benzittlau
benzittlau / Remove From Git By Extension
Created May 4, 2011 21:59
Remove all *.swp files from a git repository
git ls-files | grep '\.swp$' | xargs git rm
@banksean
banksean / mersenne-twister.js
Created February 10, 2010 16:24
a Mersenne Twister implementation in javascript. Makes up for Math.random() not letting you specify a seed value.
/*
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace
so it's better encapsulated. Now you can have multiple random number generators
and they won't stomp all over eachother's state.
If you want to use this as a substitute for Math.random(), use the random()
method like so:
var m = new MersenneTwister();