Skip to content

Instantly share code, notes, and snippets.

@amunchet
amunchet / cloudSettings
Last active June 3, 2020 15:05
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-06-03T15:05:42.753Z","extensionVersion":"v3.4.3"}
@amunchet
amunchet / noVNCPaste.user.js
Last active October 10, 2022 18:50
noVNC Paste Tampermonkey script.
// ==UserScript==
// @name noVNC Paste
// @namespace http://tampermonkey.net/
// @version 0.2a
// @description Pastes text into a noVNC window
// @author You
// @match */console*
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none
// ==/UserScript==
@amunchet
amunchet / unwrap.py
Created August 21, 2020 21:36
Unwrapping decorators in Python Function
def unwrap(f):
"""
Unwraps the function down to the last layer of __wrapped__
"""
found = False
b = f
count = 0
while not found:
try:
b = b.__wrapped__
@amunchet
amunchet / .vimrc
Created August 10, 2021 16:32
Vim settings
" Sets up the backgrounds and search syntax
set background=dark
set smartcase
set hlsearch
" Sets up the indents
set smartindent
set autoindent
" Sets up the folding
@amunchet
amunchet / find.sh
Created September 1, 2021 16:48
Find large files in linux
#!/bin/bash
du -a . | sort -n -r | head -n 20
@amunchet
amunchet / rescan.sh
Last active August 20, 2024 20:41
Rescan VM disk resize
# Must be done as root
echo 1 > /sys/class/block/sda/device/rescan
# For LVM
fdisk /dev/sda # For the resizing - delete it, then recreate it.
pvresize /dev/sda3
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
@amunchet
amunchet / noVNCCopyPasteProxmox.user.js
Last active December 24, 2024 07:22
Copy/Paste for noVNC Proxmox
// ==UserScript==
// @name noVNC Paste for Proxmox
// @namespace http://tampermonkey.net/
// @version 0.2a
// @description Pastes text into a noVNC window (for use with Proxmox specifically)
// @author Chester Enright
// @match https://*
// @include /^.*novnc.*/
// @require http://code.jquery.com/jquery-3.3.1.min.js
// @grant none
@amunchet
amunchet / gist:fcba47e1a20cb1d7131c09967d39a2aa
Last active February 28, 2023 23:16
Windows 10 debloat

Debloat Windows 10

  1. Open Powershell.
  2. Type Get-AppxPackage | Remove-AppxPackage.
  3. Ignore any error messages about packages that can't be removed, it's fine.

Gotchas

This can break some game loaders (Steam too probably).

netsh winsock reset catalog
netsh int ip reset reset.log
ipconfig /flushdns
ipconfig /registerdns