Skip to content

Instantly share code, notes, and snippets.

View jathayde's full-sized avatar
🚜

John Athayde jathayde

🚜
View GitHub Profile
@thulstrup
thulstrup / compass-retina-sprites.scss
Created March 20, 2012 19:18
Using Compass to generate normal and retina sprite maps
$sprites: sprite-map("sprites/*.png");
$sprites-retina: sprite-map("sprites-retina/*.png");
@mixin sprite-background($name) {
background-image: sprite-url($sprites);
background-position: sprite-position($sprites, $name);
background-repeat: no-repeat;
display: block;
height: image-height(sprite-file($sprites, $name));
width: image-width(sprite-file($sprites, $name));
@mataspetrikas
mataspetrikas / gist:1723694
Created February 2, 2012 14:24
Converting HTML links to SoundCloud widgets using JQuery
// if you have a link in your HTML that points to a sound: <a href="http://soundcloud.com/matas/hobnotropic">My Track</a>
// it will convert them to our new HTML5 widgets
$('a[href*="soundcloud.com"]').each(function(){
var $link = $(this);
$.getJSON('http://soundcloud.com/oembed?format=js&url=' + $link.attr('href') + '&iframe=true&callback=?', function(response){
$link.replaceWith(response.html);
});
});
@acf
acf / dnsimple-rename.rb
Created December 9, 2011 19:30
s/old.ip/new.ip/g in a DNSimple account
require 'rubygems'
require 'dnsimple'
DNSimple::Client.username = 'randall@rstvideo.com'
DNSimple::Client.password = 'd34thst4r'
DNSimple::Client.debug = false
user = DNSimple::User.me
puts "#{user.domain_count} domains"