Skip to content

Instantly share code, notes, and snippets.

View a2800276's full-sized avatar

Tim Becker a2800276

  • Press Every Key
  • Germany
View GitHub Profile
// simple helper to dump bytes in hex format
static void dump_bytes(uint8_t *bytes, size_t len) {
char buf[16 * 3 + 1];
buf[16 * 3] = '\0';
size_t i = 0;
for (i = 0; i < len; i++) {
if (i % 16 == 0) {
if (i > 0) {
printf("\n%s", buf);
}
set -s escape-time 0
#in .tmux.conf
# it's not a plugin but a package.
:help packages
:help packpath
:set packpath # figure out runtime dir to dump stuff ..., typically:
~/.local/share/nvim/site
#below that, create
/pack/go/start
# and clone plugin into it...
$ mkdir ~/.local/share/nvim/site/pack/go/start
$ cd ~/.local/share/nvim/site/pack/go/start
# it's not a plugin but a package.
:help packages
:help packpath
:set packpath # figure out runtime dir to dump stuff ..., typically:
~/.local/share/nvim/site
#below that, create
/pack/go/start
# and clone plugin into it...
$ mkdir ~/.local/share/nvim/site/pack/go/start
$ cd ~/.local/share/nvim/site/pack/go/start
@a2800276
a2800276 / triple.tgz.b64
Created April 4, 2012 15:37
base64 encoded tarball, run `cat triple.tgz.b64 | base64 -d -o triple.tgz`
H4sIAP5pfE8AA+1bW4+jNhTeV/gV7k73DRAmhKSRUo1GXbUr7UOlTtVK1QhxcSZWwTBg5tJq/3ttQ0hISCDZbCbp+HthOD62z434fCHjR5j8jTLTMoIgMGKa4TRCRv7umDBN07FtwK8jZyiuplXecwzNEQQQjgYjpjZwIDDhEDr2O2Ae1YotKHLqZcwU6qOdekxtNtsxXvoC6uuFQDHyF0K9Z1AQPMMoVBUDeT52PcpKwS8oApapAdgihu3igQYGLWK7XXvYKrYr7RmOkPLeb5ToPMmpUZWpH7xnWhQ9U3a5jxI/UsLkycP81ovwPVEsPv6SokqufZgVJKA4IUweJCFSoANacQ2u66XovIh9l89US9lEvQY3N1fmpH1uY5kPiNDsRVXSIp8bT8q/GWSBi7IvqpIXvpKnGrgaq0qcPLLBjIX6Cg6gObJU4/PNjenCzi3qHTptqSdMf7yd4xx8IgRl4HOSpOAX5IUom4CfUErnUxb6nGbCmr+EgfadqkThuiSI09JiU1UwpQp6UBUvDNFD7VWapOihdjoNvrQtw5NWxPFL2xgLUV5FhSkqVUxYbGicmhOWmhz/U+cWlGK9yltdEiShsYfJZk1UA3sVxXKxlaqohIeWBYuPvV4Tli2KgtWEzWPxAxw7QkBLwdgyobgX0clsEcafP96O11NnmSyMScZELANlJMdmc6aYABsT2GK//n47XphgChMsaC5MMGsTWnZrzrG75kCnnLNItLXhA7QaGgNrXWHcXMFpq9/luN0YvhNPGuz3pD3NMf/YScIjP26i8mHD3+bD0MxKU328oS1CukV781neqt2hufJp22n/Los27d/l7SXYv1/8t3p7Ifb3j3/T03Ox//zif/L6L49WuDhaYX20Lo7I8myF+uL4U9XXblwljoJmc83S+w0I4F78D444/xvYQ8n/TgHJ/7a2+pL/Sf63URSS/0n+J/nf/63/lfxD8r8zir/kfxInwrK5rrnf0V8CdvI/x6r5Hxzy93+O5Uj+dxJcFP+r
#include "./benchmark.c"
#include "../BasicsC/string-buffer.h"
#include <string.h>
/*
* gcc -g -I . -L . -lavocado tbe_bench/str_benchmak.c
*/
@a2800276
a2800276 / benchmark.c
Created March 8, 2012 10:16
straightforward C port of Go (golang) Benchmark facility.
/*
* this is a fairly straightforward port of go-langs bench utility
* to C ...
* usage:
* see sample `main` at bottom
* original code see:
* http://golang.org/src/pkg/testing/benchmark.go
*
* Thanks to https://github.com/jbenet for "portable" c nanosec timer:
* https://gist.github.com/1087739
@a2800276
a2800276 / Benchmark.java
Created March 8, 2012 10:16
straightforward Java port of Go (golang) Benchmark facility.
package benchmark;
import java.lang.reflect.*;
import java.util.*;
import java.util.regex.*;
abstract class InternalBenchmark {
String name;
abstract void runBenchmark (Benchmark b);
}
@a2800276
a2800276 / benchmark.js
Created February 23, 2012 10:23
benchmark.js : mini benchmark facility, port from go, see: http://golang.org/pkg/testing/
// Fairly straightforward port of go's benchmark impl.
// see: http://golang.org/pkg/testing/
// todo: result formatting facilities ...
var Benchmark = function () {
}
@a2800276
a2800276 / nodecamp.eu-talks-2011.md
Created June 14, 2011 04:37 — forked from fhemberger/nodecamp.eu-talks-2011.md
A collection of talks and presentations held at nodecamp.eu 2011