This file contains hidden or 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
import Ember from 'ember'; | |
const a = { | |
x: 1, | |
y() { | |
return this.x | |
} | |
}; | |
let f = a.y; | |
// f(); // what does this return? // we want this to return 1 |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
}); |
This file contains hidden or 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
import Adapter from 'ember-data/adapter'; | |
import Game from '../models/game'; | |
import RSVP from 'rsvp'; | |
var globalId = 0; | |
export default Adapter.extend({ | |
findRecord(store, type, id) { | |
console.log('find'); | |
return RSVP.resolve({ id }); |
This file contains hidden or 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
This file contains hidden or 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
~ lldb /usr/bin/ruby | |
Current executable set to '/usr/bin/ruby' (x86_64). | |
(lldb) break rb_exit | |
invalid command 'breakpoint rb_exit' | |
(lldb) break set --name rb_exit | |
Breakpoint 1: where = libruby.2.0.0.dylib`rb_exit, address = 0x000000000008bc6b | |
(lldb) run -eexit | |
Process 87866 launched: '/usr/bin/ruby' (x86_64) | |
Process 87866 stopped | |
* thread #1: tid = 0x2e4348, 0x0000000100090c6b libruby.2.0.0.dylib`rb_exit, queue = 'com.apple.main-thread, stop reason = breakpoint 1.1 |
This file contains hidden or 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
(defproject msngr "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.6.0"] | |
[net.sf.openymsg/openymsg "0.6.0"]] | |
:main msngr.core |
This file contains hidden or 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
# coding: utf-8 | |
require 'sinatra' | |
set server: 'thin', connections: [] | |
get '/' do | |
halt erb(:login) unless params[:user] | |
erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
end | |
get '/stream', provides: 'text/event-stream' do |