Skip to content

Instantly share code, notes, and snippets.

View switchspan's full-sized avatar

Ken Taylor switchspan

View GitHub Profile
@switchspan
switchspan / IE10_pie_notes.md
Created August 18, 2013 15:36
NOTES: IE10 css border-image hack

IE 10 CSS Border Hack

border-image

Option 1 (Fall back)

From Microsoft Blog and html5please:
Internet Explorer 10 doesn’t include support for CSS border-image. To preserve the layout of your page, a best practice is to specify a solid border-style fallback so border widths, padding, and margin are preserved. (If IE doesn’t find a supported border type, it will discard those values.) For example:

Before:

@switchspan
switchspan / Gemfile
Created July 27, 2013 19:52
RAILS: Test Gist
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
gem 'uglifier', '>= 1.0.3'
# Add Foundation Here
gem 'compass-rails' # you need this or you get an err

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev

@switchspan
switchspan / gist:5536508
Created May 7, 2013 21:58
Partition function - James Edward Gray II's ruby implementation
# The partition (combinatoric partition theory) function for a given number
def partition(largest, rest = Array.new, &block)
block.call([largest] + rest)
(rest.first || 1).upto(largest / 2) do |i|
partition(largest - i, [i] + rest, &block)
end
end
# call the partition function with "5" as a test
partition(5) { |nums| p nums if nums[0] != 5 }