Skip to content

Instantly share code, notes, and snippets.

View awsr's full-sized avatar

awsr

  • Oregon, United States
  • 02:00 (UTC -07:00)
View GitHub Profile
@awsr
awsr / retwitterize.user.js
Last active December 30, 2023 01:00
Restore Twitter branding. (Works best with the Old Twitter Layout extension)
// ==UserScript==
// @name ReTwitterize
// @version 2.1.0
// @namespace https://gist.github.com/awsr
// @description Because Elon Musk is an idiot
// @author awsr
// @match https://twitter.com/*
// @match https://x.com/*
// @downloadURL https://gist.github.com/awsr/24a3cec8d34aca2c5cadf6e60fef9e37/raw/retwitterize.user.js
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByUlEQVQ4T2NkoBAwUqifAW7Au3fv+IWEhD6iGwgSn3/jY+KnXz8EFfg57icaKi4AiYHUgdTDDfBfdXpjgKrIepACZEMMZh65cOE3hz4DEwsDw++fDA78vw88+PxLscZWpSnFQG4e3AD77Y9PHbz1zDRBnn1Bn51cAcj080/eGxge+HKegYMbYebXjwwCXFxfDjpy+euL8O6DG7Dg7te6hPM/Gxk+vGLgf/fwfaCa+EY+Pvavk96JZ6N7a505d2WgDNsURkbGLwgXrLl+9CCDuBVY8d8/DAyf30FoYSmMcP4fLCgK1PwGJAE34MKrb2EOR7/P/fCXkQdfzBjyM98578qvClMDN+D///88dZe/TZ5890cIPkPm6LM2pajy1mMYABLY//RDeOGVPy0XPjOpYHMFyPZzLny2QOe/wGoA0BX8Z9/88m659Stjw/PftsiGgDQfcuBL4WVlPIgsDvYCKGEUHXo0Yf31p/4fmTgEGcTkGBh4heHq4uXZt08x4OrkYWE4ArT9L4YBQJuZgYKqF97+tVj34qcjTIE8J8sLZzGGcwo8bBeBYrfRNaPEAog
@awsr
awsr / preloadImages.js
Created August 9, 2023 00:09
Simple JavaScript function for preloading images
/**
* A function to preload images into the browser cache
*
* @param {string[]} imagePaths - Links to images you want to preload.
*
* @example
* const images = [
* "/relative/path/preload-me.png",
* "https://github.githubassets.com/images/modules/site/home/globe.jpg",
* "https://about.google/assets-main/img/glue-google-color-logo.svg"
@awsr
awsr / twitterbirb.user.js
Last active September 30, 2023 01:59
Restore Twitter Logo
// ==UserScript==
// @name Make Twitter Twitter Again
// @namespace https://gist.github.com/awsr
// @version 1.0.3
// @description Because nobody's willing to tell Elon Musk he's an idiot
// @author awsr
// @match https://twitter.com/*
// @match https://x.com/*
// @downloadURL https://gist.github.com/awsr/e6adbfdc34a4e026e0503b35fcd25464/raw/twitterbirb.user.js
// @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAByUlEQVQ4T2NkoBAwUqifAW7Au3fv+IWEhD6iGwgSn3/jY+KnXz8EFfg57icaKi4AiYHUgdTDDfBfdXpjgKrIepACZEMMZh65cOE3hz4DEwsDw++fDA78vw88+PxLscZWpSnFQG4e3AD77Y9PHbz1zDRBnn1Bn51cAcj080/eGxge+HKegYMbYebXjwwCXFxfDjpy+euL8O6DG7Dg7te6hPM/Gxk+vGLgf/fwfaCa+EY+Pvavk96JZ6N7a505d2WgDNsURkbGLwgXrLl+9CCDuBVY8d8/DAyf30FoYSmMcP4fLCgK1PwGJAE34MKrb2EOR7/P/fCXkQdfzBjyM98578qvClMDN+D///88dZe/TZ5890cIPkPm6LM2pajy1mMYABLY//RDeOGVPy0XPjOpYHMFyPZzLny2QOe/wGoA0BX8Z9/88m659Stjw/PftsiGgDQfcuBL4WVlPIgsDvYCKGEUHXo0Yf31p/4fmTgEGcTkGBh4heHq4uXZt08x4OrkYWE4ArT9L4YBQJuZgYKqF97
@awsr
awsr / rot13button.user.js
Last active August 30, 2023 23:48
Copy your current chat input to clipboard as rot13-encoded text in Twitch
// ==UserScript==
// @name Rot13 Encode Chatbox to Clipboard
// @namespace https://gist.github.com/awsr
// @version 0.3.0
// @description Encode message in chatbox and copy to clipboard
// @author Tenosis
// @downloadURL https://gist.github.com/awsr/eb3c6c16f3aaf62e87e345acf1bbff3a/raw/rot13button.user.js
// @match https://www.twitch.tv/*
// @grant none
// ==/UserScript==
@awsr
awsr / GDQ_Schedule_to_Unix_Timestamp.user.js
Last active June 30, 2022 22:58
Copy the scheduled start time for Games Done Quick runs as a Unix timestamp.
// ==UserScript==
// @name GDQ Schedule to Unix Timestamp
// @namespace https://gist.github.com/awsr
// @version 0.1.1
// @description Copy time to unix timestamp (ctrl + doubleclick on row)
// @author Tenosis
// @downloadURL https://gist.github.com/awsr/f877738341d75894115ac5b2f483b15b/raw/GDQ_Schedule_to_Unix_Timestamp.user.js
// @match https://gamesdonequick.com/schedule
// @grant none
// ==/UserScript==
@awsr
awsr / deRot13.user.js
Last active April 25, 2024 02:50
Decode ROT13 messages in Twitch chat via CTRL + double-click
// ==UserScript==
// @name Twitch Chat ROT13 Messages
// @namespace https://gist.github.com/awsr
// @version 2.0.0
// @description Decode ROT13 messages in Twitch chat via CTRL + double-click
// @author Tenosis
// @downloadURL https://gist.github.com/awsr/ad422b3212a08813977c61e7d61ae94f/raw/deRot13.user.js
// @match https://www.twitch.tv/*
// @grant none
// ==/UserScript==
@awsr
awsr / USBDeviceMonitoring.ps1
Last active June 21, 2020 04:16
PowerShell script for monitoring USB device disconnections
<#PSScriptInfo
.VERSION 1.2
.GUID a164a9e6-875a-4be8-a7ef-a69a35873a52
.AUTHOR Awsr
#>
$global:USBScriptBlock = {
$TestUSB = (Get-CimInstance Win32_USBControllerDevice).Dependent.DeviceID
if ($TestUSB.Count -lt $global:PnpCount) {
[void] $global:USBEvents.TryAdd($TestUSB)
@awsr
awsr / coordlist.ps1
Last active April 18, 2021 17:49
Quick way to type in a lot of coordinates
$coords = @()
while ($true) {
$x = Read-Host "x"
$y = Read-Host "y"
if (-not $x -and -not $y) {
Write-Host "----------"
break
}
elseif (-not $x -or -not $y) {
Write-Warning "Missing value"