Skip to content

Instantly share code, notes, and snippets.

View jsarenik's full-sized avatar

Ján Sáreník jsarenik

View GitHub Profile
@taylor
taylor / HOWTO-bitlbee+hipchat.mkd
Created December 16, 2012 01:13
Using bitlbee with HipChat

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
@pezz
pezz / crypto-pi-root.md
Last active December 17, 2020 15:40
Archlinux ARM encrypted root

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.
@rofl0r
rofl0r / init.c
Created August 6, 2013 21:15
minimal init daemon by rich felker, author of musl libc
#define _XOPEN_SOURCE 700
#include <signal.h>
#include <unistd.h>
int main()
{
sigset_t set;
int status;
if (getpid() != 1) return 1;
@lox
lox / mirror_test.sh
Last active November 7, 2023 17:33
A bash script to select the fastest ubuntu apt geo-mirror
#!/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
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
nweb README for version 23
1) Bug fixed - was duplicating errors in the nweb.log file
- thanks to Kieran Grant for stopping this and pointing out the fix.
2) Added support for favicon.ico - if nothing elase this will stop annoying
errors in the log file. Most browsers on first encountering a webpage
also ask for this file. The name mean favourite icon - Wikipedia has
more on this. It is a tiny Bit Map image (normally called .bmp and
BMP editors can be used to create one - I used Windows Paint)
@zbrdge
zbrdge / mDNSResponder.plist.patch
Created April 12, 2014 12:18
OS X Chroot mDNSResponder
--- /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist 2014-04-12 05:15:39.000000000 -0700
+++ /tmp/com.apple.mDNSResponder.plist.new 2014-04-12 05:15:11.000000000 -0700
@@ -26,6 +26,7 @@
<key>Sockets</key>
<dict>
<key>Listeners</key>
+ <array>
<dict>
<key>SockFamily</key>
<string>Unix</string>
@penk
penk / main.cpp
Last active June 29, 2021 23:25
minimal QtWebEngine example
#include <QtGui/QGuiApplication>
#include <QtQml/QQmlApplicationEngine>
#include <QtWebEngine/qtwebengineglobal.h>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtWebEngine::initialize();
QQmlApplicationEngine appEngine;
appEngine.load(QUrl("main.qml"));
@CoinWhisperer
CoinWhisperer / burn-btc
Last active November 2, 2021 17:38
A simple python program to create bitcoin burn addresses.
#! /usr/bin/env python
"""
burn-btc: create a bitcoin burn address
By James C. Stroud
This program requries base58 (https://pypi.python.org/pypi/base58/0.2.1).
Call the program with a template burn address as the only argument::
@gavinandresen
gavinandresen / BlockPropagation.md
Last active March 14, 2023 09:45
O(1) block propagation

O(1) Block Propagation

The problem

Bitcoin miners want their newly-found blocks to propagate across the network as quickly as possible, because every millisecond of delay increases the chances that another block, found at about the same time, wins the "block race."