Skip to content

Instantly share code, notes, and snippets.

@akatov
akatov / 0_reuse_code.js
Created April 22, 2014 04:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@akatov
akatov / chat.rb
Last active August 29, 2015 14:22 — forked from rkh/chat.rb
# 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
~ 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