Skip to content

Instantly share code, notes, and snippets.

View ridgewell's full-sized avatar

William Chen ridgewell

View GitHub Profile
@tpretz
tpretz / pia-wg.sh
Created April 19, 2020 11:12
PIA wireguard enroll
#!/bin/bash
# requires data.json from the PIA application /opt/piavpn/etc/data.json in the working dir
USR=""
PASS=""
LOC="uk"
# generated public key
PKEY=""
@bchauSW
bchauSW / sub2sub.py
Last active July 18, 2019 04:00
This script finds a person who posts to two specified subreddits.
import praw
reddit = praw.Reddit(client_id='clientid',
client_secret='clientsecret',
password='password',
user_agent='Script by me',
username='username')
checked_users = []
with open('users.txt', 'w+') as f:
@bchauSW
bchauSW / redditDataParser.py
Last active December 4, 2020 14:58
This script uses the PRAW library to extract title data from https://www.reddit.com/r/r4r30Plus and format the data into a CSV file.
import praw
import re
from collections import Counter
reddit = praw.Reddit(client_id='clientid',
client_secret='clientsecret',
password='password',
user_agent='Script by me',
username='username')
@IceCereal
IceCereal / RedditDataDownloader.py
Last active July 14, 2019 20:01
Reddit (Subreddit) Data Downloader. This one is configured to images, so the extensions are according to images. The Reddit (Subreddit) Data Saver is used to save data (Title, Content) to a particular directory.
"""
This is a downloader of data from a particular subreddit.
Change the `subredditName` to your desired subreddit and then
watch the things get downloaded. You need praw (at the time of
writing this, it's praw6) and wget to run this program.
Step 1: https://www.reddit.com/prefs/apps <- Make an Application
Get the client_id and client_secret
Step 2: Enter desired subreddit in subredditName
Step 3: Run the program
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@waaaaargh
waaaaargh / multiple-processes
Last active February 12, 2018 17:32
[Draft] This document explains how to run multiple tor processes on one host.
Managing multiple Tor processes on one host
===========================================
Due to Tor's internal architecture, running only one Tor process per physical
host is often not enough. As a thumb rule, you should run one Tor process per
physical CPU core to make full use of the host's CPU power. This, however
brings with it other difficulties: The tor network limits the number of Tor
relays per IP in the consensus to 2. Also, the relay nodes should be rechable
on Port 80 and 443 since those ports are often unfiltered and unblocked.