This file contains 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
<?php | |
$type = $_GET['type']; | |
if($type == 'scrape'){ | |
$url = $_GET['url']; | |
$ch = curl_init("http://bandcamp.com".$url); | |
} | |
$html = curl_exec($ch); | |
curl_close($ch); | |
?> |
This file contains 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
//this is an example twitter call for geolocated tweets | |
//all you need is a lat lng to get tweets from anywhere | |
//in the world | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
//only get the first 5 pages | |
//since we are only interested | |
//in recent tweets | |
for (z = 0; z <= 5; z++) { |
This file contains 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 fs = require('fs'); | |
var http = require('http'); | |
var server = http.createServer(function(req, response){ | |
setInterval ( fetchMedia, 2000 ); | |
fs.readFile(__dirname+'/index.html', function(err, data){ | |
response.writeHead(200, {'Content-Type':'text/html'}); | |
response.write(data); | |
response.end(); | |
}); | |
}); |
This file contains 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> | |
<title>Popcorn.js Tour Plug-in Demo</title> | |
<style type="text/css"> | |
body{ | |
margin: 0; padding: 0; | |
font-family: Georgia; | |
} |
This file contains 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 twitter = require('ntwitter'); | |
var t = new twitter({ | |
}); | |
t.stream('statuses/filter', { location: '-122.75,36.8,-121.75,37.8,-74,40,-73,41'}, function( stream ) { | |
console.log( stream ) | |
stream.on('data', function (data) { | |
console.log(data); |
This file contains 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
t.stream('statuses/filter', {'locations':'-122.75,36.8,-121.75,37.8,-74,40,-73,41'} , function( stream ) { | |
stream.on('data', function ( data ) { | |
console.log( data ); | |
}); | |
}); |
This file contains 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 p = Popcorn("#silence") | |
.code({ | |
start: 0, | |
end: 5, | |
onStart: function (options) { | |
}, | |
onFrame: (function () { | |
var count = 0; |
This file contains 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
1. download and install https://www.virtualbox.org/ | |
2. follow this tutorial on getting ubuntu set up http://www.psychocats.net/ubuntu/virtualbox | |
3. get node onto ubuntu via this tutorial http://www.giantflyingsaucer.com/blog/?p=1688 |
This file contains 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 xhrArgs = { | |
url: "/ofm/console/", | |
handle: function (e, io) { | |
var html = io.xhr.responseText; | |
//somehow get the contents of the title of html | |
} | |
} | |
// Call the asynchronous xhrGet | |
var deferred = dojo.xhrGet(xhrArgs); |
This file contains 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
document.addEventListener("DOMContentLoaded", function () { | |
VideoJS.setupAllWhenReady(); | |
var p = Popcorn('#video'); | |
p.code({ | |
start: 0, | |
end: 10, | |
onStart: function (options) { | |
console.log('started') | |
}, |
OlderNewer