brew install redis
After you install the redis, there's will be several instructions below the command
brew install redis, basically it use
launchctl, so make sure you start the redis-server
| import Ember from 'ember'; | |
| import { task, timeout, asyncComputed } from 'ember-concurrency'; | |
| export default Ember.Controller.extend({ | |
| query: "", | |
| searchResults: asyncComputed('query', function * (query) { | |
| if (Ember.isBlank(query)) { return []; } | |
| yield timeout(500); | |
| let url = `https://api.github.com/search/repositories?q=${query}`; |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| import Ember from 'ember'; | |
| export default Ember.Controller.extend({ | |
| appName:'Ember Twiddle', | |
| actions: { | |
| hello(firstArg, { target: { value } }) { | |
| console.log(value); | |
| console.log(arguments); | |
| } |
| func crackPop() { | |
| for i in 1...100 { | |
| if i%15 == 0 { | |
| println("CracklePop") | |
| } else if i%3 == 0{ | |
| println("Crackle") | |
| } else if i%5 == 0 { | |
| println("Pop") |
| open ~/Library/Application\ Support/iPhone\ Simulator/ |
| require 'bundler/setup' | |
| require 'mechanize' | |
| require 'open-uri' | |
| agent = Mechanize.new | |
| # agent.set_proxy 'localhost', 3128 | |
| # login | |
| agent.get('https://www.codeschool.com/users/sign_in') do |page| | |
| result = page.form_with(:action => '/users/sign_in') do |form| |
| var i = 1 | |
| for(var i = 0; i < 10; ++i){} | |
| console.log(i) |
| var y = "glo" | |
| function printy(){ | |
| console.log(y) | |
| } | |
| function test(y) | |
| { | |
| var y = "inner" | |
| printy() |