Skip to content

Instantly share code, notes, and snippets.

View mamuso's full-sized avatar
🙌
double high five

Manuel Muñoz Solera mamuso

🙌
double high five
View GitHub Profile
// 1. Write a class to support the following code:
// var thomas = new Person('Thomas');
// var amy = new Person('Amy');
var Person = function(name) {
this.name = name;
}
var thomas = new Person('Thomas');
var amy = new Person('Amy');
// Exercise 2 - Closures
// Wrap the following code in a closure and export only the "countdown" function.
// Code
(function(){
var index;
function log(){
console.log(index);
# #WCAG Basic wadus
#
# Using http://achecker.ca/checker/index.php
require 'raakt'
desc "WCAG basic wadus"
task :wcag_validate do
# perform a setup of all our variables
setup
# #Nanoc validation task
#
# To use this validation task you need the w3c_validators gem
# gem install w3c_validators
# and run rake validate on your project root
#
require 'yaml'
require 'w3c_validators'
include W3CValidators
@mamuso
mamuso / harvesine.rb
Created January 27, 2009 21:35
Distance between two addresses using google maps and the Haversine forumla
require 'open-uri'
require "rexml/document"
#
#
# Distance between two addresses using google maps and the Haversine forumla
# (http://en.wikipedia.org/wiki/Haversine_formula) based on the JS implementation
# (http://www.movable-type.co.uk/scripts/latlong.html)
#
#