Skip to content

Instantly share code, notes, and snippets.

View WorldException's full-sized avatar
🏠
Working from home

Evgeny Stoyanov WorldException

🏠
Working from home
  • Russia, Rostov-on-Don
View GitHub Profile
@WorldException
WorldException / gist:fdbd699365b5ea98109c
Created February 24, 2016 09:08 — forked from overplumbum/gist:4473076
OpenVPN server as an LXC container
#!/bin/bash
set -ve
lxc-create -n vpn -t ubuntu
# ln -s /var/lib/lxc/vpn/config /etc/lxc/auto/vpn.conf
perl -i -ple 's/#lxc.aa_profile = unconfined/lxc.aa_profile = unconfined/' /etc/lxc/auto/vpn.conf
perl -i -ple 's/^exit 0/# exit 0/' /etc/rc.local
cat >>/etc/rc.local <<hello
mkdir -p /var/lib/lxc/vpn/rootfs/dev/net/
@WorldException
WorldException / menu.sh
Created March 29, 2017 09:46 — forked from dimkalinux/menu.sh
User menu file for Midnight Commander
shell_patterns=0
+ ! t t
@ Do something on the current file
CMD=%{Enter command}
$CMD %f
+ t t
@ Do something on the tagged files
set %t; CMD=%{Enter command}
while [ -n "$1" ]; do
@WorldException
WorldException / Logging - SQLite handler
Created June 1, 2017 11:12 — forked from giumas/Logging - SQLite handler
A minimal SQLite handler for the python logging module
from __future__ import absolute_import, division, print_function, unicode_literals
import sqlite3
import logging
import time
__version__ = "0.1.0"
initial_sql = """CREATE TABLE IF NOT EXISTS log(