- Authoring Ebooks: http://www.authoringebooks.com/
- Create Your Own Programming Language: http://createyourproglang.com/
- Exceptional Ruby: http://exceptionalruby.com/
- JavaScript Performance Rocks: http://javascriptrocks.com/performance/
- Redmine Tips: http://www.redminetips.com/
- The SPDY Book: http://spdybook.com/
- Rails 3 Upgrade Handbook: http://www.railsupgradehandbook.com/
- Refactoring Redmine: http://www.refactoringredmine.com/book/
- Bootstrapping Design: http://bootstrappingdesign.com/
- Recipes With Backbone:
var http = require('http'), | |
router = new require('routes').Router(); | |
// route response function | |
var test = function(req, res, params, splats) { | |
// everything is undefined here... wtf? | |
console.log(req); | |
console.log(res); | |
console.log(params); | |
console.log(splats); |
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# prints a sparkline in the terminal using the supplied list of numbers | |
# examples: | |
# spark.rb 10 20 30 100 90 80 | |
# spark.rb 1 2 0.4 0.1 1.3 0.7 | |
@ticks = %w[▁ ▂ ▃ ▄ ▅ ▆ ▇] | |
values = ARGV.map { |x| x.to_f } |
require 'oauth' | |
require 'launchy' | |
require 'nokogiri' | |
class User | |
def authenticate(consumer_key, consumer_secret, site) | |
consumer = OAuth::Consumer.new(consumer_key, consumer_secret, site) | |
request_token = consumer.get_request_token | |
puts "Authorize Follower and then paste in the PIN:" |
#!/usr/local/bin/ruby -rubygems | |
require 'open-uri' | |
require 'json' | |
require 'pony' | |
class Headline | |
def initialize(title, title_url, points, | |
comments, comments_url, time, time_units) | |
@title = title |
In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.
For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.
Greet User: http://jsfiddle.net/endeepak/6FdSS/
Greet User if Name is Entered: http://jsfiddle.net/endeepak/BDuxr/2/
Greet User: http://jsfiddle.net/endeepak/mmtQH/2/
Update: The original post on Netmag has been updated since this was written.
I tweeted earlier that this should be retracted. Generally, these performance-related articles are essentially little more than linkbait -- there are perhaps an infinite number of things you should do to improve a page's performance before worrying about the purported perf hit of multiplication vs. division -- but this post went further than most in this genre: it offered patently inaccurate and misleading advice.
Here are a few examples, assembled by some people who actually know what they're talking about (largely Rick Waldron and Ben Alman, with some help from myself and several others from the place that shall be unnamed).