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
@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)
#
#
# #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
# #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
// 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);
// 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');
// Para rectificar con http://gist.github.com/500794
// Part 1.
// Implement a function prototype extension that caches function results for
// the same input arguments of a function with one parameter.
//
// For example:
// Make sin(1) have the result of Math.sin(1), but use a cached value
// for future calls.
//
<div id="the_div">
<ul id="the_list">
<li id="the_item">Click me!</li>
</ul>
</div>
<p id="log"></p>
<script type="text/javascript" charset="utf-8">
function log(string){
@mamuso
mamuso / dabblet.css
Created April 13, 2012 16:53
Untitled
body {
font-family: sans-serif;
}
strong {
display: inline-block;
padding: 4px;
width: 240px;
background: pink;
text-align: right
}
@mamuso
mamuso / songs.scpt
Created June 20, 2012 21:33
Play a sound during multiple slides in keynote with AppleScript
set dontplay to 0
tell application "Keynote"
start from slide 1 of front slideshow
end tell
set volume output volume 80
repeat
tell application "Keynote"
tell front slideshow
@mamuso
mamuso / RAUR!.markdown
Created September 7, 2013 09:47
A Pen by mamuso.