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
/*! | |
* Chart.js | |
* http://chartjs.org/ | |
* | |
* Copyright 2013 Nick Downie | |
* Released under the MIT license | |
* https://github.com/nnnick/Chart.js/blob/master/LICENSE.md | |
*/ | |
//Define the global Chart Variable as a class. |
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 XeniaDriver = require('xenia-driver') | |
// Configure your instance | |
var xenia = XeniaDriver('https://demo.coralproject.net/xenia_api/1.0', 'Basic NmQ3MmU2ZGQtOTNkMC00NDEzLTliNGMtODU0NmQ0ZDM1MTRlOlBDeVgvTFRHWjhOdGZWOGVReXZObkpydm4xc2loQk9uQW5TNFpGZGNFdnc9') | |
// Use the driver | |
xenia() | |
.collection('comments') | |
.include(['body', 'asset_id']) | |
.limit(5) |
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 Hola = React.createClass({ | |
render: function() { | |
return ( | |
<h1>Hola {this.props.name}!</h1> | |
) | |
} | |
}) | |
ReactDOM.render( | |
<Hola name="Manu" />, |
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 tuiter = require('tuiter')(require('./keys.json')); | |
var Speaker = require('speaker'); | |
var speaker = new Speaker({ | |
channels: 1, | |
bitDepth: 16, | |
sampleRate: 44100 | |
}); | |
tuiter.sample(function(stream){ |
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 tuiter = require('tuiter')(keys); | |
var getTweets = function(screen_name, max_id) { | |
tuiter.userTimeline({screen_name: screen_name, max_id: max_id}, function(err, tweets){ | |
//save tweets | |
//get more | |
if(tweets.length) | |
getTweets(screen_name, tweets[tweets.length - 1].id - 1); |
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 redis = require('redis') | |
, Tuiter = require('tuiter'); | |
var client = redis.createClient(); | |
// your twitter api credentials | |
var t = new Tuiter({ | |
"consumer_key" : "blablabla" | |
, "consumer_secret" : "blablabla" | |
, "access_token_key" : "blablabla" |
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 Tuiter = require('tuiter') | |
, redis = require('redis'); | |
var t = new Tuiter({ | |
"consumer_key" : "your consumer key" | |
, "consumer_secret" : "your consumer secret" | |
, "access_token_key" : "your access token key" | |
, "access_token_secret" : "your access token secret" | |
}); |
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 select_to_dropdown = function(el, dropdown, select_text ){ | |
$(el).children().hide(); | |
var sel_list = $('<div id="'+dropdown+'"><strong class="cta"><span></span></strong><ul></ul></div>'); | |
sel_list.find('span').text($(el + ' label').text()); | |
$(el + ' select').children('option').each(function(){ | |
sel_list.children('ul').append('<li>' + $(this).text() + '</li>'); | |
}); | |
$(el).append(sel_list); | |
$(dropdown).find('li').live('click',function(e){ | |
$(el + ' select option').eq($(this).index()).attr('selected','selected').siblings('option').removeAttr('selected'); |
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
;(function ( $, window, document, undefined ) { | |
var defaults = { | |
start: 0 | |
, update_interval: 2000 | |
, stop: false | |
, stop_at: 600000 | |
, min_count: 1 | |
, max_count: 5 | |
}; |
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
'POST /api/v1/user/ HTTP/1.1\r\nContent-Type: application/json\r\nAccept: application/json\r\nContent-Length: 121\r\nHost: 127.0.0.1:8000\r\nConnection: keep-alive\r\n\r\n{"method":"facebook","method_id":"123123213123","username":"REPTARRRR","name":"Aventuras en pañales","password":"123456"}' |
NewerOlder