I. Create a Middleman project with middleman-ember-template
$ middleman init hello --template=ember
II. Install ember.js package
$ bower install ember
| #!/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 |
| .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; | |
| } |
| # conference config | |
| conferences: | |
| conference1: { | |
| name: Conference 1 Wow!, | |
| date: Jan 1-6 2013 | |
| } | |
| conference2: { | |
| name: Conference 2 Neato!!, | |
| date: Dec 15-20 2013 | |
| } |
| // 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="); |
| namespace :tasks do | |
| namespace :create do | |
| desc "Create all survey templates" | |
| task :all => [:task1, :task2, :task3] | |
| desc "desc1" | |
| task :task1 => :environment do | |
| end |
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 |
| #!/bin/bash | |
| mkdir -p ~/.ssh | |
| # generate new personal ed25519 ssh keys | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>" | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>" | |
| # generate new host cert authority (host_ca) ed25519 ssh key | |
| # used for signing host keys and creating host certs |
In addition to the techniques described in the
Asynchronous Routing Guide,
the Ember Router provides powerful yet overridable
conventions for customizing asynchronous transitions
between routes by making use of error and loading
substates.
| # activerecord-3.0.0/lib/active_record/connection_adapters/mysql_adapter.rb | |
| # Maps logical Rails types to MySQL-specific data types. | |
| def type_to_sql(type, limit = nil, precision = nil, scale = nil) | |
| return super unless type.to_s == 'integer' | |
| case limit | |
| when 1; 'tinyint' | |
| when 2; 'smallint' | |
| when 3; 'mediumint' | |
| when nil, 4, 11; 'int(11)' # compatibility with MySQL default |