Skip to content

Instantly share code, notes, and snippets.

View literally1984's full-sized avatar
🕷️
l

literally1984 literally1984

🕷️
l
View GitHub Profile
@MarvNC
MarvNC / get-discord-token-from-browser.md
Last active July 16, 2026 20:44
How to Get Your Discord Token From the Browser Developer Console

How to Get Your Discord Token From the Browser Console

  1. Open the browser developer tools (F12 or Ctrl + Shift + I) and click the Console tab.
  2. Paste the following code into the console and press Enter:
(w=webpackChunkdiscord_app).push([[Symbol()],{},o=>{try{Object.values(o.c).some(e=>e.exports?.setToken&&(w.t=e.exports.getToken()))}catch{}}]),w.t

(Contributed by @Risim-hanse)

@OopsieWoopsie
OopsieWoopsie / cloudflare.sh
Last active April 8, 2026 15:34
Only allow CloudFlare connections to your web server
#!/bin/bash
# This script downloads the actual list of CloudFlare's IPv4/6 ranges
# and allows them to connect to the 443 port (HTTPS) and drops
# connections from other addresses.
# This is to prevent DDoS attacks and attackers from using the "Host"
# header to identify your server backend address.
# download the lists
ranges4=$(curl -s https://www.cloudflare.com/ips-v4)
ranges6=$(curl -s https://www.cloudflare.com/ips-v6)
@legobyte
legobyte / AndroidSnippets.kt
Last active December 8, 2024 17:01
Android code snippets in Kotlin
// Make EditText clickable not editable
fun makeEditTextClickable(et:EditText){
et.isFocusableInTouchMode = false
et.isLongClickable = false
}
// extract activity from a given context
fun requireActivity(context: Context): Activity {
if (context is Activity) {
return context
@bmaupin
bmaupin / free-database-hosting.md
Last active July 9, 2026 16:44
Free database hosting
@wavezhang
wavezhang / java_download.sh
Last active July 15, 2026 01:26
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@lopezjurip
lopezjurip / Caddyfile
Last active August 5, 2025 00:24
Fix Too Many Redirect error using Caddy + Cloudflare
www.mysite.com, mysite.com {
proxy / webapp:3000 {
proxy_header Host {host}
proxy_header X-Real-IP {remote}
proxy_header X-Forwarded-Proto {scheme}
}
gzip
tls your@email.com
}