This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[<% ${1:@Items}.each do |${2:item}| %> | |
$3 | |
<% end %> | |
$0]]></content> | |
<!-- Optional: Tab trigger to activate the snippet --> | |
<tabTrigger>each</tabTrigger> | |
<!-- Optional: Scope the tab trigger will be active in --> | |
<scope>text.html.ruby</scope> | |
<!-- Optional: Description to show in the menu --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
09:07 AM [~] $ traceroute emberjs.com | |
traceroute to emberjs.com (207.97.227.245), 64 hops max, 52 byte packets | |
1 192.168.1.1 (192.168.1.1) 0.755 ms 0.512 ms 0.442 ms | |
2 c-71-195-254-1.hsd1.ut.comcast.net (71.195.254.1) 31.931 ms 14.808 ms 25.852 ms | |
3 te-8-3-ur02.orem.ut.utah.comcast.net (68.87.220.241) 10.947 ms 11.851 ms 11.561 ms | |
4 te-3-3-ar02.saltlakecity.ut.utah.comcast.net (69.139.247.29) 15.002 ms 15.186 ms 16.071 ms | |
5 pos-2-1-0-0-cr01.denver.co.ibone.comcast.net (68.86.90.237) 27.611 ms 27.539 ms 24.450 ms | |
6 4.79.82.57 (4.79.82.57) 23.298 ms 22.596 ms 24.680 ms | |
7 vlan52.ebr2.denver1.level3.net (4.69.147.126) 69.177 ms 74.488 ms 74.761 ms | |
8 ae-3-3.ebr1.chicago2.level3.net (4.69.132.62) 67.345 ms 76.961 ms 71.303 ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using coffeescript with erb as a :js response | |
# works in development doesn't seem to work in production | |
# app/controller/posts.rb | |
class Posts < ApplicationController | |
respond_to :html, :js | |
def new | |
@post = Posts.new | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run "sed -i.bck '/turbolinks/d' Gemfile" | |
run "sed -i.bck 's/, \"data-turbolinks-track\" => true//' app/views/layouts/application.html.erb" | |
run "sed -i.bck '/turbolinks/d' app/assets/javascripts/application.js" | |
run "sed -i.bck '/coffee/d' Gemfile" | |
run "sed -i.bck '/jbuilder/d' Gemfile" | |
gem 'active_model_serializers' | |
run "sed -i.bck '/tree/d' app/assets/javascripts/application.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git clone [email protected]:stefanpenner/ember-app-kit.git $1 | |
cd $1 | |
echo "Removing old git files" | |
rm -rf .git | |
echo "Installing grunt-cli and bower" | |
npm install -g grunt-cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define [ | |
'../start_app', | |
'ember', | |
'ic-ajax', | |
'../../controllers/quiz_controller', | |
'../environment_setup', | |
], (startApp, Ember, ajax, QuizController) -> | |
App = null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When attempting to test elements in Ember it seems like you have the following options | |
1. Spin up your Ember app and pluck of the parts you are trying to test: | |
App.__container__.lookup("controller:quizzes") | |
2. Build a container, register dependencies on it. | |
cont = new Em.Container() | |
cont.register('controller:quizzes', Em.Object) | |
quizController = App.QuizController.create({container: cont}) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define [ | |
'ember' | |
'../start_app' | |
'../../components/assignment_group_grades_component' | |
'../shared_ajax_fixtures' | |
], (Ember, startApp, AGGrades, fixtures) -> | |
{ContainerView, run} = Ember | |
fixtures.create() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set encoding=utf-8 | |
syntax on | |
" Load plugins with pathogen | |
call pathogen#infect() | |
call pathogen#helptags() | |
filetype plugin indent on | |
colorscheme ir_black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
namespace :ember_cli_rails do | |
desc "compile ember and update application.html.erb with ENV vars" | |
task :build => [:ember, :update_env] do | |
end | |
desc 'Build ember app and copies css and js files to rails' |
OlderNewer