Skip to content

Instantly share code, notes, and snippets.

// ==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].",

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:

@vaultah
vaultah / _.md
Last active October 27, 2016 18:51
Code test

The task is

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

@vaultah
vaultah / patch.sh
Created January 9, 2017 12:39
VPN patch
# 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
Created September 2, 2023 18:34
Add PostUp / PreDown rules to Wireguard configs to restrict traffic to the tunnel
# python3 /home/me/postup_predown.py /etc/wireguard/*.conf
sudo bash -c 'python3 /home/me/postup_predown.py /etc/wireguard/*.conf'
@vaultah
vaultah / PEP366_boilerplate.py
Last active September 5, 2023 21:28
Generic boilerplate code for setting __package__ attribute for relative imports
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))