Skip to content

Instantly share code, notes, and snippets.

@emilebosch
emilebosch / applicaitnhelper.rb
Created October 21, 2014 23:21
Make it possibe to have jade style mixins in slim http://jade-lang.com/reference/mixins/
def mixin(name, &block)
@mixins ||= {}
@mixins[name] = block
method = %{
def #{name}(*args, &block)
call_mixin(:#{name}, *args, &block)
end
}
eval(method)
@cognitom
cognitom / gulpfile.coffee
Created May 10, 2014 07:47
gulpfile example to integrate with Rails
gulp = require 'gulp'
π = plugins = (require 'gulp-load-plugins')()
# Directories
CSSDIR = './app/assets/stylesheets'
JSDIR = './app/assets/javascripts'
FONTDIR = './app/assets/fonts'
# CSS
gulp.task 'css', ->