Skip to content

Instantly share code, notes, and snippets.

dikkini / unixhttpc.go
Created Dec 17, 2020 — forked from teknoraver/unixhttpc.go
HTTP over Unix domain sockets in golang
View unixhttpc.go
package main
import (
dikkini /
Created Aug 8, 2020 — forked from bjoern-r/
How to use a Huawei E3372 on OpenWRT

HOWTO use a Huawei E3372 on OpenWRT

This modem is also sold as a MegaFon M150-2 USB dongle

Needed Software

Install the needed packages via opkg tool

opkg update
dikkini /
Created Oct 18, 2017 — forked from danielrichman/
nicer postgres connection class & flask postgres
class PostgreSQLConnection(psycopg2.extensions.connection):
A custom `connection_factory` for :func:`psycopg2.connect`.
* puts the connection into unicode mode (for text)
* modifies the :meth:`cursor` method of a :class:`psycopg2.connection`,
facilitating easy acquiring of cursors made from
dikkini / boot.js
Created Nov 9, 2015 — forked from jdxcode/boot.js
zero-downtime node.js app runner
View boot.js
// This script will boot app.js with the number of workers
// specified in WORKER_COUNT.
// The master will respond to SIGHUP, which will trigger
// restarting all the workers and reloading the app.
var cluster = require('cluster');
var workerCount = process.env.WORKER_COUNT || 2;
// Defines what each worker needs to run