Skip to content

Instantly share code, notes, and snippets.

View Ashu's full-sized avatar
🏠
Working from home

Ashu Ashu

🏠
Working from home
View GitHub Profile
#!/usr/bin/python
__doc__ = """
simpledesktops_download.py
A quick script that fetches desktop images from the http://simpledesktops.com/ site.
It will start at the most current list of images and keep moving backwards, downloading
desktop images in to a directory on your local machine, until it finds an image that
already exists on disk. At that point it will stop.
@Ashu
Ashu / sc-dl.js
Created March 9, 2012 13:58 — forked from pheuter/sc-dl.js
Bookmarklet that generates download link for a Soundcloud upload
(function(d) {
var dl = d.createElement('a');
dl.innerText = 'Download MP3';
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1];
dl.download = d.querySelector('em').innerText+".mp3";
d.querySelector('.primary').appendChild(dl);
dl.style.marginLeft = '10px';
dl.style.color = 'red';
dl.style.fontWeight = 700;
})(document);