Skip to content

Instantly share code, notes, and snippets.

View bj-mcduck's full-sized avatar

BJ McDuck bj-mcduck

View GitHub Profile
module DependencySupport
def self.included(base)
base.extend(ClassMethods)
end
# Substitutes a give dependency with a provided value
# will raise an exception if a provided dependency is missing
# @param [Sumbol] dependency_name
# @param [*] value
@stevehanson
stevehanson / emblem_to_hbs.rb
Last active February 22, 2019 21:54
Convert all project Emblem files to handlebars
class EmblemToHbs
def convert
Dir.glob("**/*.emblem").each do |file|
convert_file(file)
end
end
def convert_file(file)
`emblem2hbs #{file}`
File.delete(file)
@jwahdatehagh
jwahdatehagh / easy-forms.js
Created January 11, 2015 18:28
ember-cli EasyForms initializer for Ember#1.9.1 & handlebars#2.0
import Ember from 'ember';
// ==========================================================================
// Project: Ember EasyForm
// Copyright: Copyright 2013 DockYard, LLC. and contributors.
// License: Licensed under MIT license (see license.js)
// ==========================================================================
// Version: 1.0.0.beta.1
@potch
potch / example.html
Created January 26, 2012 18:42
TextMate command to smart-wrap a line to 78 chars, accounting for indent.
<!-- before -->
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<!-- after -->
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea