Skip to content

Instantly share code, notes, and snippets.

@neatville
neatville / PiA_Setup.py
Last active November 6, 2017 20:59
After installing PiA client on ubuntu
# https://www.privateinternetaccess.com/pages/client-support/ubuntu-openvpn
# cd /etc/NetworkManager/system-connections
import fileinput, glob, os
def replace(file):
for line in fileinput.input(file, inplace=True):
print(line.rstrip().replace('password-flags=1', 'password-flags=0'))
your_pw = "YOUR PASSWORD"
@neatville
neatville / gist:7191a726a3ba2494f4e8
Created September 20, 2014 03:46
Use jQuery replaceWith for easy yet powerful DOM manipulation.
var href = $(".link").attr("href");
var textOf = $(".link").text();
$( "a" ).click(function() {
$( this ).replaceWith( "<textarea autofocus>" + href + " -> " + textOf + "</textarea>" );
});