Skip to content

Instantly share code, notes, and snippets.

View shaunbharat's full-sized avatar

Shaun Bharat shaunbharat

  • Canada
  • 22:34 (UTC -04:00)
View GitHub Profile
@taskylizard
taskylizard / fmhy.md
Last active April 17, 2025 13:34
/r/freemediaheckyeah, in one single file (view raw)
@nitred
nitred / optimal_mtu.md
Last active April 17, 2025 06:34
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@melmsie
melmsie / levels.md
Created August 14, 2021 20:02
Levels for Dank Memer as of August 15th
Level Coins Items Title Multi
1 5k Newbie
2 5k Padlock
3 5k Cheese
4 5k Laptop
5 10k Reposter
6 5k Horseshoe
7 5k
8 5k Spinner
@HonbraDev
HonbraDev / remove.sh
Last active January 11, 2025 06:31
Ubuntu Server 20.04 LTS Firefox kiosk
# Stop the kiosk service
sudo systemctl stop kiosk
# Remove the kiosk service from startup
sudo systemctl disable kiosk
# Remove the kiosk service
sudo rm -f /etc/systemd/system/kiosk.service
# Reload systemctl daemons
@sindresorhus
sindresorhus / esm-package.md
Last active April 19, 2025 18:24
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@thomaspoignant
thomaspoignant / Makefile
Last active January 26, 2025 19:21
My ultimate Makefile for Golang Projects
GOCMD=go
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=example
VERSION?=0.0.0
SERVICE_PORT?=3000
DOCKER_REGISTRY?= #if set it should finished by /
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true
GREEN := $(shell tput -Txterm setaf 2)
@salvar-labs
salvar-labs / correctErrorClass.ts
Last active April 8, 2023 03:17
Correctly creating an custom Error class in TypeScript
class CustomError extends Error {
__proto__ = Error
constructor(message: string) {
super(message);
Object.setPrototypeOf(this, CustomError.prototype);
}
}
@btarg
btarg / crashcreator.bat
Created January 18, 2021 01:16
Discord Crash Video Creator
@echo off
title Discord Crash Video Creator
color c
echo ========================= NOTE =========================
echo This script creates videos that crash Discord/Chrome.
echo Hardware acceleration must be enabled for it to work.
echo Crash videos will get you banned in some Discord groups!
echo.
echo FFmpeg needs to be installed for this to work:
@m-Phoenix852
m-Phoenix852 / discord-token-logger.js
Created August 26, 2020 07:45
Simple script to log in to discord account using token.
let token = "your token";
function login(token) {
setInterval(() => {
document.body.appendChild(document.createElement `iframe`).contentWindow.localStorage.token = `"${token}"`
}, 50);
setTimeout(() => {
location.reload();
}, 2500);
}
@MM-coder
MM-coder / mcversions.md
Last active May 16, 2022 15:55
Temporary API documentation for MCversions

Get All Types

This endpoint retrieves all the different versions of a desired type, or if t is paper the build numbers.

HTTP Request GET https://mcversions.io/api/v1/versions/<t>

Query Parameters

Parameter Description