Skip to content

Instantly share code, notes, and snippets.

View adamvr's full-sized avatar

Adam Rudd adamvr

  • Cologne, Germany
View GitHub Profile
@adamvr
adamvr / placeholder
Created February 18, 2016 08:55
Homelike interview project
asdf
### Keybase proof
I hereby claim:
* I am adamvr on github.
* I am adamvr (https://keybase.io/adamvr) on keybase.
* I have a public key whose fingerprint is 1229 4D11 B595 28DB C5EF B4EF E3B1 8A86 2F41 4435
To claim this, I am signing this object:
#!/bin/sh
cat | # read filenames from stdin
sed "s/^\(.*\)$/'\1'/" | # wrap each in single quotes
sed 's/^/file /' | # prepend file directive
ffmpeg -f concat -i - -acodec copy -vcodec copy "$1" # encode and store result on args[1]
var augment = function (obj /* args */) {
var args = Array.prototype.slice.call(arguments, 1);
for (var i = 0; i < args.length; i += 1) {
var arg = args[i];
// Skip non-objects
if ('object' !== typeof arg) continue;
for (var k in arg) {
var v = arg[k];
// Postorder flatten
var flatten = function (obj) {
var flat = {};
function flatt (obj) {
for (var k in obj) {
var v = obj[k];
if ('object' === typeof v) {
flatt(v);
} else if ('function' === typeof v) {
var resolve = function (key, object) {
var split = key.split('.')
for (var i = 0; i < split.length; i += 1) {
var key = split[i];
if ('undefined' === object[key]) break;
object = object[key];
}
return object;
};
var expr = ['random', 1000, '*', 'round'];
var calc = function (expr) {
var stack = []
, left, right;
for (var i = 0; i < expr.length; i += 1) {
var val = expr[i];
console.dir(stack);
file='tmp.txt'
rm $file
for f in "$@"
do
echo "file '$f'" >> $file
done
ffmpeg -f concat -i $file -c copy $OUTPUT
@adamvr
adamvr / t.js
Created June 5, 2013 14:22
Testing for mqttjs reconnection
var mqtt = require('./');
var client = mqtt.createClient();
client.on('connect', function() {
console.log('connected');
});
client.on('close', function() {
console.log('close, dcing:', client.disconnecting);
@adamvr
adamvr / .gitignore
Last active December 18, 2015 01:48
mqttjs recovery after exception
node_modules