Skip to content

Instantly share code, notes, and snippets.

View loretoparisi's full-sized avatar
🐍
NightShift

Loreto Parisi loretoparisi

🐍
NightShift
View GitHub Profile
@ff6347
ff6347 / demo_movie-countdown.jsx
Created November 28, 2012 09:31 — forked from seblavoie/demo_movie-countdown.jsx
AeTuts+ movie countdown script
{
app.beginUndoGroup("Demo Script");
// Creating project
var currentProject = (app.project) ? app.project : app.newProject();
// Creating comp
var compSettings = cs = [1280, 720, 1, 10, 24];
var defaultCompName = "Demo"
var currentComp = (currentProject.activeItem) ? currentProject.activeItem : currentProject.items.addComp(defaultCompName, cs[0], cs[1], cs[2], cs[3], cs[4]);
@ahallora
ahallora / server.js
Last active November 18, 2015 09:43
Spotify Token Exchange (written in node.js)
// Node.js version of the Spotify Token Exchange originally scripted in ruby (based on beta 6 release candidate)
// https://github.com/spotify/ios-sdk/blob/master/Demo%20Projects/spotify_token_swap.rb
var express = require('express');
var bodyParser = require('body-parser');
var request = require('request');
var app = express();
var http = require('http').Server(app);
var config = {}
@loretoparisi
loretoparisi / README
Created March 6, 2016 23:11
netflix-prize
SUMMARY
================================================================================
This dataset was constructed to support participants in the Netflix Prize. See
http://www.netflixprize.com for details about the prize.
The movie rating files contain over 100 million ratings from 480 thousand
randomly-chosen, anonymous Netflix customers over 17 thousand movie titles. The
data were collected between October, 1998 and December, 2005 and reflect the
distribution of all ratings received during this period. The ratings are on a
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@loretoparisi
loretoparisi / spotify+users+playlist-search.js
Last active April 13, 2016 00:35
It search Spotify Users having Playlists with given search terms.
// Simple XMLHttpRequest
// based on https://davidwalsh.name/xmlhttprequest
var SimpleRequest = {
call: function(what, response) {
var request;
if (window.XMLHttpRequest) { // Mozilla, Safari, ...
request = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
try {
request = new ActiveXObject('Msxml2.XMLHTTP');
/** Fetch user agents by class from http://ua.theafh.net/ */
function UserAgents () {
var COL_UA=1;
var COL_CLASS=3;
this.list=[];
this.Class='';
this.parse = function(Class) {
this.list=[];
var self=this;
this.Class=Class;
@loretoparisi
loretoparisi / Promise+XMLHttpRequest.js
Last active April 13, 2016 00:35
Example of using native Promise with deferred XMLHttpRequest
var console = {
log: function(s) {
document.getElementById("console").innerHTML += s + "<br/>"
}
}
// Simple XMLHttpRequest
// based on https://davidwalsh.name/xmlhttprequest
SimpleRequest = {
call: function(what, response) {
var request;
@loretoparisi
loretoparisi / Promise+Node+Process+Spawn.js
Created April 13, 2016 00:31
Spawn processes in Node with Promise.All
var cp = require('child_process');
var promiseAll = function(items, block, done, fail) {
var self = this;
var promises = [],
index = 0;
items.forEach(function(item) {
promises.push(function(item, i) {
return new Promise(function(resolve, reject) {
if (block) {
block.apply(this, [item, index, resolve, reject]);
@rsms
rsms / Messenger for Mac stats
Last active August 17, 2016 17:48
Note: "total installs" counts all versions <0.0.8.2015-06-09T23:11:23Z unique per IP, while "unique device installs" counts all versions >=0.0.8.2015-06-09T23:11:23Z unique per device id.
Analyzed 353956 files.
Total downloads: 612375
Total installs (IPs): 97052
Unique device installs: 134626
Website visits: 516358
Website IP-unique visits: 233708
Versions installed (unique per identified device):
0.1.8.2016-06-19T19:10:28Z 43769
0.1.7.2016-04-01T18:12:56Z 23598
0.1.7.2016-02-24T03:51:21Z 5548
@loretoparisi
loretoparisi / object+deepClone.js
Created October 7, 2016 10:38
Deep Clone a JavaScript Object
function deepClone(obj) {
var copy;
var i;
var len;
if (!obj || typeof obj !== 'object') {
return obj;
}
if (obj instanceof Array) {