-
The new rake task assets:clean removes precompiled assets. [fxn]
-
Application and plugin generation run bundle install unless
--skip-gemfileor--skip-bundle. [fxn] -
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
-
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
Some exercises from the Falsy Values workshops.
The good parts:
- HTTP server and client in same script
- Express cookies example
- Express routing example
- Express error handling
- Express middlewares example
- Simple HTTP proxy
| _.mixin({ | |
| inGroupsOf: function(array, number, fillWith) { | |
| fillWith = fillWith || null; | |
| var index = -number, slices = []; | |
| if (number < 1) return array; | |
| while ((index += number) < array.length) { | |
| var s = array.slice(index, index + number); | |
| while(s.length < number) |
| # https://gist.github.com/1214052 | |
| require 'sinatra/base' | |
| class ResqueWeb < Sinatra::Base | |
| require 'resque/server' | |
| use Rack::ShowExceptions | |
| if CFG[:user].present? and CFG[:password].present? | |
| Resque::Server.use Rack::Auth::Basic do |user, password| | |
| user == CFG[:user] && password == CFG[:password] |
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.
| function grbm () { | |
| branch=$(git-branch-name) | |
| git checkout master | |
| git pull origin master | |
| git checkout "${branch}" | |
| git rebase master | |
| } | |
| function grbmc () { |
| #!/usr/bin/tclsh8.5 | |
| # | |
| # Usage: unmerged branch1 branch2 | |
| proc getlog branch { | |
| lrange [split [exec git log $branch --oneline] "\n"] 0 100 | |
| } | |
| proc diff {title c1 c2} { | |
| puts "\n$title" |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
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: