Skip to content

Instantly share code, notes, and snippets.

View DC3's full-sized avatar

Dee Cheung DC3

View GitHub Profile
@billywhizz
billywhizz / README.md
Last active February 15, 2024 17:04
example extracting audio mp3 from video file in browser using native browser api's

Setup

install the audio-encoder package

github

curl -L -o audio_encoder.js https://raw.githubusercontent.com/cstoquer/audio-encoder/master/dist/audioEncoder.js
@yusukebe
yusukebe / .gitignore
Last active November 27, 2023 15:52
node-benchmarks
node_modules
yarn.lock
yarn-error.log
*.tgz
@CPatchane
CPatchane / updateImageExif.js
Last active May 3, 2024 15:41
getaround-tech-blog_exif-data-manipulation-javascript
// Gist used for this getaround tech article: https://getaround.tech/exif-data-manipulation-javascript/
const getUpdatedImage = (image, onReady) => {
const reader = new FileReader()
reader.addEventListener("load", ({ target }) => {
if (!target) throw new Error("no blob found")
const { result: buffer } = target
if (!buffer || typeof buffer === "string") {
throw new Error("not a valid JPEG")
}
@ThioJoe
ThioJoe / Appx-Uninstaller.ps1
Last active June 30, 2024 14:11
A basic script for uninstalling a list of app packages in Windows 10/11, including those pre-installed with Windows
# A basic script for uninstalling app packages in Windows 10/11, including those pre-installed with Windows
#
# Note: If you get an error about the script not being allowed to run, the below command will change the execution polciy temporarily for one session only:
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process
#
# To execute the script, open a Powershell window to the directory with the script and run the following command using your scripts file name (and don't forget the .\ )
# .\WhateverScriptName.ps1
# -------------------------------------------------------------------------------------------
# Script by ThioJoe - https://github.com/ThioJoe
@kfox
kfox / README.md
Last active December 4, 2023 11:08
TCP echo server for Node.js

TCP echo server for Node.js

Usage

  1. Make sure you have a modern-ish version of Node.js installed.
  2. Type npx https://gist.github.com/kfox/1280c2f0ee8324067dba15300e0f2fd3
  3. Connect to it from a client, e.g. netcat or similar: nc localhost 9000
@insertish
insertish / React Native.md
Last active April 18, 2024 21:28
Configure React Native with Typescript, Vite.js for react-native-web and Storybook.
@jherr
jherr / Setup.md
Last active June 26, 2024 11:11
Jack's Setup
@pissang
pissang / wave.svg
Created November 25, 2021 08:44
wave.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nitred
nitred / optimal_mtu.md
Last active June 23, 2024 22:16
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
@FreddieOliveira
FreddieOliveira / docker.md
Last active July 3, 2024 02:41
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary