Skip to content

Instantly share code, notes, and snippets.

Deniz Adrian zined

Block or report user

Report or block zined

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:3238689420ed804171b8
~/s/h/b/h/s/g/m/h/c/hekad git:dev ❯❯❯ pwd && strace -f go build 2>&1 | grep 'liblua\.'
/home/zined/src/heka/build/heka/src/github.com/mozilla-services/heka/cmd/hekad
[pid 9298] open("/opt/local/lib/liblua.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 9298] open("/opt/local/lib/liblua.a", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 9298] open("/usr/local/lib/liblua.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 9298] open("/usr/local/lib/liblua.a", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 9298] open("/usr/lib/liblua.so", O_RDONLY) = 17
[pid 9298] open("/usr/lib/liblua.so", O_RDONLY) = 18
~/s/h/b/h/s/g/m/h/c/hekad git:dev ❯❯❯
View gist:4baed1ca60bc5375f01a
[WebPoolJupiterElbLogsInput]
type = "LogstreamerInput"
log_directory = "/logs/jupiter"
file_match = '(?P<Year>\d+)/(?P<Month>\d+)/(?P<Day>\d+)[^_]+_[^_]+_[^_]+_[^_]+_\d+T(?P<Hour>\d{2})(?P<Minute>\d{2})Z_(?P<ElbIP>[^_]+)_[^\.]+\.log'
priority = ["Year", "Month", "Day", "Hour", "Minute"]
decoder = "ElbLogDecoder"
[ElbLogDecoder]
type = "PayloadRegexDecoder"
match_regex = '^(?P<TheWholeFuckingLine>.*)$'
View gist:dd479c93c4492fe5ea07
[hekad]
base_dir = "/tmp"
[TestTcpInput]
type = "TcpInput"
address = ":12345"
parser_type = "token"
delimiter = "\n"
decoder = "TestDecoder"
View keybase.md

Keybase proof

I hereby claim:

  • I am zined on github.
  • I am zined (https://keybase.io/zined) on keybase.
  • I have a public key whose fingerprint is 54F3 3D56 ED68 B567 68CE C45F 0452 F202 4D6B E444

To claim this, I am signing this object:

@zined
zined / hex_no_nulls.php
Created Sep 23, 2012
padded, reversed, hex strings without nulls
View hex_no_nulls.php
#!/usr/bin/php
<?php
function ascii_hex ($char) {
$ret = '';
for ($i=0;$i<strlen($char);++$i)
$ret .= dechex(ord($char{$i}));
if (strlen($ret) < 2) return '0'.$ret;
return $ret;
}
@zined
zined / cfengine_test_1.cf
Created Oct 30, 2012
cfengine test snippet #1
View cfengine_test_1.cf
bundle edit_line that_foo_line_be_gone
{
replace_patterns:
"^foo is a foo line$"
comment => "that foo line be gone! that bar line be there!",
replace_with => exchange_foo_line_with_bar_line;
}
body replace_with exchange_foo_line_with_bar_line
{
@zined
zined / gist:3995952
Created Nov 1, 2012
bluetooth works great
View gist:3995952
[root@horst ~]# while (true); do hidd --search ; sleep 1; done
Searching ...
Connecting to device B8:F6:B1:0C:CE:1C
Can't get device information: Connection reset by peer
Searching ...
Connecting to device B8:F6:B1:0C:CE:1C
Can't get device information: Transport endpoint is not connected
Searching ...
Connecting to device B8:F6:B1:0C:CE:1C
Can't get device information: Transport endpoint is not connected
@zined
zined / gist:4135279
Created Nov 23, 2012
any minute cfengine3 class definition?
View gist:4135279
classes:
"MinAny" or => {
"Min00", "Min01", "Min03", "Min04", "Min05", "Min06", "Min07", "Min08", "Min09",
"Min10", "Min11", "Min13", "Min14", "Min15", "Min16", "Min17", "Min18", "Min19",
"Min20", "Min21", "Min23", "Min24", "Min25", "Min26", "Min27", "Min28", "Min29",
"Min30", "Min31", "Min33", "Min34", "Min35", "Min36", "Min37", "Min38", "Min39",
"Min40", "Min41", "Min43", "Min44", "Min45", "Min46", "Min47", "Min48", "Min49",
"Min50", "Min51", "Min53", "Min54", "Min55", "Min56", "Min57", "Min58", "Min59",
};
@zined
zined / gist:4136410
Created Nov 23, 2012
reverse / tail_reverse
View gist:4136410
-module(mylist).
-export([tail_reverse/1, tail_reverse/2, reverse/1]).
reverse([]) -> [];
reverse([H|T]) -> reverse(T)++[H].
tail_reverse(L) -> tail_reverse(L, []).
tail_reverse([], Accumulator) -> Accumulator;
tail_reverse([H|T], Accumulator) -> tail_reverse(T, [H|Accumulator]).
@zined
zined / ugly.js
Created Dec 10, 2012
ugly ugly :)
View ugly.js
var https = require('https');
var tuples = new Array(
Math.floor(Math.random(254)*100),
Math.floor(Math.random(254)*100),
Math.floor(Math.random(254)*100),
Math.floor(Math.random(254)*100));
var ip = tuples.join('.');
var MAX_URLS = 30;
You can’t perform that action at this time.