Skip to content

Instantly share code, notes, and snippets.

View w7rus's full-sized avatar
💭
1'd

w7rus

💭
1'd
View GitHub Profile
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 3, 2024 08:08
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@infirms
infirms / portable_clang-cl.txt
Last active November 22, 2023 14:20
Portable clang-cl toolchain CI/CD
This information can be useful for ci/cd or creating reproducable build across all developers with 0 dependencies.
For clang-cl you need some specific msvc stuff that only comes with Visual Studio and it's built in compiler, fortunatenly @mmozeiko
created really really convinient solution for this big thanks to him.
Use his script to download both x86 and x64 msvc and later on merge 2 folders in one.
Script:
https://gist.github.com/mmozeiko/7f3162ec2988e81e56d5c4e22cde9977
Download latest clang release for win32 open exe installer with 7zip and extact bin and lib folder only for x64, for x86 we will crosscompile.
https://github.com/llvm/llvm-project/releases
@nitred
nitred / optimal_mtu.md
Last active May 1, 2024 15:22
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
@JonCole
JonCole / ThreadPool.md
Last active March 6, 2024 05:03
Intro to CLR ThreadPool Growth

ThreadPool Growth: Some Important Details

The CLR ThreadPool has two types of threads - "Worker" and "I/O Completion Port" (aka IOCP) threads.

  • Worker threads are used when for things like processing Task.Run(…) or ThreadPool.QueueUserWorkItem(…) methods. These threads are also used by various components in the CLR when work needs to happen on a background thread.
  • IOCP threads are used when asynchronous IO happens (e.g. reading from the network).

The thread pool provides new worker threads or I/O completion threads on demand (without any throttling) until it reaches the "Minimum" setting for each type of thread. By default, the minimum number of threads is set to the number of processors on a system.

Once the number of existing (busy) threads hits the "minimum" number of threads, the ThreadPool will throttle the rate at which is injects new threads to one thread per 500 milliseconds. This means that if your system gets a burst of work needing an IOCP thread, it will proces