Skip to content

Instantly share code, notes, and snippets.

View konsumer's full-sized avatar

David Konsumer konsumer

View GitHub Profile
var parseString = require('xml2js').parseString,
request = require('request');
var feeds = [
"http://kickass.to/movies/genre/action/?rss=1",
"http://kickass.to/movies/genre/adult/?rss=1",
"http://kickass.to/movies/genre/adventure/?rss=1",
"http://kickass.to/movies/genre/animation/?rss=1",
"http://kickass.to/movies/genre/biography/?rss=1",
"http://kickass.to/movies/genre/comedy/?rss=1",
package com.jetboystudio.pebble;
import org.apache.cordova.*;
import org.json.*;
import java.util.*;
import android.content.Intent;
import com.getpebble.android.kit.*;
public class PebblePGPlugin extends CordovaPlugin {
{
"response": {
"game_count": 443,
"games": [{
"appid": 10,
"name": "Counter-Strike",
"playtime_forever": 32,
"img_icon_url": "6b0312cda02f5f777efa2f3318c307ff9acafbb5",
"img_logo_url": "af890f848dd606ac2fd4415de3c3f5e7a66fcb9f",
"has_community_visible_stats": true
var async = require('async'),
request = require('request'),
fs = require('fs'),
path = require('path');
function test(torrents, cb){
function getTorrent(dl, callback){
var url = dl.url.bittorrent, fname = dl.url.local;
request(url)
.pipe(fs.createWriteStream(path.join(__dirname, 'out', fname)))
import controlP5.*;
import processing.serial.*;
import cc.arduino.*;
import arduinoscope.*;
Arduino arduino;
ControlP5 cp5;
Oscilloscope[] scopes = new Oscilloscope[6];
float multiplier;
Your serial ports:
<ul id="ports"></ul>
<script>
require('serialport').list(function(err, ports){
document.getElementById('ports').innerHTML = ports.map(function(port){
return '<li>' + port.comName + '</li>';
}).join('');
});
</script>
var webpack = require('webpack');
var port = JSON.parse(process.env.npm_package_config_port || 3000),
subdomain = JSON.parse(process.env.npm_package_config_subdomain),
url = subdomain ?
'https://' + subdomain + '.localtunnel.me' :
'http://localhost:' + port;
module.exports = {
port: port,
var PIXI = require('pixi.js');
var stage = new PIXI.Stage(0x000000, true);
var renderer = new PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.view);
stage.addChild( PIXI.Sprite.fromImage('assets/img/kitty.png') );
function animate(){
var PIXI = require('pixi.js');
var stage = new PIXI.Stage(0x000000);
var renderer = new PIXI.autoDetectRenderer(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.view);
window.distance = 10;
var circle1 = new PIXI.Graphics();
// return array of DOM nodes from CSS query
// caches parent DOM element, with document as default
// use this if you need support for old IE: https://github.com/inexorabletash/polyfill
function q(selector, parent){
this.parent = this.parent || parent || document;
return Array.prototype.slice.apply(this.parent.querySelectorAll(selector));
}