Couldn't find the text of this for a while...
| # Based on https://gist.github.com/74107 by # Copyright (C) 2009 Torsten Becker <torsten.becker@gmail.com> | |
| # | |
| # Rewrited by gazay | |
| require 'socket' | |
| require 'uri' | |
| class Proxy | |
| attr_accessor :socket |
| source 'https://rubygems.org' | |
| gem 'sinatra' | |
| gem 'sinatra-contrib', require: 'sinatra/streaming' | |
| group :development do | |
| gem 'thin' | |
| gem 'pry-rails' | |
| end |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| username: vagrant | |
| password: vagrant | |
| sudo apt-get update | |
| sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev | |
| sudo aptitude install mysql-server mysql-client | |
| sudo nano /etc/mysql/my.cnf |
| //= require jquery | |
| //= require jquery_ujs | |
| $(function() { | |
| var source = new EventSource('/stream'); | |
| source.addEventListener('counter', function(e) { | |
| $('body').after(e.data + '<br />'); | |
| }); | |
| }); |
| * Only the releases of the stable versions are listed in principle. The releases of the unstable versions especially considered to be important are indicated as "not stable." | |
| * The branches used as the source of each releases are specified, and the branching timing of them are also shown. BTW, before subversionizing of the repository, the term called "trunk" was not used, but this list uses it in order to avoid confusion. | |
| * In order to show a historical backdrop, big conferences (RubyKaigi, RubyConf and Euruko) are also listed. About the venues of such conferences, general English notations are adopted, in my hope. | |
| * ruby_1_8_7 branch was recut from v1_8_7 tag after the 1.8.7 release because of an accident. | |
| * 1.2.1 release was canceled once, and the 2nd release called "repack" was performed. Although there were other examples similar to this, since the re-releases were performed during the same day, it does not write clearly in particular. | |
| * Since 1.0 was released with the date in large quantities, the mi |
| // SHA Hash presence web server. | |
| // | |
| // Requires a file containing sorted sha1s in binary form (20 bytes each). | |
| package main | |
| import ( | |
| "encoding/hex" | |
| "fmt" | |
| "io/ioutil" |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
Dear Rubyists,
I just lost a contract because of my code in a Rails project.
The specific code in question is related to a "posting a comment" feature. Here are the details:
In this project, "posting a comment" does not simply entail inserting a row into the database. It involves a procedure to yes, insert a row, but also detect its language, check for spam, send emails, and "share" it to Twitter and Facebook. I believe this algorithm should be encapsulated. I do not believe it belongs in a controller or a model. I do not believe Active Record callbacks should be used.
The "senior developer", whom is the stake holder's right hand man, said this: