Skip to content

Instantly share code, notes, and snippets.

@AymaneHrouch
AymaneHrouch / autosub_reddit.js
Last active April 20, 2024 19:11
Auto subscribe to a lot of subreddits after you move to a new account.
/*
-Visit https://old.reddit.com/subreddits/ using your old account
-Copy link address of "multireddit of your subscriptions"
It will give you a link address like this: https://old.reddit.com/r/[subreddit1+subreddit2...+subredditN]
Please note that if you have a lot of subreddits the link won't work because there's a limit to the link's length, you can simply split it to two or three links
-Visit that link (or links) using your new account.
-Open the console by pressing F12 and then clicking the console tab
-Past the code bellow and press enter. You're welcome :)
*/
const sub = () => {

Generate root/intermediate/end certs

Run https://gist.github.com/bprashanth/d79b9810dea8b07a7bb1ccf467be5b66 (some googling + fiddling of how to generate intermediates with openssl, so don't take this as an authoritative guide). That script will create 3 CSRs, one for the root, one for an intermediate, and the last one for the end user. You probably don't care about most of the fields of the CSR execpt for "Common Name", eg:

If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:
State or Province Name (full name) [Some-State]:
Locality Name (eg, city) []: