Skip to content

Instantly share code, notes, and snippets.

Working from home

Alex Coles myabc

Working from home
View GitHub Profile
myabc / gist:6230490
Last active Dec 21, 2015
JRubyConf EU Menu for 15 August
View gist:6230490

Vorspeisen & Salate


Sigara böreği & Tsatsiki (gefüllte Teigrolle mit Schafskäse & Petersilie)

Pochierter Spinat in Joghurt (mit Zwiebeln und Joghurt Knoblauch Dipp)

Käse Platte mit verschiedenen hausgemachten Käsepasten

myabc / gist:6229824
Created Aug 14, 2013
JRubyConf EU Menu for 14 August
View gist:6229824

Vorspeisen & Salate


Falafel & Humus (vegan) (frittiertes Kichererbsenpuree mit Humus)

Gegrilltes Gemüse in Joghurt (Zucchini, rote und gelbe Paprika mit Joghurt Knoblauch Dipp)

Käse Platte mit verschiedenen hausgemachten Käsepasten

View compass_patch.rb
# config/initializers/compass_patch.rb
module Compass::SassExtensions::Functions::Sprites
# Returns boolean if sprite has the selector
def sprite_has_selector(map, sprite, selector)
sprite = convert_sprite_name(sprite)
verify_map map
verify_sprite sprite
unless VALID_SELECTORS.include?(selector.value)
raise Sass::SyntaxError, "Invalid Selctor did you mean one of: #{VALID_SELECTORS.join(', ')}"
myabc / gist:3748905
Created Sep 19, 2012 — forked from gnunicorn/gist:3748738
Git for Beginners: Call for Coaches
View gist:3748905

The OpenTechSchool has set up and hosted a few tech workshops and meetups here in Berlin now. Aside from the monthly Beginners Meetup and hosting the Udacity Global Meetup we hosted workshops for program beginners in Python and Javascript on our own and on the premise of CampusParty.

One thing that was extraordinary popular on CampusParty was the Workshop on Git for beginners. And we decided to do it again, this time with a closer focus on version control as a major benefit in code sharing (by using git and github) for beginners - free of charge.

So if you are interested in

View Rakefile
task :java_compile do
# Pick the right class path, depending if we're using an rvm installed JRuby
jruby_cpath = ENV['MY_RUBY_HOME'] || ENV['JRUBY_HOME']
raise 'MY_RUBY_HOME or JRUBY_HOME are not set' unless jruby_cpath
puts 'Doing a simple compilation'
sh %(javac -source 1.6 -target 1.6 -cp #{jruby_cpath}/lib/jruby.jar java/**/*.java)
mkdir_p '../lib/jrubytesting'
sh %(jar cf ../lib/jrubytesting/test_jruby_library.jar -C java jrubytesting/TestJrubyLibraryService.class)
View illegal_nesting.haml
function write_script() {
document.write('\x3Cscript type="text/javascript" src="foo.js">\x3C/script>');
View gist:2126969
function local_gemfile_on()
export BUNDLE_GEMFILE='Gemfile.local'; echo "Gemfile.local is being used…"
function local_gemfile_off()
unset BUNDLE_GEMFILE; echo "Gemfile is being used…"
myabc / ice_nine.rb
Created Mar 18, 2012
Spike: Extensible Deep Freeze
View ice_nine.rb
# I didn't want to monkey patch #deep_freeze into core classes, plus I wanted
# to have a way to easily add new classes without modifying a case statement or
# similar. Plus I wanted a way for people to be able to specify exceptions for
# their own classes without patching mine.
module IceNine
def self.deep_freeze(object)
return object if object.frozen?
f = Freezer[]
View bundler_tasks.rake
namespace :bundle do
def with_gemfile(gemfile)
old_gemfile = ENV['BUNDLE_GEMFILE']
ENV['BUNDLE_GEMFILE'] = old_gemfile
task :install do
`bundle install`

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.