Skip to content

Instantly share code, notes, and snippets.

View imathis's full-sized avatar
🍽️
Hungry for biscuits.

Brandon Mathis imathis

🍽️
Hungry for biscuits.
View GitHub Profile
@imathis
imathis / _partial.markdown
Created January 9, 2012 02:22
Render Markdown partials in HTML with Octopress

{% capture partial %} bold italic link {% endcapture %}

@imathis
imathis / quiche.markdown
Created November 2, 2011 23:37
Crustless Quiche

Dependencies

  • 10 oz pkg frozen spinach, thawed, drained, chopped
  • 3 eggs
  • 12 oz cottage cheese
  • 3 TBsp flour
  • 2 TBsp butter, melted
  • 8 oz shredded cheddar cheese

Setup

@imathis
imathis / gist:1218226
Created September 15, 2011 00:37 — forked from henneonrails/gist:1217518
dot files
desc "copy dot files for deployment"
task :copydot do
exclusions = [".", "..", ".DS_Store"]
Dir["#{source_dir}/**/.*"].each do |file|
if (!File.directory?(file) && !exclusions.include?(file))
cp(file, file.gsub(/#{source_dir}/, "#{public_dir}"));
end
end
end
@imathis
imathis / gist:1211531
Created September 12, 2011 15:20
Beauty in SCSS
// SCSS
nav {
  &.top-nav { li { margin:{ top:0; left:0; }}} // some comment
}
vs.
// Sass
nav
&.top-nav
@imathis
imathis / rakefile.rb
Created August 24, 2011 21:35
Rakefile
namespace :compass do
desc "Watch Sass files with Compass"
task :watch do
system "compass watch"
end
end
namespace :jekyll do
desc "Watch #{source_dir} directory and recompile on changes"
task :auto do
@imathis
imathis / gist:1147044
Created August 15, 2011 15:51 — forked from jm/gist:1146838
Hoedown 2011 Schedule
RUBY HOEDOWN 2011
Day 1 - August 26
-----
8:00 - Registration opens
9:00 - Kickoff with The Improv Effect
10:00 - TorqueBox: A True Application Server for Ruby
@imathis
imathis / gist:1104557
Created July 25, 2011 16:49
FIX for Lion's posix_spawn_ext.bundle: [BUG] Segmentation fault

The segfault problem with posix_spawn is indeed caused by Lion's compiler being LLVM and not GCC by default. However, when I installed RVM, the notes suggested that on Lion you need to add export CC=/usr/bin/gcc-4.2 to your shell startup file (.bashrc or .zshrc as appropriate). I did that, but it seems that's what caused problems: while ruby 1.9.2 needs you to use GCC to install it, using the same compiler for the gems apparently causes breakage.

First, you need to install XCode 4.x, which is now a free (though hefty!) download from the Mac App Store. Without that, you have no gcc, so you won't get anywhere ;-)

Next, what you need to do is clear out your rvm ruby and the associated gems (make sure you are cd'd into your octopress repository then do:

rvm remove ruby-1.9.2 --gems --archive

which will clear everything out so that you can start from scratch. Obviously, if you have other stuff you've installed for other purposes using RVM, be careful with this. If you previously had the export CC li

@imathis
imathis / Pullquote.css
Created June 19, 2011 02:52
Jekyll Pullquote plugin for Octopress
.has-pullquote:before {
/* Reset metrics. */
padding: 0;
border: none;
/* Content */
content: attr(data-pullquote);
/* Pull out to the right, modular scale based margins. */
float: right;
@imathis
imathis / gist_tag.rb
Created June 15, 2011 17:58 — forked from chrisjacob/gist_tag.rb
A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers.
require 'cgi'
require 'digest/md5'
require 'net/https'
require 'uri'
module Jekyll
class GistTag < Liquid::Tag
def initialize(tag_name, text, token)
super
@text = text