Skip to content

Instantly share code, notes, and snippets.

@averyvery
averyvery / development.rb
Created April 18, 2014 15:28
Testing Rails precompilation in development environment
# just add these lines to development.rb
config.assets.debug = false
config.serve_static_assets = true
config.assets.js_compressor = :uglifier
config.assets.digest = true
# then on the command line
rake assets:precompile && rails s
@aseemk
aseemk / coffeescript-updates.md
Last active December 2, 2017 20:22
CoffeeScript upcoming changes.

CoffeeScript 1.7 is shaping up to be a pretty kick-ass release with significant improvements. Here are the ones I'm most excited about, in order of my own excitement.

Parentheses-free chaining

jashkenas/coffeescript#3263

Years of being wished for, finally granted!

@jgarber623
jgarber623 / _layout.php
Created May 1, 2012 15:21
Basic layout/view-style templating with PHP
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><?php echo $page_title; ?></title>
</head>
<body>
<?php echo $content_for_layout; ?>
@ten1seven
ten1seven / gist:2490271
Created April 25, 2012 14:44
JavaScript Namespace
var JS = JS || {};
JS.Global = (function(window,document,undefined) {
'use strict';
var private_var;
function private_method() {
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@greypants
greypants / grid.scss
Created February 25, 2012 21:24
SCSS: Basic SCSS Grid System
/* @group SCSS Grid */
$column-width: 45px;
$gutter-width: 16px;
@mixin col-width($span){
width: ($column-width + $gutter-width) * $span - $gutter-width;
}
@mixin col-offset($span){
@davist11
davist11 / gist:1204569
Last active January 19, 2024 15:03
Campfire sounds
56k: "https://123.campfirenow.com/images/56k.gif"
bell: ":bell:"
bezos: ":laughing::thought_balloon:"
bueller: "anyone?"
butts: ":open_hands: :smoking:"
clowntown: "https://123.campfirenow.com/images/clowntown.gif"
cottoneyejoe: ":notes::hear_no_evil::notes:"
crickets: "hears crickets chirping"
dadgummit: "dad gummit!! :fishing_pole_and_fish:"
dangerzone: "https://123.campfirenow.com/images/dangerzone.png"
gem 'sass-rails', :git => 'https://github.com/rails/sass-rails.git', :ref => '031236b31eaf20658226a9ae051749cc6647c33f'
gem 'compass', :git => 'https://github.com/chriseppstein/compass.git', :ref => '2c1fcfcad708875d10db65740aabf417abc636a6'
gem 'sprockets', '2.0.0.beta.10'