Skip to content

Instantly share code, notes, and snippets.

@pfarino
pfarino / SassMeister-input.scss
Last active September 25, 2015 15:38
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
// Spacing Mixins
// --------------------------------------------------
$orientation_list: (
v,
h,
a
@cbfrance
cbfrance / config.rb
Created December 19, 2012 01:21
example compass configuration
require "susy" # how to require this in bowerbird?
require "logger" # custom logger with pass/fail
require "pry"
require "rake" # for filelist
require "modular-scale" #for ratios
drupal_dir = "drupal"
themes_dir = "sites/all/themes/"
extensions_dir = "bowerbird/extensions/"
bowerbird_extension_dir = "bowerbird/"
@larrybotha
larrybotha / _px-and-rem.scss
Last active April 9, 2018 16:50
Sass mixin - rems with px fallback
// This mixin outputs a property with rem units and a px fallback.
// Values passed without units are used as multipliers for the final
// rem and px values, all other units are output without modification.
// $base-font-size represents the root value of the document font-size
// in pixels.
//
// i.e. html { font-size: 100%;} // -> 16px
// Usage:
// @include px-and-rem([property], [multiplier | explicit value] [, ...]);
anonymous
anonymous / index.html
Created October 11, 2012 19:28
You can switch the order of elements using the magical powers of CSS's table properties. Jeremy Keith wrote about this technique, and you can check out a demo on JSBin.
<!--Pattern HTML-->
<div id="pattern" class="pattern">
<div class="t">
<div class="main" role="main">
<h2>Main Content (first in source order)</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi et eros ac neque pharetra tristique nec vel risus. Maecenas nec augue elit, vitae tincidunt lorem. Vivamus porta ultrices convallis. In tempor varius pulvinar. Etiam mattis nunc id risus suscipit non tincidunt nisi mattis. Nunc in lobortis risus. Phasellus et ante vitae tellus commodo pellentesque. Etiam vitae nisl tellus. Integer diam nulla, commodo eu mattis nec, ullamcorper sit amet arcu. Curabitur pellentesque commodo enim et imperdiet. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec a sapien nunc.
the </p>
</div>
<nav class="nav" role="navigation">
@trey
trey / happy_git_on_osx.md
Last active March 10, 2025 23:53
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"

git config --global user.email "[email protected]"

@mshafrir
mshafrir / states_hash.json
Created May 9, 2012 17:05
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
@timkelty
timkelty / config.rb
Created January 11, 2012 15:28
Compass config.rb
# Note that while this file is in our config folder, it is
# symlinked to our site folders, so paths are relative from there
# Require gems and Compass plugins
# require 'rgbapng'
# require 'compass-fancybox-plugin'
require 'compass-growl'
# General
output_style = :expanded
@necolas
necolas / README.md
Last active March 28, 2024 20:34
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
@olivierlacan
olivierlacan / launch_sublime_from_terminal.markdown
Created September 5, 2011 15:50
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@founddrama
founddrama / gist:1013614
Created June 8, 2011 01:42
a jshint pre-commit hook for git
#!/bin/sh
# A pre-commit hook for git to lint JavaScript files with jshint
# @see https://github.com/jshint/jshint/
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904