Skip to content

Instantly share code, notes, and snippets.

View Catbuttes's full-sized avatar

CatButtes Catbuttes

View GitHub Profile
@Catbuttes
Catbuttes / Mee6Response.md
Created February 4, 2020 13:18
Mee6 GDPR response

Hi 👋

i wasn't able to find a discord account linked to this email address 😦 underneath is the info you asked, including some extra's as you asked some stuff that isn't in the standard GDPR request email. if you can give me your Discord User ID then i can make the extract of your data. (how to get user ID: http://dis.gd/userid or on the MEE6 website, your name top right, billing, account information, field discord ID) Ps. i would be interested in knowing how many other bots provided all the needed data within 30 days. one of the previous times someone asked us all this, he told us that we where the only one to correctly answer within 30 days. curious to know how it changed over time, if you want to tell me that ofcourse)


Hi,

@Catbuttes
Catbuttes / AtlasResponse.md
Created February 4, 2020 16:24
Atlasbot GDPR response

Massive reminder that these answers are only according to my knowledge and I cannot currently verify if they are accurate answers. Sorry for the incoming DM spam!

  1. What information does Atlas collect about me?

The only information that Atlas collects and stores about you directly, that I am aware of, is your publicly available Discord username, discriminator, avatar, and ID, as well as what servers you are currently in (in order to display what servers you can edit the configuration of on the dashboard). The information we request from you is shown the very first time you log into the Atlas Dashboard - https://i.imgur.com/p6ngIEv.png - however it is also collected even if you don't directly authorize with the dashboard itself. The immediate uses of this information that comes to mind are:

  • Displaying who you are when logged into the dashboard (when authorized)
  • Displaying your position on a particular server's leaderboard, if the plugin is enabled (if the plugin was enabled at one point but disabled at a

Setting up a webhook to post new subreddit posts to a discord channel

Set up the webhook

  1. Go to Edit Channel on the channel you want to add the webhook to, then Integrations on the left hand side
  2. If the channel already has webhooks, click on View Webhooks and then the New Webhook button. If there are no existing webhooks, then you will only have a Create Webhook button in place of View Webhooks
  3. In the new webhook screen, enter in the name you wish to have the posts come in under and an avatar for the name
  4. Copy the Webhook URL - KEEP THIS PRIVATE
  5. Click save.

Set up IFTTT

@Catbuttes
Catbuttes / RE-RulesPrinter.js
Created February 22, 2020 21:49
A google apps script file to output the RE server rules to a channel
var POST_URL = "ENTER WEBHOOK URL HERE";
var INVITE_URL = "ENTER INVITE LINK HERE";
var REACTIONS_CHANNEL = "<#" + "ENTER REACTIONS CHANNEL ID HERE" + ">"
var DISCORD_SERVER_NAME = "Real Engineering Discord"
var HIGHLIGHT_COLOUR = 0x0432ff
function myFunction() {
var primaryRules = {
"method": "post",
Real Engineering Discord Rules and Requests
Primary rules
1. Be respectful
Our primary 'rule' is a simple one, we ask users to be respectful to others.
Be nice and civil, even when you disagree with someone or something. We will not tolerate hate or bigotry of any kind.
2. Work towards a solution
@Catbuttes
Catbuttes / pyaudioerror.txt
Created April 17, 2020 21:50
PyAudio install error
Running setup.py install for pyaudio ... error
ERROR: Command errored out with exit status 1:
command: /Users/edbrereton/src/tmp/tmp/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8y/_qjb0r2n0qsdysn9pcx_cjj80000gn/T/pip-install-n5_7zj8f/pyaudio/setup.py'"'"'; __file__='"'"'/private/var/folders/8y/_qjb0r2n0qsdysn9pcx_cjj80000gn/T/pip-install-n5_7zj8f/pyaudio/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/8y/_qjb0r2n0qsdysn9pcx_cjj80000gn/T/pip-record-b6x1poof/install-record.txt --single-version-externally-managed --compile --install-headers /Users/edbrereton/src/tmp/tmp/include/site/python3.7/pyaudio
cwd: /private/var/folders/8y/_qjb0r2n0qsdysn9pcx_cjj80000gn/T/pip-install-n5_7zj8f/pyaudio/
Complete output (16 lines):
running install
running build
running build_py
@Catbuttes
Catbuttes / rename.py
Created July 20, 2020 20:13
A quick and dirty script to rename files from the format "Sunday 25th February 2018.md" to the format "2018-02-25.md"
import datetime
import os
files = os.listdir("journal/2019")
for file in files:
if file == "images":
continue
a = file.replace("th", "")

Getting Vagrant and Ansible working on Windows 10

One of the big things I have started using both at work and at home is Ansible. It is an automated deployment tool that makes it really easy to create reproducable builds. This means I have needed to figure out a way to test the playbooks I am using to deploy and upgrade servers. Enter Vagrant.

At home, getting this working has been easy. My home machine is a macbook and everything just works on there. I can run ansible and vagrant natively and all is happy. When it comes to work though, that is a different matter. Like many professional developers I use Windows 10 at work. Where I have been using Ansible I have set up an environment using the Windows Subsytem for Linux (WSL) (specifically WSL2 - this is important later). I figured I could reuse this setup for vagrant and I was partly right.

Round 1 - HyperV doesn't want to listen

My first attempt to get things working was met with failur