Skip to content

Instantly share code, notes, and snippets.

View itslukej's full-sized avatar
🥑

Luke James itslukej

🥑
View GitHub Profile
@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 / protomap.ts
Last active March 30, 2020 22:40
Simple map-like interface for encoded storage w/ bigint keys
declare class ProtoMessage {
serializeBinary(): Uint8Array;
static deserializeBinary(bytes: Uint8Array): any;
}
export default class ProtoMap<K, V extends ProtoMessage> {
private map: Map<K, ReturnType<ProtoMessage["serializeBinary"]>> = new Map;
constructor(private message: typeof ProtoMessage) {}
@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;
@itslukej
itslukej / index.js
Created February 4, 2020 15:49
Protobuf test
const protobuf = require('protobufjs');
const sizeof = require('object-sizeof');
protobuf.load("invite.proto", (err, root) => {
const Invite = root.lookupType("prototest.Invite");
const payload = {
code: 'vexera',
guild_id: 228838562500575233n,
guild_name: 'Vexera Official',
@itslukej
itslukej / ksoft_scrape.js
Last active January 22, 2020 14:35
Proof of Concept to scrape lyrics from KSoft.Si's upcoming lyrics pages
const puppeteer = require('puppeteer');
async function getLyrics(url) {
const browser = await puppeteer.launch({ headless: false });
const [page] = await browser.pages();
await page.setRequestInterception(true);
page.on('request', request => {
if (request.resourceType() === 'script')

Keybase proof

I hereby claim:

  • I am itslukej on github.
  • I am lukeuke (https://keybase.io/lukeuke) on keybase.
  • I have a public key ASCEXV66t2aXSQiQkw9y-XlGLqXMMPZHB8YRmmmEBVMfoAo

To claim this, I am signing this object:

@itslukej
itslukej / zws.im.sxcu
Created June 16, 2019 23:03
ZWS.IM ShareX custom uploader
{
"Version": "12.4.1",
"Name": "zws.im",
"DestinationType": "URLShortener",
"RequestMethod": "GET",
"RequestURL": "https://us-central1-zero-width-shortener.cloudfunctions.net/shortenURL",
"Parameters": {
"url": "$input$"
},
"URL": "https://zws.im/$json:short$"
@itslukej
itslukej / domains.js
Last active May 6, 2019 01:40
Find the shortest domains on park.io
const tlds = ['io', 'ly', 'to', 'me', 'pro', 'red', 'sh', 'ac', 'vc', 'gg', 'je', 'mn', 'bz', 'ag', 'sc', 'lc'];
const superagent = require('superagent');
const cheerio = require('cheerio');
const word = require('check-word')('en');
function getUrl(tld, page = 1) {
return `https://park.io/domains/index${tld == 'io' ? '' : `/${tld}`}/page:${page}`;
}
@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": "+"
},
{
@itslukej
itslukej / dbots.js
Created February 13, 2018 23:36
A script to grab all bots from discordbots.org
const superagent = require('superagent');
const bots = [];
(async () => {
for(let off = 0; off < 100; off++) {
const r = await superagent.get(`https://discordbots.org/api/bots?offset=${off*50}&limit=50`);
// Sort through bots
for(let botScraped of r.body.results) {
const bot = {
discord_id: botScraped.id,