This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var BASE64_MARKER = ';base64,'; | |
| function convertDataURIToBinary(dataURI) { | |
| var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length; | |
| var base64 = dataURI.substring(base64Index); | |
| var raw = window.atob(base64); | |
| var rawLength = raw.length; | |
| var array = new Uint8Array(new ArrayBuffer(rawLength)); | |
| for(i = 0; i < rawLength; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 04029b509f570a0af32e069730fe22c1d3f7677b13959ba310c8c2dfe6aa6124b560cb84e78efd5cb75c24c9b3bf883bf6a1c1f52cbe7c130cd270e6cd24ded7a5;nickveys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :deploy do | |
| desc "Hot-reload God configuration for the Resque worker" | |
| task :reload_god_config do | |
| sudo "god stop resque" | |
| sudo "god load #{File.join(deploy_to, 'current', 'config', 'resque-' + rails_env + '.god')}" | |
| sudo "god start resque" | |
| end | |
| end | |
| # append to the bottom: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
| <title>Testing Pie Chart</title> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.1.3"></script> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js?2.1.3"></script> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js?2.1.3"></script> | |
| <style type="text/css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # This script will install Command Line Tools for Xcode on a fresh installation of OS X. | |
| # Usage: curl https://raw.github.com/gist/3053979/install-command-line-tools-for-xcode.sh | sh | |
| DMG='command_line_tools_for_xcode_june_2012.dmg' | |
| cd $HOME/Downloads | |
| if [ ! -f ./$DMG ]; then | |
| echo 'Command Line Tools for Xcode not downloaded.' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fetchSongInfo(track) { | |
| info('Getting song info for ' + track.name + ' by ' + track.artists[0].name); | |
| var url = 'http://developer.echonest.com/api/v4/track/profile?api_key=N6E4NIOVYMTHNDM8J&callback=?'; | |
| var track_id = fromSpotify(track.uri); | |
| $.getJSON(url, { id: track_id, format:'jsonp', bucket : 'audio_summary'}, function(data) { | |
| if (checkResponse(data)) { | |
| info(""); | |
| showTrackInfo(data.response.track); | |
| fetchAnalysis(data.response.track); |