Skip to content

Instantly share code, notes, and snippets.

View HarryET's full-sized avatar
🎒
Being a Student

Harry Bairstow HarryET

🎒
Being a Student
View GitHub Profile
@hex2f
hex2f / sharding-router.go
Created May 3, 2021 17:30
Sharding router for Discord slash command webhooks
package main
import (
"crypto/ed25519"
"encoding/hex"
"encoding/json"
"flag"
"fmt"
"log"
"os"
@advaith1
advaith1 / discordjs-slash-commands.md
Last active April 20, 2024 05:39
Slash Commands in Discord.js
@MPThLee
MPThLee / enableDiscordExperiments.js
Last active June 20, 2024 12:30
This code doesn't work anymore. I just decided to remove this code. You can check working code on comments.
/**
* !!!! This code doesn't work anymore !!!!
*
* - You can check working code on comments. I won't update this code anymore.
*
* Also, I just decided to remove this code. You can check revisions for old code.
* Since this code was made for discord client that almost 5 years ago, It seems like doesn't work anymore.
* I don't want people keep arguing in the comments, i decided to remove this code.
*
* Note: This code is now fulfilled with Javascript comments. This code won't work even if you pasted to console. doesn't do anything.
@beginor
beginor / snowflake-id.sql
Last active May 11, 2024 18:48
Twitter Snowflake ID for PostgreSQL
CREATE SEQUENCE public.global_id_seq;
ALTER SEQUENCE public.global_id_seq OWNER TO postgres;
CREATE OR REPLACE FUNCTION public.id_generator()
RETURNS bigint
LANGUAGE 'plpgsql'
AS $BODY$
DECLARE
our_epoch bigint := 1314220021721;
seq_id bigint;
package main
import (
"fmt"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
)
@k3kdude
k3kdude / DiscordWebhook.java
Created August 17, 2017 15:31
Java DiscordWebhook class to easily execute Discord Webhooks
import javax.net.ssl.HttpsURLConnection;
import java.awt.Color;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.reflect.Array;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
{"100":"💯","1234":"🔢","grinning":"😀","smiley":"😃","smile":"😄","grin":"😁","laughing":"😆","sweat_smile":"😅","joy":"😂","rofl":"🤣","relaxed":"☺️","blush":"😊","innocent":"😇","slightly_smiling_face":"🙂","upside_down_face":"🙃","wink":"😉","relieved":"😌","heart_eyes":"😍","kissing_heart":"😘","kissing":"😗","kissing_smiling_eyes":"😙","kissing_closed_eyes":"😚","yum":"😋","stuck_out_tongue_winking_eye":"😜","stuck_out_tongue_closed_eyes":"😝","stuck_out_tongue":"😛","money_mouth_face":"🤑","hugs":"🤗","nerd_face":"🤓","sunglasses":"😎","clown_face":"🤡","cowboy_hat_face":"🤠","smirk":"😏","unamused":"😒","disappointed":"😞","pensive":"😔","worried":"😟","confused":"😕","slightly_frowning_face":"🙁","frowning_face":"☹️","persevere":"😣","confounded":"😖","tired_face":"😫","weary":"😩","triumph":"😤","angry":"😠","rage":"😡","no_mouth":"😶","neutral_face":"😐","expressionless":"😑","hushed":"😯","frowning":"😦","anguished":"😧","open_mouth":"😮","astonished":"😲","dizzy_face":"😵","flushed":"😳","scream":"😱","fearful":"😨","cold_sweat":"😰","cry":"😢","disappoi
@hex2f
hex2f / emojis.json
Created July 26, 2017 13:18
A list of categorized emojis in JSON
{
"People":[
{
"icon":"😀",
"name":"grinning"
},
{
"icon":"😃",
"name":"smiley"
},