ruby 1.9.2 + async_sinatra + thin thin start
ab -n 10000 -c 100 http://localhost:3000/
-> 49ms / request
node server.js
function blockEnter(evt) {return true;} | |
function validarNoUsarTecladoReal_OnKeyPress(_object){return false;} |
codigo = " p 'hello world' " | |
pp Ripper.lex(codigo) # Paso 1, Tokenizacion | |
# [[[1, 0], :on_sp, " "], | |
# [[1, 1], :on_ident, "p"], | |
# [[1, 2], :on_sp, " "], | |
# [[1, 3], :on_tstring_beg, "'"], | |
# [[1, 4], :on_tstring_content, "hello world"], | |
# [[1, 15], :on_tstring_end, "'"], |
package main | |
import "fmt" | |
type Something struct {} | |
func (s Something) Test() bool { | |
return false | |
} | |
type SomethingInterface interface { |
class Api::UploadsController < ApiController | |
def create | |
@upload = Upload.new(upload_params) | |
ensure | |
clean_tempfile | |
end | |
private |
RSpec.shared_context "without foreign key constraints", :disable_foreign_keys do | |
def without_foreign_key_checks | |
DB.run('SET foreign_key_checks = 0;') | |
yield | |
ensure | |
DB.run('SET foreign_key_checks = 1;') | |
end | |
around(:example) { |ex| without_foreign_key_checks(&ex) } | |
end |
Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.
Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.
First you will need to get an OAuth Token from GitHub using your own username and "note"