// jQuery
$(document).ready(function() {
// code
})
(function($){ | |
function dragEnter(e) { | |
$(e.target).addClass("dragOver"); | |
e.stopPropagation(); | |
e.preventDefault(); | |
return false; | |
}; | |
function dragOver(e) { | |
e.originalEvent.dataTransfer.dropEffect = "copy"; |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
class TicketsController < ApplicationController | |
def show | |
tickets = params[:tickets].split(",") | |
ticket_data = tickets.map do |ticket| | |
parallel { Faraday.get("http://tickets.local/#{ticket}") } | |
end | |
render json: { tickets: ticket_data.map(&:result) } | |
end |
Presented by Bob Martin in Tampa, Florida on 11 April 2012.
“Uranus is not a naked–eye object under any circumstances.”
- Copernicus’ motivation was religious, not scientific! Galileo looked at the phases of Venus to determine its orbit in relation to Sol.
Bob: How do you become unafraid of your code?
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
@include keyframes(appear-and-roundify) { | |
0% { opacity: 0; @include border-radius(2px); } | |
100% { opacity: 1; @include border-radius(10px); } | |
} |
I've been using this technique in most of my Ruby projects lately where Ruby versions are required:
- Create
.rbenv-version
containing the target Ruby using a definition name defined in ruby-build (example below). These strings are a proper subset of RVM Ruby string names so far... - Create
.rvmrc
(withrvm --create --rvmrc "1.9.3@myapp"
) and edit theenvironment_id=
line to fetch the Ruby version from.rbenv-version
(example below).
Today I learned about another Ruby manager, rbfu, where the author is using a similar technique with .rbfu-version
.
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.
# Requires the bitly gem | |
# gem install bitly | |
require 'rubygems' | |
require 'bitly' | |
# Force gem to use latest bitly API version | |
Bitly.use_api_version_3 | |
# Requires bitly.com account and API key (http://bitly.com/a/account) |