I hereby claim:
- I am jstotz on github.
- I am jstotz (https://keybase.io/jstotz) on keybase.
- I have a public key ASCVpXFXPpsgEho01EXUTOUbfPGKlZDxEizLjhaTqMCaDwo
To claim this, I am signing this object:
var sys = require('sys'), | |
http = require('http'), | |
events = require('events'), | |
router = require('./lib/router').createRouter(); | |
// Routing table | |
router.get('/handlers/:name/messages', function(name) { | |
var response = this.response; | |
response.writeHead(200, {'Content-Type': 'text/plain'}); | |
handlers[name].addListener('message', function(message) { |
success_count = 0 | |
fail_count = 0 | |
lock = Mutex.new | |
DB = Application.db | |
DB.drop_table :race_test rescue nil | |
DB.create_table :race_test do |
rowView = | |
events: | |
'click .destroy': 'destroy' | |
destroy: (event)-> | |
event.preventDefault() | |
if confirm("Are you sure you want to delete " + setting.get("id") + "?") | |
@model.destroy() | |
class TableView extends Sagamore.Views.CollectionTable |
if row[:item_properties] | |
item_properties = JSON.parse(row[:item_properties]) | |
item_property_array = item_property_columns.map {|c| item_properties[c]} | |
else | |
item_property_array = item_property_columns.size.times.map { nil } | |
end |
enum1 = [:a, :b, :c] | |
enum2 = [1, 2, 3] | |
enum1.zip(enum2) do |x, y| | |
puts "#{x} -> #{y}" | |
end | |
# Output: | |
# a -> 1 | |
# b -> 2 | |
# c -> 3 |
puts "Reading lines..." | |
$stdin.each_line do |line| | |
puts "IN: #{line}" | |
end | |
$stdin.reopen File.open("/dev/tty", "r") | |
puts "Awaiting user input..." |
# ... | |
fetchAll: -> | |
@fetchTickets(). | |
pipe(=> @fetchTicketLines()). | |
pipe(=> @fetchInventory()). | |
pipe(=> @fetchBinLocations()) | |
# ... | |
# ... |
I hereby claim:
To claim this, I am signing this object:
Sequel.migration do | |
no_transaction | |
change do | |
alter_table :foo do | |
add_column :bar, String | |
add_index :bar, concurrently: true | |
end | |
end | |
end |