View gist:8785308
ffmpeg: skip frames
-vf select="gte(n\, 5)"
View loop.js
var Loop = function (step) {
var self = this;
var lastFrameTimestamp = null;
var nextStep = function (timestamp) {
if (lastFrameTimestamp === null) {
lastFrameTimestamp = timestamp;
}
var tslf = timestamp - lastFrameTimestamp;
step(tslf);
lastFrameTimestamp = timestamp;
View jquery-boilerplate.js
/*global jQuery:true*/
// jQuery Plugin Boilerplate
// A boilerplate for jumpstarting jQuery plugins development
// by Alessandro Pezzato
// Original author: Stefan Gabos http://stefangabos.ro/jquery/jquery-plugin-boilerplate-revisited/
//
// remember to change every instance of "pluginName" to the name of your plugin!
(function ($) {
View client.js
var request = require('request');
var path = require('path');
var fs = require('fs');
var filename = process.argv[2];
var target = 'http://localhost:3000/upload/' + path.basename(filename);
var rs = fs.createReadStream(filename);
var ws = request.post(target);
View livereload-nodewebkit.md

Livereload + NodeWebkit

Aggiungere questo a myproject/index.html

  <script src="http://localhost:35729/livereload.js"></script>

Eseguire questi comandi:

sudo npm install -g livereload
cd myproject
View hide_system_bar.java
try {
String command = "LD_LIBRARY_PATH=/vendor/lib:/system/lib service call activity 42 s16 com.android.systemui";
Process proc = Runtime.getRuntime().exec(new String[] { "su", "-c", command }, null);
proc.waitFor();
} catch (java.io.IOException e) {
e.printStackTrace();
} catch (java.lang.InterruptedException e) {
e.printStackTrace();
}
View gist:9935270
dwc_otg.lpm_enable=0 console=tty3 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait loglevel=3 logo.nologo
View raspi-sd.sh
#!/bin/bash
ACTION=$1
SRC=$2
DST=$3
function pull {
mkdir "${DST}"
cd "${DST}"
mkdir mnt mnt/1 mnt/2 mnt/3
View raspi-fakeclock-set.sh
date -u "+%Y-%m-%d %H:%M:%S" > /etc/fake-hwclock.data
View Format.h
#ifndef FORMAT_H_
#define FORMAT_H_
#include <string>
#include <cstdarg>
#include <cstdio>
class Format: public std::string {
public:
inline Format(const char* format, ...) {