Skip to content

Instantly share code, notes, and snippets.

import os
import time
import subprocess
import sys
fileList = []
rootdir = raw_input("Root Dir: ")
for root, subFolders, files in os.walk(rootdir):
for file in files:
theFile = os.path.join(root,file)
#!/bin/sh
# VPN and Torrent on Ubuntu 14.04 on Digital Ocean
# References:
# Torrent - https://gist.github.com/timothyandrew/6162351
# Torrent - http://filesharefreak.com/2012/05/10/seedbox-from-scratch-new-server-to-seeding-in-less-than-5-minutes
# VPN - https://www.digitalocean.com/community/articles/how-to-setup-a-multi-protocol-vpn-server-using-softether
DIR="`pwd`"
apt-get update -y && apt-get upgrade -y
Here is a sample of how I am currently dealing with users.
Big thanks to uggedal! I used his user states as an example: https://github.com/uggedal/states
###
# How to create password hashes
###
python -c "import crypt; print crypt.crypt('password', '\$6\$SALTsalt\$')"
###
import re
myfile = open('list', 'r')
callnos = myfile.readlines()
p = re.compile("""^(?P<aclass>[A-Z]{1,3})
(?P<nclass>\\d{1,4})(\\ ?)
(\\.(?P<dclass>\\d{1,3}))?
(?P<date>\\ [A-Za-z0-9]{1,4}\\ )?
widgets.outbrain.com images.outbrain.com odb.outbrain.com trc.taboola.com netstorage.taboola.com images.taboola.com cdn.taboola.com cdn.taboolasyndication.com nau.hexagram.com a.discuscdn.com disqus.com go.disqus.com referrer.disqus.com www.smartlinks.dianomi.com