Skip to content

Instantly share code, notes, and snippets.

View gabrielstuff's full-sized avatar

Gabriel gabrielstuff

View GitHub Profile
@gabrielstuff
gabrielstuff / bodyframe.json
Last active May 2, 2016 16:11
a body frame from kinect
{
"bodies": [
{
"bodyIndex": 0,
"tracked": false
},
{
"bodyIndex": 1,
"tracked": false
},
require('shelljs/global')
var fs = require('fs')
var handlebars = require('handlebars')
var targz = require('tar.gz')
var file = './pm2-auto.json'
cd('test-settings')
rm('-rf', '.build');
var meteorSettingsFile = fs.readFileSync('./test.json', "utf8")
var pm2startTemplate = handlebars.compile(fs.readFileSync('./pm2-start.tpj', "utf8"))
@gabrielstuff
gabrielstuff / get_history.js
Created March 2, 2016 11:09
history from periscope
const request = require('request')
const _ = require('lodash')
const postData = {
access_token:"28h9_iVDARWp5YD8R9_9c4ECK6kcLyXl6cRmc2m28htKORykzgU9w3QkYkUFLc98K61_Ecc9y4-j3bwvW9UpyinCPnf0FfG4bbkwvEwVqPA8ozyXtxd3zJaAo6DMDcVbRqU1XPMnQrk3FIgAwijyGYRft3LvvGd-ALYuI3xg_7R-5yamkd49xgnG6FduR7iuENi5TavP1vCKGaC2Dyia8Z99nWst8-bcwe5Y2beKjB0qcGLJdjFeHEsatox2jBmUuR-CmmPjS57Cz",
cursor:"",
limit:1000,
since:0
}
var url = 'https://chatman-eu-central-1.periscope.tv/k=1ypKdWqyPOgxW/chatapi/v1/history'
{
"access_token":"28h9_iVDARWp5YD8R9_9c4ECK6kcLyXl6cRmc2m28htKORykzgU9w3QkYkUFLc98K61_Ecc9y4-j3bwvW9UpyinCPnf0FfG4bbkwvEwVqPA8ozyXtxd3zJaAo6DMDcVbRqU1XPMnQrk3FIgAwijyGYRft3LvvGd-ALYuI3xg_7R-5yamkd49xgnG6FduR7iuENi5TavP1vCKGaC2Dyia8Z99nWst8-bcwe5Y2beKjB0qcGLJdjFeHEsatox2jBmUuR-CmmPjS57Cz",
"cursor":"",
"limit":1000,
"since":0
}
@gabrielstuff
gabrielstuff / index.js
Created February 16, 2016 08:12
requirebin sketch
var machina = require('machina')
require('blissfuljs')
var vehicleSignal = new machina.Fsm( {
// the initialize method is called right after the FSM
// instance is constructed, giving you a place for any
// setup behavior, etc. It receives the same arguments
// (options) as the constructor function.
initialize: function( options ) {
@gabrielstuff
gabrielstuff / index.js
Created February 1, 2016 11:08
requirebin sketch
var superagent = require('superagent')
require('superagent-cache')()
var uri = 'http://keepcontrol.space/swanmgmt/wp-json/menu/v2/menu?slug=main'
superagent
.get(uri)
.end(function (error, response){
console.log(response.body)
}
)
@gabrielstuff
gabrielstuff / download.php
Created January 22, 2016 14:25
Get file to download directly
<?php
if(!empty($_GET['file'])) {
$filename = filter_input(INPUT_GET, 'file', FILTER_SANITIZE_STRING);
if(strpos(basename($filename), 'jpg') !== false) {
$basename = "/content/images/full/";
}else if(strpos(basename($filename), 'mp4') !== false) {
$basename = "/content/videos/full/";
}else{
$basename = "/file/";
@gabrielstuff
gabrielstuff / giphy.slack
Created November 3, 2015 22:12
slash things
/giphy celebrate
@gabrielstuff
gabrielstuff / remove_info.php
Created May 26, 2015 10:23
Wordpress security
add_filter('login_errors',create_function('$a', "return null;"));
# Installation
brew install ffmpeg --with-vpx --with-vorbis --with-libvorbis --with-vpx --with-vorbis --with-theora --with-libogg --with-libvorbis --with-gpl --with-version3 --with-nonfree --with-postproc --with-libaacplus --with-libass --with-libcelt --with-libfaac --with-libfdk-aac --with-libfreetype --with-libmp3lame --with-libopencore-amrnb --with-libopencore-amrwb --with-libopenjpeg --with-openssl --with-libopus --with-libschroedinger --with-libspeex --with-libtheora --with-libvo-aacenc --with-libvorbis --with-libvpx --with-libx264 --with-libxvid --with-libvidstab --with-libvpx
# Easy Peasy
ffmpeg -i video.mp4 video.webm