Skip to content

Instantly share code, notes, and snippets.

View sinak's full-sized avatar

Sina Khanifar sinak

View GitHub Profile
@sinak
sinak / gist:7361214
Created November 7, 2013 20:22
Add this text as a bookmark to download Soundcloud songs.
javascript: (function(a){var b,c,d,e=$(".sound"),f=require("config").get("client_id"),g=require("lib/connect").getAuthToken(),h=require("lib/helpers/conversion-helper"),i,j,k,l,m;for(b=e.length-1;b>=0;b--){c=$(e[b]);if(0==c.find(".sc-button-download").length){var n="https://soundcloud.com"+(c.find(".soundTitle__title").attr("href")||a.location.pathname);k={url:n,client_id:f},m=function(a){return function(b){var c={client_id:f};l=require("lib/url").stringify({query:c},b.stream_url+".mp3"),d=a.find(".sound__soundActions .sc-button-group"),j=d.find(".sc-button:first")[0].className.match(/sc-button-((?:small)|(?:medium))/)[1],i=$('<a class="sc-button sc-button-download sc-button-icon sc-button-responsive">Download</a>').attr({title:"Download this sound ("+h.bytesToMB(b.original_content_size)+")",href:l}).addClass("sc-button-"+j),d.append(i)}}(c),$.getJSON("http://api.soundcloud.com/resolve.json",k).success(m)}}})(window)
@sinak
sinak / gist:6984913
Created October 15, 2013 00:57
airmail trace
This file has been truncated, but you can view the full file.
Sampling process 15888 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling AirMail Beta (pid 15888) every 1 millisecond
Process: AirMail Beta [15888]
Path: /Applications/AirMail Beta.app/Contents/MacOS/AirMail Beta
Load Address: 0x1026eb000
Identifier: it.bloop.airmail.beta7
Version: 1.2 (208)
Code Type: X86-64 (Native)
Parent Process: launchd [144]