Skip to content

Instantly share code, notes, and snippets.

View willwm's full-sized avatar

Will Wolff-Myren willwm

View GitHub Profile
@willwm
willwm / bookmarklet-youtube-clear-watch-later.js
Last active July 19, 2020 04:26
Bookmarklet: Clear videos from YouTube Watch Later in bulk
javascript:(() => {
const timeout = 500;
let clickTimeout = timeout;
const buttons = document.querySelectorAll('.pl-video-edit-remove');
for (let button of buttons) {
setTimeout(() => {
console.group(button);
setTimeout(() => { button.click(); }, timeout);
console.groupEnd();
@willwm
willwm / bookmarklet-youtube-unsubscribe-all.js
Last active March 25, 2024 03:11
Bookmarklet: Unsubscribe from YouTube channels in bulk
javascript:(() => {
const timeout = 500;
const buttons = document.querySelectorAll("[aria-label^='Unsubscribe from']");
for(let button of buttons) {
setTimeout(() => {
console.group(button.attributes['aria-label'].value);
setTimeout(() => { button.click(); }, timeout);
@willwm
willwm / bookmarklet-markdown-link.js
Last active September 22, 2021 21:00 — forked from Rarst/md-link.js
Bookmarklet for markdown link of current page (incl. optional selected text as quote)
@willwm
willwm / resizeandcenter.sh
Last active July 19, 2020 04:40
Resize and Center With wmctrl
# https://forums.linuxmint.com/viewtopic.php?p=1543828#p1543828
# https://linux.die.net/man/1/wmctrl
# 1800x1500 (Center)
wmctrl -r :ACTIVE: -e 0,1020,330,1800,1500
# 2560x1600 (Center)
wmctrl -r :ACTIVE: -e 0,640,280,2560,1600
# 3200x1900 (Center)

Clone w/Submodules

git clone --recurse-submodules

Fetch and Prune

git fetch -p
{
"id": "Ag8EAQAKCwAPAAwIBAoJAQ",
"links": [
{
"active": true,
"iden": "CwgODwQAAwwCBAcNBAcGBQ",
"created": 1534960753.141877,
"modified": 1534970458.090077,
"type": "link",
"title": "Example Domain",
@willwm
willwm / nvm.sh
Last active July 19, 2020 04:40
Install nvm
# Install nvm:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
# Configure nvm shell context:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Install Node.js via nvm:
nvm install node
@willwm
willwm / bootstrapwindows10.ps1
Last active December 25, 2019 13:08 — forked from zloeber/bootstrapwindows10.ps1
Boxstarter Windows 10 Configuration
<#
https://gist.github.com/willwm/3937943714b3a418fc1df5c62d379648
The command to run, built from the raw link of this gist
Win+R
iexplore http://boxstarter.org/package/url?<RAW GIST LINK>
@willwm
willwm / remove-win10-crapware.ps1
Created July 18, 2018 00:07
Remove Windows 10 OOBE crapware
#--- Uninstall unecessary applications that come with Windows out of the box ---
# 3D Builder
Get-AppxPackage Microsoft.3DBuilder | Remove-AppxPackage
# Autodesk
Get-AppxPackage *Autodesk* | Remove-AppxPackage
# Bing Weather, News, Sports, and Finance (Money):
Get-AppxPackage Microsoft.BingFinance | Remove-AppxPackage
# https://win32.io/posts/How-To-Find-Text-PowerShell
Get-ChildItem "C:\path\to\folder" -recurse | Where-Object { (Get-Content $_) -like '*TextToFind*' } | Select-Object { $_.FullName }
# ...as a function:
function Find-TextInFiles($searchPath, $text) {
Get-ChildItem $searchPath -recurse | Where-Object { (Get-Content $_) -like '*$text*' } | Select-Object { $_.FullName }
}