create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.
require 'fileutils' | |
start_time = Time.now | |
SOURCE_DB = { | |
:name => 'db_name', | |
:user => 'db_user', | |
:password => 'db_pass', | |
:host => 'localhost' |
# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
The latest release notes is available at http://edgeguides.rubyonrails.org/3_2_release_notes.html
Speed up development by only reloading classes if dependencies files changed. This can be turned off by setting config.reload_classes_only_on_change
to false. José Valim
New applications get a flag config.active_record.auto_explain_threshold_in_seconds
in the environments configuration files. With a value of 0.5 in development.rb, and commented out in production.rb. No mention in test.rb. fxn
Add DebugExceptions middleware which contains features extracted from ShowExceptions middleware José Valim
import sys | |
import re | |
import dns.resolver # Requires dnspython | |
email_host_regex = re.compile(".*@(.*)$") | |
gmail_servers_regex = re.compile("(.google.com.|.googlemail.com.)$", re.IGNORECASE) | |
def is_gmail(email): | |
""" Returns True if the supplied Email address is a @gmail.com Email or is a Google Apps for your domain - hosted Gmail address | |
Checks are performed by checking the DNS MX records """ |
# Five lines of code that will make your underscore + CoffeeScript use cleaner. | |
# Creates an underscore function for each function in to_reverse with R (short for Reversed) appended to the name. | |
# The R version moves the function argument (first argument in normal underscore) to the end, | |
# so you can write: | |
$(window).scroll _.throttleR 500, -> | |
console.log "This print's at most every 500ms" | |
# Instead of: | |
$(window).scroll _.throttle -> | |
console.log "This prints at most every 500ms too" |
namespace :assets do | |
desc "Check that all assets have valid encoding" | |
task :check => :environment do | |
paths = ["app/assets", "lib/assets", "vendor/assets"] | |
extensions = ["js", "coffee", "css", "scss"] | |
paths.each do |path| | |
dir_path = Rails.root + path |
Adds a --debug option for .coffee scripts that outputs more helpful error messages (mapping compiled .js lines of code to the input .coffee file's lines).
This branch should be considered experimental at the moment -- it serves as a proof-of-concept and to expose additional issues with adding debugging support to CoffeeScript
Current output:
TypeError: string is not a function