Skip to content

Instantly share code, notes, and snippets.

View williamdodson's full-sized avatar
🏠
Working from home

William Dodson williamdodson

🏠
Working from home
View GitHub Profile
/*
Inline-block for IE6, Firefox 2, and up
via http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block
*/
@module inline-block {
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
@williamdodson
williamdodson / README.markdown
Created August 13, 2011 13:11 — forked from ariera/README.markdown
Nestable, sortable and dragable categories

Nestable, sortable and dragable categories:

In the project I'm working on we wanted to have a Category model which we wanted to be nestable. But we also liked the user to have a draggable interface to manage and rearrange the order of his categories. So we chose awesome_nested_set for the model and jQuery.nestedSortable for the UI.

It took me some time to arrange things to work properly so I wanted to share my work in case it helps anybody.

Before beginning

you might want to take a look at a demo app

  1. go to: http://awesomenestedsortable.heroku.com/groups/
  2. click in show of any group
@williamdodson
williamdodson / gist:1163648
Created August 22, 2011 21:28 — forked from voodootikigod/gist:1155790
PyCodeConf Ticket Give-away
Day job: Owner, Outer Banks Design Works
Favorite Python project: Django
Favorite Conference: SXSW
Python Experience Level: Intermediate (enough to be dangerous)
@williamdodson
williamdodson / 320up.less
Created December 7, 2011 17:09 — forked from peterwilsoncc/320up.less
“Mobile first” CSS and getting LESS to help with legacy IE
.320up(){
.three20 {
color: #fff;
}
} /* end 320up mixin */
@williamdodson
williamdodson / install-rvm.sh
Created December 20, 2011 15:22 — forked from alanstevens/install-rvm.sh
Shell script to install rvm and rails
#!/bin/bash
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
source ~/.bash_profile
rvm install 1.9.2
rvm use 1.9.2 --default
rvm use 1.9.2@global
gem install rails --no-rdoc --no-ri
gem install bundler --no-rdoc --no-ri
@williamdodson
williamdodson / product_generator.rb
Created December 21, 2011 21:28 — forked from jpravetz/product_generator.rb
Jekyll generator to read json data file and generate product and ingredient pages
#------------------------------------------------------------------------
# encoding: utf-8
# @(#)product_generator.rb 1.00 29-Nov-2011 16:38
#
# Copyright (c) 2011 Jim Pravetz. All Rights Reserved.
# Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
#
# Description: A generator that creates product, products and
# ingredients pages for jekyll sites. Uses a JSON data
# file as the database file from which to read and

Practical Font Sizing

A demo pen based on a blog post from Harry Roberts of CSS Wizardry about Practical Font Sizing.

A Pen by William Dodson on CodePen.

License.

// strip-units required by spread mixin
// http://stackoverflow.com/questions/12328259/how-do-you-strip-the-unit-from-any-number-in-sass
@function strip-units($number)
@return $number / ($number * 0 + 1)
// pow and sqrt required by ease function
// adapted from https://github.com/at-import/Sassy-math/blob/master/sass/math.scss
@function pow($base, $exponent)
$value: $base