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
// Ok, this stuff is straight out of http://pspdfkit.com/ | |
// Business-like it's probably not a good idea to share this | |
// but I just really love helping people and open sourcing stuff. | |
// Consider this snipped licensed under MIT, by Peter Steinberger. | |
// http://www.opensource.org/licenses/mit-license.php | |
// This uses all kinds of nasty private API, but I don't see another way. | |
// I tried to extract the mp4 URL in this project, https://github.com/steipete/PSYouTubeExtractor, | |
// but it required *lots* of hacks, is slow, and doesn't worked very well on iOS5. | |
// Turns out, Google _really_ doesn't want people access to their mp4 sources. |
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
def read_m3u8(m3u8) | |
File.open(m3u8, 'r') do |file| | |
keyfile = nil | |
iv = 0 | |
file.each_line do |line| | |
line.chomp! | |
if line =~ /^#EXT-X-KEY:METHOD=AES-128,URI="(.*?)"(,IV=0x(.*))?/ | |
keyfile = $1 | |
if $2 | |
iv = $3 |
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
/* | |
* CLI Tool to download streamable songs from SoundCloud API | |
* Requires Node.js, Flow-JS and cli libraries | |
*/ | |
var cli = require('cli').enable('status'), | |
fs = require('fs'), | |
flow = require('flow'), | |
path = require('path'), | |
SC = require('./node-soundcloud.js'); |
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
{ | |
"text": "RT @PostGradProblem: In preparation for the NFL lockout, I will be spending twice as much time analyzing my fantasy baseball team during ...", | |
"truncated": true, | |
"in_reply_to_user_id": null, | |
"in_reply_to_status_id": null, | |
"favorited": false, | |
"source": "<a href=\"http://twitter.com/\" rel=\"nofollow\">Twitter for iPhone</a>", | |
"in_reply_to_screen_name": null, | |
"in_reply_to_status_id_str": null, | |
"id_str": "54691802283900928", |
NewerOlder