Skip to content

Instantly share code, notes, and snippets.

View digitalhobbit's full-sized avatar

Mirko Froehlich digitalhobbit

View GitHub Profile
@josegonzalez
josegonzalez / category.rb
Created August 14, 2010 21:41
Category plugin for Jekyll
module Jekyll
class CategoryIndex < Page
def initialize(site, base, dir, category)
@site = site
@base = base
@dir = dir
@name = 'index.html'
self.process(@name)
self.read_yaml(File.join(base, '_layouts'), 'category_index.html')
def top_redirect_to(path)
render :layout => false, :partial => "shared/top_redirect", :object => path
end
%html
%head
%noscript
%meta{ "http-equiv" => "refresh", :content => "0;url=#{top_redirect}" }/
%meta{ "http-equiv" => "window-target", :content => "_top" }/
:javascript
@jamis
jamis / kruskals.rb
Created December 28, 2010 04:16
An implementation of Kruskal's algorithm for generating mazes.
# --------------------------------------------------------------------
# An implementation of Kruskal's algorithm for generating mazes.
# Fairly expensive, memory-wise, as it requires memory proportional
# to the size of the entire maze, and it's not the fastest of the
# algorithms (what with all the set and edge management is has to
# do). Also, the mazes it generates tend to have a lot of very short
# dead-ends, giving the maze a kind of "spiky" look.
# --------------------------------------------------------------------
# NOTE: the display routine used in this script requires a terminal
# that supports ANSI escape sequences. Windows users, sorry. :(
@bryanl
bryanl / campfire-emoji.txt
Created January 27, 2011 16:34
campfire emoji
Surround these with : e.g. :calling:
+1
-1
bulb
calling
clap
cop
email
feet
@lucascaton
lucascaton / rvm-ree.log
Created July 22, 2011 00:14
Segmentation fault in (RVM) REE installation
It looks like the source is already configured.
Skipping configure script...
/usr/bin/gcc -dynamiclib system_allocator.c -install_name @rpath/libsystem_allocator.dylib -o libsystem_allocator.dylib
mkdir -p .ext/common
make PREINCFLAGS='-I/opt/local/include' PRELIBS='-L/opt/local/lib -Wl,-rpath,/Users/caton/.rvm/rubies/ree-1.8.7-2011.03/lib -L/Users/caton/.rvm/rubies/ree-1.8.7-2011.03/lib -lsystem_allocator'
./ext/purelib.rb:2: [BUG] Segmentation fault