6 Lessons I learned while implementing technical RFCs as a decision making tool
| Subsystem sftp "internal-sftp -u 0002" | |
| Match Group sftponly | |
| ChrootDirectory %h | |
| AllowTCPForwarding no | |
| X11Forwarding no | |
| ForceCommand internal-sftp -u 0002 |
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:
| Todos os dias venho lidando com programadores que arrumam desculpas para não realizar um trabalho excelente. | |
| As desculpas geralmente são: chefe não deixa, tenho que entregar logo, isso é assim mesmo ou eu não ganho para isso! | |
| Pois lhes digo que não é assim não. | |
| A seis meses resolvi por a prova todas as técnicas contidas no material que vou passar e tive resultados fantásticos para mim e minha equipe. | |
| Então Minha contribuição para esse assunto são estes 4 livros |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| // This code is fallback for https://github.com/Worlize/WebSocket-Node | |
| // add the broadcast to https://gist.github.com/1219165 | |
| // 2011.11.30 tato@http://www.facebook.com/javascripting | |
| // Example of how to fallback to alternative websocket library for old protocol clients | |
| // see https://gist.github.com/1148686 | |
| var http = require('http'), | |
| WebSocketRequest = require('websocket').request, |
| #!/usr/bin/env ruby | |
| # This script emulates [Spin] using [TestR]. | |
| # | |
| # Usage: testr-spin serve [-I<LOAD_PATH>]... <OVERHEAD_FILE>... | |
| # Usage: testr-spin push <TEST_FILE> [<TEST_NAME>]... | |
| # | |
| # [Spin]: https://github.com/jstorimer/spin | |
| # [TestR]: https://github.com/sunaku/testr | |
| require 'json' |
| ❷ > QUEUE=* rake resque:work --trace | |
| ** Invoke resque:work (first_time) | |
| ** Invoke resque:preload (first_time) | |
| ** Invoke resque:setup (first_time) | |
| ** Execute resque:setup | |
| ** Execute resque:preload | |
| rake aborted! | |
| No such file to load -- devise/confirmations_controller | |
| /Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:306:in `rescue in depend_on' | |
| /Users/stefan/.rvm/gems/ruby-1.9.2-p290@my-rails-project/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:301:in `depend_on' |
| case "$rvm_ruby_string" in | |
| *ruby-1.9.2*-patched) | |
| export RUBY_HEAP_MIN_SLOTS=1000000 | |
| export RUBY_HEAP_SLOTS_INCREMENT=1000000 | |
| export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
| export RUBY_GC_MALLOC_LIMIT=1000000000 | |
| export RUBY_HEAP_FREE_MIN=500000 | |
| export RUBY_FREE_MIN=$RUBY_HEAP_FREE_MIN | |
| ;; | |
| *) |
| def tip(msg); puts; puts msg; puts "-"*100; end | |
| # | |
| # 30 Ruby 1.9 Tips, Tricks & Features: | |
| # http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/ | |
| # | |
| tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2" | |
| tip "Ruby 1.9 supports named captures in regular expressions!" |