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
lox / mirror_test.sh
Last active Nov 19, 2018
A bash script to select the fastest ubuntu apt geo-mirror
View mirror_test.sh
#!/bin/bash -e
# mirror_test.sh
# benchmarks closest ubuntu mirrors and outputs them in speed order
# bash -c "$(curl -fsSL https://gist.githubusercontent.com/lox/9152137/raw/mirror_test.sh)"
RELEASE=$(lsb_release -c -s 2>/dev/null || echo 14.04)
MIRRORS=$(curl -s http://mirrors.ubuntu.com/mirrors.txt)
TESTFILE="dists/$RELEASE/main/binary-amd64/Packages.bz2"
TIMEOUT=1
@rofl0r
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
pezz / crypto-pi-root.md
Last active May 3, 2019
Archlinux ARM encrypted root
View crypto-pi-root.md

Intro

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
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 USERNAME@chat.hipchat.com 'PASSWORD'
  • account hipchat set nick_source full_name
  • account hipchat set resource bot
  • account hipchat on
@packz
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
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
johntyree / getBlockLists.sh
Last active May 23, 2019
Make one large blocklist from the bluetack lists on iblocklist.com
View getBlockLists.sh
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@trey
trey / happy_git_on_osx.md
Last active May 21, 2019
Creating a Happy Git Environment on OS X
View happy_git_on_osx.md

Creating a Happy Git Environment on OS X

Step 1: Install Git

brew install git bash-completion

Configure things:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"
@stran12
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.

Pre-requisites

This is for

@jehiah
jehiah / git-branch-status
Last active Aug 20, 2018
show git ahead/behind info for branches
View git-branch-status
moved to github --> https://github.com/bill-auger/git-branch-status/
You can’t perform that action at this time.