Skip to content

Instantly share code, notes, and snippets.

View shelling's full-sized avatar

shelling shelling

View GitHub Profile
# Use Jruby to read hadoop sequence files
def load_libs(libs)
Dir.glob(File.join(libs,"*.jar")).each { |f|
require f
}
end
load_libs ENV["HADOOP_HOME"]
load_libs File.join(ENV["HADOOP_HOME"], 'lib')
@shelling
shelling / load.sh
Created April 9, 2011 06:14
recursive rcfile loader
# vim: syntax=sh
#
function load {
if [ -f $1 ]; then
source $1
fi
if [ -d $1 ]; then
for file in $1/*; do
load $file
package Mojolicious::Plugin::Pipeline::CSSCompressor;
use Mojo::Base 'Mojolicious::Plugin';
use CSS::Compressor 'css_compress';
sub register {
my ($self, $app) = @_;
# Register "css_compressor" filter
$app->filter(css_compressor => sub { css_compress shift });
@gnurag
gnurag / treetop-mode.el
Created June 7, 2013 20:31
treetop-mode.el --- Major mode for editing Treetop files
;;; treetop-mode.el --- Major mode for editing Treetop files
;; Copyright (C) 1994, 1995, 1996 1997, 1998, 1999, 2000, 2001,
;; 2002,2003, 2004, 2005, 2006, 2007, 2008
;; Free Software Foundation, Inc.
;; Author: Anurag Patel
;; Adapted from original work by: Yukihiro Matsumoto, Nobuyoshi Nakada
;; URL: http://www.emacswiki.org/cgi-bin/wiki/TreetopMode
;; Created: Fri Jun 8 02:01:00 IST 2013
@mirisuzanne
mirisuzanne / reference.mkdn
Created August 22, 2011 23:34
Susy 0.9 Reference Documentation

Susy 0.9 Reference Documentation

See the official Susy site for 1.0 documentation.

Terms

  • Susy Grid: A grid that you build with Susy. You can have multiple on one page if you need.
  • Grid Element: Any HTML element that is aligned to a Susy Grid.
  • Container: The root element in a Susy Grid. Anything inside it is a potential Grid Element.
@liuwen-lvtu
liuwen-lvtu / tutorial.mkdn
Created October 18, 2011 03:19 — forked from mirisuzanne/tutorial.mkdn
A new Susy tutorial

Susy Tutorial

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

What Susy Does

CSS Systems

@fnhipster
fnhipster / html5.haml
Created April 9, 2011 01:19
HTML5 HAML Template
!!! 5
%html
%head
%title= "Your Website"
%meta{ :content => "", :name => "description" }
%meta{ :content => "", :name => "author" }
%meta{ :content => "3 days", :name => "revisit-after" }
%link{ :href => "http://creativecommons.org/licenses/by/3.0/", :rel => "license", :title => "Creative Commons Attribution 3.0 Unported License" }
%link{ :href => "/feed", :rel => "alternate", :title => "Atom", :type => "application/atom+xml" }
%link{ :href => "/css/screen.css", :media => "screen", :rel => "stylesheet" }
@hamajyotan
hamajyotan / extconf.rb
Created December 6, 2011 10:56
Data_Wrap_Struct example
require "mkmf"
$libs += " -lstdc++ "
create_makefile("human")
@konklone
konklone / Dockerfile
Created September 22, 2013 18:17
Dockerfile for installing Ruby 2.0 and RVM
FROM ubuntu
MAINTAINER Eric Mill "eric@konklone.com"
# turn on universe packages
RUN echo "deb http://archive.ubuntu.com/ubuntu raring main universe" > /etc/apt/sources.list
RUN apt-get update
# basics
RUN apt-get install -y nginx openssh-server git-core openssh-client curl
RUN apt-get install -y nano
@shelling
shelling / foreach.el
Created April 12, 2011 05:48
foreach in elisp
#!/usr/bin/env emacs --script
(require 'cl)
(defun foreach (alist func)
(while alist
(progn
(funcall func (car alist))
(setq alist (cdr alist)))
))