Skip to content

Instantly share code, notes, and snippets.

run:
timeout: 15s
issues-exit-code: 1
tests: true
skip-dirs-use-default: true
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
@dikkini
dikkini / unixhttpc.go
Created December 17, 2020 08:54 — forked from teknoraver/unixhttpc.go
HTTP over Unix domain sockets in golang
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"
@dikkini
dikkini / Huawei_E3372_openwrt.md
Created August 8, 2020 09:39 — forked from bjoern-r/Huawei_E3372_openwrt.md
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
dikkini / connection_factory.py
Created October 18, 2017 20:00 — forked from danielrichman/connection_factory.py
nicer postgres connection class & flask postgres
class PostgreSQLConnection(psycopg2.extensions.connection):
"""
A custom `connection_factory` for :func:`psycopg2.connect`.
This
* 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
:cls:`psycopg2.extras.RealDictCursor`.
"""
@dikkini
dikkini / boot.js
Created November 9, 2015 07:58 — forked from jdx/boot.js
zero-downtime node.js app runner
// 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