Skip to content

Instantly share code, notes, and snippets.

Ján Sáreník jsarenik

Block or report user

Report or block jsarenik

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
lox /
Last active Nov 19, 2018
A bash script to select the fastest ubuntu apt geo-mirror
#!/bin/bash -e
# benchmarks closest ubuntu mirrors and outputs them in speed order
# bash -c "$(curl -fsSL"
RELEASE=$(lsb_release -c -s 2>/dev/null || echo 14.04)
MIRRORS=$(curl -s
rofl0r / init.c
Created Aug 6, 2013
minimal init daemon by rich felker, author of musl libc
View init.c
#define _XOPEN_SOURCE 700
#include <signal.h>
#include <unistd.h>
int main()
sigset_t set;
int status;
if (getpid() != 1) return 1;
pezz /
Last active Aug 16, 2019
Archlinux ARM encrypted root


Just some FYI, to get started:

  • I'm using a 16 GB Sandisk SD card.
  • I have a model B Pi, 512 MB RAM (not really relevant, thought I'd mention it).
  • Monitor and keyboard connected to the Pi itself, for now.
  • Network working, internet access.
taylor / HOWTO-bitlbee+hipchat.mkd
Created Dec 16, 2012
Using bitlbee with HipChat
View HOWTO-bitlbee+hipchat.mkd

Using bitlbee with HipChat

Initial setup

  • account add jabber 'PASSWORD'
  • account hipchat set nick_source full_name
  • account hipchat set resource bot
  • account hipchat on
packz / 000.mkd
Created Nov 15, 2012
Static cryptsetup
View 000.mkd

I suppose you use Debian-like systems

$ mkdir rootdir && cd rootdir && export ROOTDIR=$PWD
$ apt-get source libdevmapper1.02.1
$ apt-get source cryptsetup
jberger / gist:3916068
Created Oct 19, 2012
darabase app example
View gist:3916068
#!/usr/bin/env perl
use Mojolicious::Lite;
# connect to database
use DBI;
my $dbh = DBI->connect("dbi:SQLite:database.db","","") or die "Could not connect";
# shortcut for use in template
helper db => sub { $dbh };
johntyree /
Last active Aug 13, 2019
Make one large blocklist from the bluetack lists on
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
gavinandresen /
Created Jun 20, 2012
Transaction Fee rework proposal

Reworking Bitcoin Transaction Fees

Transaction fees as they are currently implemented in the original Bitcoin code suffer from a few problems:

  • The rules are complicated and ad-hoc
  • Fees are hard-coded and do not reflect real costs
  • Adding fees to a transaction doesn't necessarily make it more likely the transaction will be confirmed more quickly.

I'm proposing changing the rules miners use to decide what transactions to include in their blocks, and changing the way clients tell users whether or not any particular transaction "needs" a fee to be confirmed in a reasonable amount of time.

trey /
Last active Aug 14, 2019
Creating a Happy Git Environment on OS X

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global "Your Name"
git config --global ""
stran12 / gist:1394757
Created Nov 26, 2011
Step-by-step installation of cGit with Nginx
View gist:1394757

How to install cGit on Nginx (Ubuntu server)

Step-by-step installtion of cGit on nginx without funky rewrite rules.


This is for

You can’t perform that action at this time.