I. Create a Middleman project with middleman-ember-template
$ middleman init hello --template=ember
II. Install ember.js package
$ bower install ember
| module FullErrorMessages | |
| extend ActiveSupport::Concern | |
| # includes errors on this model as well as any nested models | |
| def all_error_messages | |
| messages = self.errors.messages.dup | |
| messages.each do |column, errors| | |
| if self.respond_to?(:"#{column}_attributes=") && (resource = self.send(column)) | |
| messages[column] = resource.errors.messages | |
| end |
I. Create a Middleman project with middleman-ember-template
$ middleman init hello --template=ember
II. Install ember.js package
$ bower install ember
| namespace :tasks do | |
| namespace :create do | |
| desc "Create all survey templates" | |
| task :all => [:task1, :task2, :task3] | |
| desc "desc1" | |
| task :task1 => :environment do | |
| end |
| // REQUIRES: | |
| // http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js | |
| // http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js | |
| // Based on: https://gist.github.com/1395926 | |
| $(document).ready(function() { | |
| $('.gist').each(function(i) { | |
| var file_separator = $(this).text().indexOf('#'); | |
| if (file_separator != -1) { | |
| var gist_url = $(this).text().slice(0, file_separator); | |
| var gist_file = $(this).text().slice(file_separator).replace("#file_", "?file="); |
| # conference config | |
| conferences: | |
| conference1: { | |
| name: Conference 1 Wow!, | |
| date: Jan 1-6 2013 | |
| } | |
| conference2: { | |
| name: Conference 2 Neato!!, | |
| date: Dec 15-20 2013 | |
| } |
| .blackAlpha50 { | |
| *zoom: 1; | |
| filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#80000000', endColorstr='#80000000'); | |
| background: transparent; | |
| background: rgba(0, 0, 0, 0.5); | |
| } | |
| :root .blackAlpha50 { | |
| filter: none\0/IE9; | |
| } |
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| #!/bin/sh | |
| # | |
| # Automatically adds branch name and branch description to every commit message. | |
| # | |
| NAME=$(git branch | grep '*' | sed 's/* //') | |
| DESCRIPTION=$(git config branch."$NAME".description) | |
| TEXT=$(cat "$1" | sed '/^#.*/d') | |
| if [ -n "$TEXT" ] | |
| then |
| #!/usr/bin/env bash | |
| uninstall() { | |
| list=`gem list --no-versions` | |
| for gem in $list; do | |
| gem uninstall $gem -aIx | |
| done | |
| gem list | |
| gem install bundler | |
| } |