Skip to content

Instantly share code, notes, and snippets.

Avatar
😎
Whoop Whoop \o/

Jan Pieper janpieper

😎
Whoop Whoop \o/
View GitHub Profile
View ElasticSearch.sh
### ElasticSearch version
if [ -z "$1" ]; then
echo ""
echo " Please specify the Elasticsearch version you want to install!"
echo ""
echo " $ $0 1.4.0"
echo ""
exit 1
fi
View ar-drone-avconv.diff
diff --git a/lib/video/PngEncoder.js b/lib/video/PngEncoder.js
index 127411c..0c201e0 100644
--- a/lib/video/PngEncoder.js
+++ b/lib/video/PngEncoder.js
@@ -98,7 +98,7 @@ PngEncoder.prototype._spawnFfmpeg = function() {
ffmpegOptions.push('-r', this._frameRate); // framerate flag
ffmpegOptions.push('-'); // output
// @TODO allow people to configure the ffmpeg path
- return this._spawn('ffmpeg', ffmpegOptions);
+ return this._spawn('avconv', ffmpegOptions);
@janpieper
janpieper / bar.js
Created Oct 16, 2013
Can't catch thrown Error
View bar.js
var util = require("util")
, fs = require("fs");
exports.create = function () {
var b = new Bar();
b.bla();
};
var Bar = function () {};
@janpieper
janpieper / read-from-file.js
Created Oct 15, 2013
rm /tmp/foo && touch /tmp/foo
View read-from-file.js
var fs = require("fs");
function read(fd) {
var buf = new Buffer(8);
fs.read(fd, buf, 0, buf.length, null, function () {
console.log(buf);
read(fd);
});
}
@janpieper
janpieper / couchdb.sh
Created Aug 13, 2013
My CouchDB Installation (1.2.2)
View couchdb.sh
#!/bin/sh -e
#
# Original File Location:
# /etc/init.d/couchdb
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
@janpieper
janpieper / gist:6111303
Created Jul 30, 2013
Elixir: iex --erl "-boot start_sasl" --sname a --cookie dummy -S mix
View gist:6111303
$ iex --erl "-boot start_sasl" --sname a --cookie dummy -S mix
Erlang R16B01 (erts-5.10.2) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
=PROGRESS REPORT==== 30-Jul-2013::10:41:03 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.42.0>},
{name,alarm_handler},
{mfargs,{alarm_handler,start_link,[]}},
@janpieper
janpieper / gist:6111302
Created Jul 30, 2013
Elixir: iex --erl "-boot start_sasl" --sname a --cookie dummy -S mix
View gist:6111302
$ iex --erl "-boot start_sasl" --sname a --cookie dummy -S mix
Erlang R16B01 (erts-5.10.2) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
=PROGRESS REPORT==== 30-Jul-2013::10:41:03 ===
supervisor: {local,sasl_safe_sup}
started: [{pid,<0.42.0>},
{name,alarm_handler},
{mfargs,{alarm_handler,start_link,[]}},
@janpieper
janpieper / mix.exs
Created Jul 30, 2013
Elixir: {:noproc, {:gen_server, :call, [Mix.Server, :env, 30000]}}
View mix.exs
$ elixir -v
Elixir 0.10.0
$ erl
Erlang R16B01 (erts-5.10.2) [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V5.10.2 (abort with ^G)
1>
View jquery.tokeninput.js
/*
* jQuery Plugin: Tokenizing Autocomplete Text Entry
* Version 1.6.0
*
* Copyright (c) 2009 James Smith (http://loopj.com)
* Licensed jointly under the GPL and MIT licenses,
* choose which one suits your project best!
*
*/
@janpieper
janpieper / fliplife-referer-bug.php
Created Nov 17, 2011
Small script to check if the Referer-bug is still existent at fliplife.com
View fliplife-referer-bug.php
<?php
/**
* Send HTTP request to "fliplife.com" and return the HTTP status.
*
* @param array $headers Associative array with HTTP request headers.
* @throws Exception If no HTTP status can be found.
* @return integer HTTP status.
*/
function requestFliplife(array $headers)
You can’t perform that action at this time.