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
~ 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 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 |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |