Skip to content

Instantly share code, notes, and snippets.

View patch.sh
# Add extra options to .ovpn files
resolv_script="/etc/openvpn/update-resolv-conf"
auth="auth"
extra="
script-security 2
up $resolv_script
down $resolv_script
auth-user-pass $auth"
@vaultah
vaultah / _.md
Last active Oct 27, 2016
Code test
View _.md

The task is

> Given an array of ints, return True if the sequence.. 1, 3, 4 .. appears in the array somewhere.

@vaultah
vaultah / PEP366_boilerplate.py
Last active Sep 11, 2022
Generic boilerplate code for setting __package__ attribute for relative imports
View PEP366_boilerplate.py
import sys, importlib
from pathlib import Path
def import_parents(level=1):
global __package__
file = Path(__file__).resolve()
parent, top = file.parent, file.parents[level]
sys.path.append(str(top))
View keybase.md

Keybase proof

I hereby claim:

  • I am vaultah on github.
  • I am vaultah (https://keybase.io/vaultah) on keybase.
  • I have a public key whose fingerprint is 48B1 41EA 200A 896F 13DB 6DA3 BBB3 56D0 5E76 E1D9

To claim this, I am signing this object:

View common_comments_box.user.js
// ==UserScript==
// @name Common Comments Box (Stack Overflow)
// @namespace about:blank
// @include http*://stackoverflow.com/questions/*
// @version 1
// @grant none
// ==/UserScript==
var common_comments = [
"It looks like you want us to write some code for you. While many users are willing to produce code for a coder in distress, they usually only help when the poster has already tried to solve the problem on their own. A good way to demonstrate this effort is to include the code you've written so far, example input (if there is any), the expected output, and the output you actually get (console output, tracebacks, etc.). The more detail you provide, the more answers you are likely to receive. Check the [FAQ] and [ask].",