Skip to content

Instantly share code, notes, and snippets.

View zudsniper's full-sized avatar
🎲
snake eyes every time

zod zudsniper

🎲
snake eyes every time
View GitHub Profile

Setting up Localhost Nginx Reverse Proxy to react app

This helps you develop react apps through a sub domain secured by ssl through nginx without much hassle. Current config from Laragon on Windows

server {
    listen 80;
    listen 443 ssl;
@daviguima
daviguima / gist-oneliner
Created March 9, 2020 14:06
upload file to gist.github.com using curl
curl -X POST -d '{"public":true,"files":{"test.txt":{"content":"String file contents"}}}' -u mgarciaisaia:mypassword https://api.github.com/gists
# https://stackoverflow.com/questions/34048241/how-to-create-a-gist-on-command-line
upstream node_server {
server localhost:3000;
}
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
@vanyle
vanyle / modding_discord.md
Last active April 4, 2025 14:10
Modding the Discord client

Modding the discord client

Disclaimer: Modding the discord client is against Discord's term of service. I'm not responsible if any action is taken against you.

Why modding ?

Modding the client will allow you to customize to:

  • change the appearance of the discord client
  • have script to automaticaly send messages at specific times
  • log messages from a chat into a local file

This guide will explain how to inject js code into the discord client and send messages. I'm assuming you know you to write javascript code and are using Windows.

@janwillemtulp
janwillemtulp / simple-password-protection.svelte
Created May 20, 2020 12:45
Svelte simple static page password protection
<script>
let password = ''
const hash = s =>
s.split('').reduce((a, b) => {
a = (a << 5) - a + b.charCodeAt(0)
return a & a
}, 0)
$: console.log(password, hash(password))
@ld100
ld100 / ArchLinuxWSL2.md
Last active March 24, 2025 13:09
Steps for setting up Arch Linux on WSL2

Migrating from Ubuntu on WSL to ArchLinux on WSL2

Obsolete notice

This document was created back in 2020 and might not be actual nowadays. It is not supported anymore, so use thise information at your own risk.

Upgrading to WSL 2

  • Download WSL2 Kernel
  • run wsl --set-default-version 2 in windows command line, so that all future WSL machine will use WSL2.
@lysender
lysender / export-import-gpg-keys.md
Created July 1, 2020 03:35
Export and import GPG Keys

Export public key

gpg --export [email protected] > my_key.pub 

The file can then be shared to other people.

Export public key in armor ascii format

@Armster15
Armster15 / GetDiscordTokenFromConsole.js
Last active April 18, 2025 17:43
A script that, when copypasted in the Discord console, it gives you your Discord token
/*
This allows you to get your Discord token via the Discord console.
Why this method?
- Simpler, just copy paste the function and call it, no need to monitor and manually look for headers
- More accurate
- More visually appealing
This code is licensed under The Unlicense. For more information please visit https://unlicense.org/
@bluewalk
bluewalk / GetNordVPNWireGuardDetails.md
Last active May 1, 2025 22:26
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

@tomschr
tomschr / pathlib_and_json.py
Created May 1, 2021 15:11
Read and write JSON files with pathlib.Path
# Source
# Mastering Object-Oriented Python - Second Edition by Steven F. Lott Published by Packt Publishing, 2019
# https://learning.oreilly.com/library/view/mastering-object-oriented-python/9781789531367/c34be237-5ccd-4775-a0b0-ec1f7652f7bc.xhtml
#
from pathlib import Path
# write JSON files:
with Path("temp.json").open("w", encoding="UTF-8") as target:
json.dump(travel3, target, default=blog_j2_encode)