Skip to content

Instantly share code, notes, and snippets.

View slobo's full-sized avatar

Slobodan Mišković slobo

View GitHub Profile
Started nomad server.
Loaded configuration from /etc/nomad.d/server/server.hcl
==> Starting Nomad agent...
2018/02/13 06:42:22 [WARN] raft: Rejecting vote request from 10.10.1.119:8300 since we have a leader: 10.10.11.34:8300
raft: Rejecting vote request from 10.10.1.119:8300 since we have a leader: 10.10.11.34:8300
2018/02/13 06:42:24 [ERR] raft: peer {Voter e53b47d1-5560-54bc-d221-b609472f2ab3 10.10.1.119:8300} has newer term, stopping replication
raft: peer {Voter e53b47d1-5560-54bc-d221-b609472f2ab3 10.10.1.119:8300} has newer term, stopping replication
2018/02/13 06:42:25 [INFO] raft: aborting pipeline replication to peer {Voter e53b47d1-5560-54bc-d221-b609472f2ab3 10.10.1.119:8300}
2018/02/13 06:42:25 [INFO] raft: Node at 10.10.11.34:8300 [Follower] entering Follower state (Leader: "")
2018/02/13 06:42:25 [INFO] consul: cluster leadership lost
@slobo
slobo / bench.pl
Created July 12, 2016 03:37
Slow Perl 5.18.2 regexp with UTF8
#!/usr/bin/env perl
use strict;
use warnings FATAL => 'all';
use Path::Class;
use Benchmark;
use Digest::MD5 qw(md5_hex);
sub print_timing {
@slobo
slobo / add-missing-change-id.pl
Last active August 29, 2015 14:15
Add Change-ID to git commits so they can be accepted for review by gerrit
#!/usr/bin/env perl
# run as `git filter-branch --msg-filter /path/to/add-missing-change-id.pl [REF_SPEC]`
# where REF_SPEC is optional or something like origin/master..HEAD
use strict;
use warnings;
my $has_change_id;
while (<>) {
$has_change_id ||= m{Change-Id:};
#!/usr/bin/env python
import binascii, sys, json
from libmproxy import version, tnetstring, flow, protocol
from datetime import datetime
def create_har(flows):
return {
"log":{
"version": "1.2",