Skip to content

Instantly share code, notes, and snippets.

View itslukej's full-sized avatar
🥑

Luke James itslukej

🥑
View GitHub Profile
@itslukej
itslukej / proxmox.md
Created December 3, 2023 15:52
Swap from legacy boot to UEFI - Proxmox ZFS
  1. Get a proxmox ISO mounted

  2. boot to bios, switch to uefi, boot to ISO

  3. head to Install Proxmox (Debug Mode) under advanced options

  4. press ctrl-d to launch a terminal

  5. mount zfs, then chroot into it

#!/usr/bin/env python3
# Download your data dump and place this file in the messages folder of your data dump.
# Then run it!
from datetime import datetime, timedelta, timezone
import dateutil.parser
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
import csv
#!/usr/bin/env python3
# Download your data dump and place this file in the messages folder of your data dump.
# Then run it!
from datetime import datetime, timedelta, timezone
import dateutil.parser
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import matplotlib.dates as mdates
import csv
@itslukej
itslukej / tunneling.md
Created September 16, 2023 01:12
Tunneling a whole process through wireguard

Tunneling a whole process through wireguard

Certain company blocking a certain hosting provider? No problem, just tunnel the process through a small VPS with wireguard.

Consider server A your blocked server and server B your VPS.

Step 1: Generate a keypair on server A and server B

Server A:

@itslukej
itslukej / voice_servers.json
Created March 8, 2020 22:00
List of all of discord's voice servers as of 08-03-2020
[
{
"ip": "185.50.107.211",
"dns": "brazil0.discord.gg",
"city": "Cotia",
"region": "São Paulo",
"country": "BR",
"org": "AS49544 i3D.net B.V"
},
{
@itslukej
itslukej / discord.proto
Last active June 10, 2023 11:35
Protobuf messages for Discord
syntax = "proto3";
package discord;
message Icon {
bytes hash = 1;
bool animated = 2;
}
message Guild {
string name = 2;
# Caches movie covers, tv covers and other media
# Replace <YOUR PLEX TOKEN> with a random plex token
# docker-compose.yml
# varnish:
# image: "varnish:fresh"
# network_mode: "host"
# environment:
# VARNISH_SIZE: 2G
# VARNISH_HTTP_PORT: 32500
@itslukej
itslukej / jsonify.js
Last active March 16, 2023 19:47
JSON Serialiser written in pure mongodb aggregate.
db.aggregate([{
$replaceRoot: {
newRoot: {
_id: '$_id',
data: {
$objectToArray: '$$ROOT'
}
}
}
},
@itslukej
itslukej / fix_metadata.sh
Created January 9, 2023 00:47
Fix incorrect metadata for Plex Media Server Linux
#!/bin/sh
/usr/lib/plexmediaserver/Plex\ Media\ Server \
--sqlite /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/Plug-in\ Support/Databases/com.plexapp.plugins.library.db \
"UPDATE metadata_items SET added_at = created_at WHERE added_at > strftime('%s', 'now');"
@itslukej
itslukej / a_lot_of_bots.json
Created February 13, 2018 23:54
Discord Bots
[
{
"discord_id": "247056469894103041",
"name": "Tink",
"invite": "https://discordapp.com/oauth2/authorize?permissions=8&scope=bot&client_id=247056469894103041",
"short_desc": "A multipurpose bot for Discord.",
"support_invite": null,
"prefix": "+"
},
{