Skip to content

Instantly share code, notes, and snippets.

@GunGunGun
GunGunGun / gist:6d05995111defe4765e6b872e5feb211
Created July 20, 2025 01:06
Screw Size M1 = 0,25mm M2 = 0,4mm M2,5 = 0,45mm M3 = 0,5mm M4 = 0,7mm M5 = 0,8mm M6 = 1,0mm M8 = 1,25mm M10 = 1,5mm M12 = 1,75mm M14 = 2.0mm M16 = 2.0mm M20 = 2,5mm M22 = 2,5mm M24 = 3.0mm
M1 = 0,25mm
M2 = 0,4mm
M2,5 = 0,45mm
M3 = 0,5mm
M4 = 0,7mm
@GunGunGun
GunGunGun / gist:3ec3506433e91a3cad8f5e35c9717f98
Created July 7, 2025 09:14
scrcpy's Performance Command Prompt
adb kill-server
adb tcpip 5555
adb shell ifconfig
adb connect 192.168.1.169:5555
scrcpy --tcpip=192.168.1.169 -m 1024 -w -S --video-bit-rate 1M --max-size 600 --max-fps=5 --no-mipmaps --always-on-top --disable-screensaver --window-x=0 --window-y=0 --window-height=1440 --window-width=680 --video-codec=h264 --no-audio --no-audio-playback
@GunGunGun
GunGunGun / NVScaler.glsl
Created January 24, 2025 08:03 — forked from agyild/NVScaler.glsl
NVIDIA Image Scaling v1.0.2 for mpv
// The MIT License(MIT)
//
// Copyright(c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files(the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions :
@GunGunGun
GunGunGun / nsm_player.user.js
Created November 17, 2024 08:52 — forked from holly-hacker/nsm_player.user.js
NinSheetMusic MIDI player
// ==UserScript==
// @name NinSheetMusic MIDI player
// @version 1
// @grant none
// @include https://www.ninsheetmusic.org/browse/series/*
// ==/UserScript==
function injectJs(url, callback) {
script = document.createElement('script');
@GunGunGun
GunGunGun / Zinstall.sh
Last active October 28, 2024 12:48
Zinstall.sh
#!/bin/bash
app_name=zen
literal_name_of_installation_directory=".tarball-installations"
universal_path_for_installation_directory="$HOME/$literal_name_of_installation_directory"
app_installation_directory="$universal_path_for_installation_directory/zen"
official_package_location="https://github.com/zen-browser/desktop/releases/latest/download/zen.linux-specific.tar.bz2"
tar_location=$(mktemp /tmp/zen.XXXXXX.tar.bz2)
open_tar_application_data_location="zen"
local_bin_path="$HOME/.local/bin"
@GunGunGun
GunGunGun / Cargo.toml
Created July 1, 2024 04:18 — forked from ftk/Cargo.toml
http mitm proxy. Simple http proxy to modify Range: http headers. Can be used to speed up youtube in mpv
# To generate mitm cert and key:
# openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -passout pass:"third-wheel" -subj "/C=US/ST=private/L=province/O=city/CN=hostname.example.com"
# see: https://github.com/campbellC/third-wheel
[package]
name = "http-ytproxy"
version = "0.1.0"
edition = "2021"
@GunGunGun
GunGunGun / submit.md
Created May 5, 2024 07:26 — forked from tanaikech/submit.md
Uploading Local Files to Google Drive without Authorization using HTML Form

Uploading Local Files to Google Drive without Authorization using HTML Form

This is a sample script for uploading local file to Google Drive without the authorization using HTML form. A selected file in your local PC using HTML form is uploaded to Google Drive and saved to Google Drive.

When you use this, at first, please deploy Web Apps. The script is doPost() of following scripts.

Script : Google Apps Script

function doPost(e) {
 var data = Utilities.base64Decode(e.parameters.data);
@GunGunGun
GunGunGun / svg-to-png.js
Created April 27, 2024 16:32 — forked from camman3d/svg-to-png.js
Convert SVG to PNG. Verified in Chrome, Safari, and Firefox
// let svg = document.querySelector('svg');
function svgToPng(svg) {
let svgData = new XMLSerializer().serializeToString(svg);
let canvas = document.createElement('canvas');
let ctx = canvas.getContext('2d');
let DOMURL = window.URL || window.webkitURL || window;
let img = new Image();
let blog = new Blob([svgData], {type: 'image/svg+xml'});
let url = DOMURL.createObjectURL(blog);
@GunGunGun
GunGunGun / record.py
Created April 7, 2024 14:35 — forked from korakot/record.py
Record audio in Colab using getUserMedia({ audio: true })
# all imports
from IPython.display import Javascript
from google.colab import output
from base64 import b64decode
from io import BytesIO
!pip -q install pydub
from pydub import AudioSegment
RECORD = """
const sleep = time => new Promise(resolve => setTimeout(resolve, time))
@GunGunGun
GunGunGun / Index.html
Created April 7, 2024 14:02 — forked from meziantou/Index.html
Javascript - Record audio
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<h1>Audio</h1>