Skip to content

Instantly share code, notes, and snippets.

Lee Martin leemartin

Block or report user

Report or block leemartin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View stratus-customization
<script type="text/javascript">
$(document).ready(function(){
$stratus({
auto_play: true,
download: false,
links: 'http://soundcloud.com/qotsa',
random: true
});
});
</script>
View stratus-installation
<script type="text/javascript">
$(document).ready(function(){
$.stratus({
links: 'http://soundcloud.com/foofighters/sets/wasting-light'
});
});
</script>
View callback.html
<!DOCTYPE html>
<html lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Connect with SoundCloud</title>
</head>
<body onload="window.opener.setTimeout(window.opener.SC.connectCallback, 1)">
<b style="width: 100%; text-align: center;">This popup should automatically close in a few seconds</b>
</body>
</html>
@leemartin
leemartin / waveform.coffee
Created Mar 7, 2012
Waveform ImageData Node
View waveform.coffee
app.get '/waveform', (req, res) ->
# If URL and Callback present
if req.param("url") && req.param("callback")
# Get the parameters
url = decodeURIComponent(req.param("url"))
callback = req.param("callback")
# Create a Bufferlist
View wave64.js
// Use the SoundCloud JS SDK to grab a track
SC.get("/tracks/38640984", function(track){
// Use jQuery's getJSON call to pass the waveform_url and callback to Wave64
$.getJSON('http://wave64.it/w?callback=?', { url: track.waveform_url }, function(data){
// Initialize a new image using the returned data
waveform = new Image();
waveform.src = data.data;
@leemartin
leemartin / wave64.html
Created Mar 16, 2012
$.wave64 Example
View wave64.html
<html>
<head>
<title>SoundCloud $.wave64 Example</title>
<!-- Include jQuery, SoundCloud JS SDK, and the $.wave64 Plugin -->
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>
<script src='http://connect.soundcloud.com/sdk.js'></script>
<script src='http://wave64.it/jquery.wave64.js'></script>
<script type='text/javascript'>
@leemartin
leemartin / ontimedcomments.js
Created Apr 5, 2012
OnTimedComments Example
View ontimedcomments.js
SC.initialize({
client_id: "YOUR_CLIENT_ID"
});
SC.whenStreamingReady(function() {
SC.stream(TRACK_ID, {
ontimedcomments: function(comments) {
var comment, _i, _len;
for (_i = 0, _len = comments.length; _i < _len; _i++) {
@leemartin
leemartin / topspin_vs_sc.js
Created Apr 12, 2012
TopSpin Purchase on SoundCloud
View topspin_vs_sc.js
// Initialize JS SDK
SC.initialize({
client_id: "YOUR_CLIENT_ID",
redirect_uri: "http://example.com/callback.html",
});
// Connect to SoundCloud
SC.connect(function(){
// Update one of the user's tracks' purchase url
@leemartin
leemartin / widget.html
Created Apr 17, 2012
Email Unlock Widget
View widget.html
<iframe allowtransparency='true' frameborder='0' height='400' scrolling='no' src='YOUR_CAMPAIGN_URL/widget' width='300'></iframe>
@leemartin
leemartin / widget.html
Created Apr 17, 2012
Email Unlock Widget
View widget.html
<iframe allowtransparency='true' frameborder='0' height='400' scrolling='no' src='YOUR_CAMPAIGN_URL/widget' width='300'></iframe>
You can’t perform that action at this time.