Skip to content

Instantly share code, notes, and snippets.

View hugefiver's full-sized avatar
😴
Moing (🐟)

Hugefiver hugefiver

😴
Moing (🐟)
  • CSUST
  • China
View GitHub Profile
@Alfex4936
Alfex4936 / Python Sorting Algorithms.py
Last active October 27, 2022 13:39
Python Sorting Algorithms : (TimSort + Introspective Sort + bogo Sort + pancake Sort + Insertion Sort + Binary Insertion Sort + Count Sort + Merge Sort + Quick Sort + Bubble Sort)
import bisect
import heapq
import inspect
from random import randint, shuffle
from statistics import mean
from timeit import default_timer, repeat
import matplotlib.pyplot as plt
from bigO import bigO
from win10toast import ToastNotifier
/**
* MySQL Multi-Line Insert
* =======================
* See: https://gist.github.com/ProjectCleverWeb/d2362b082af1d7054ebfd464f202ec1b
*
* Notes:
* - I used a output buffer variable since in most languages variables are
* significantly faster than function calls and in this case the syntax for
* using a variable was both shorter and easier to read.
* - Table & column names are quoted to help improve compatibility, but in most
@journey-ad
journey-ad / oh-my-diana.user.js
Last active July 17, 2025 08:06
在哔站右下角添加嘉然小姐的live2d模型
// ==UserScript==
// @name #相亲相爱一嘉人#
// @description 在哔站右下角添加嘉然小姐的live2d模型
// @version 1.0.1
// @namespace https://github.com/journey-ad
// @author journey-ad
// @include /^https:\/\/(www|live|space|t)\.bilibili\.com\/.*$/
// @icon https://www.google.com/s2/favicons?domain=bilibili.com
// @license GPL v2
// @run-at document-end
@nitred
nitred / optimal_mtu.md
Last active July 16, 2025 22:09
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
@YangKeao
YangKeao / corplink.nix
Created April 26, 2022 13:40
A package for Feilian on Nix OS
@mmozeiko
mmozeiko / !README.md
Last active July 18, 2025 00:23
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for native desktop app development.

Run py.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK - currently v14.40.33807 and v10.0.26100.0.

You can list available versions with py.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe first run setup_TARGET.bat - after that PATH/INCLUDE/LIB env variables will be updated to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@harishanand95
harishanand95 / Stable_Diffusion.md
Last active June 18, 2025 10:19
Stable Diffusion on AMD GPUs on Windows using DirectML
@averad
averad / Stable_Diffusion.md
Last active July 10, 2025 21:20 — forked from harishanand95/Stable_Diffusion.md
Stable Diffusion on AMD GPUs on Windows using DirectML
@sftblw
sftblw / fix_automatic111_merged_ckpt.md
Last active January 25, 2023 07:34
fix convert_original_stable_diffusion_to_diffusers.py for fixing merged models

fix convert_original_stable_diffusion_to_diffusers.py for fixing merged models

To fix broken model (mainly merged weights from AUTOMATIC111's no-licensed UI for Invoke AI ,

one can use CKPT -> HF/diffusers -> CKPT route.

Environment setup