This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async function () { | |
if (!/\/bundle\/download\/.+/.test(location.pathname)) | |
return alert("Not on a supported page") | |
const baseURL = `${location.origin}${location.pathname}`, | |
baseDOM = new DOMParser().parseFromString( | |
await fetch(baseURL).then((res) => res.text()), | |
"text/html" | |
), | |
maxPage = Math.max( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Invoke-RemoteCommand { | |
[CmdletBinding()] | |
Param( | |
[string]$ComputerName = '', | |
[string]$Command = { Get-ChildItem env: | Select-Object Key,Value | ConvertTo-CSV }, | |
[boolean]$ReturnOutput = $True, | |
[string]$Prefix = 'Invoke-RemoteCommand' | |
) | |
# Prepare command |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Retrieve functions from all chunks | |
const webpackChunkFns = this.webpackChunk.flatMap(c => Object.values(c[1])); | |
// Filter by RegEx match | |
webpackChunkFns.filter(f => /hello world/.test(f.toString())); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Anti-AMP | |
// @version 0.3 | |
// @description Redirect AMP pages to their canonical counterparts | |
// @author Andrew Gu | |
// @match *://*/* | |
// @grant none | |
// @run-at document-end | |
// @noframes | |
// @updateURL https://gist.github.com/a-gu/a05caf92fdaa0612724b28aba657338c/raw/anti-amp.user.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type -AssemblyName System.Windows.Forms | |
# https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.sendkeys?view=netframework-4.7.2 | |
$Path_Downloads = 'C:\Users\YOUR_USERNAME\Downloads' | |
function Get-LinkURL { | |
Param( | |
[string]$Path | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name WebToon Light | |
// @version 1.0 | |
// @description Rewrites the WebToon viewer to still be functional with fewer resources | |
// @author Andrew Gu | |
// @match https://www.webtoons.com/*viewer | |
// @match https://www.webtoons.com/*viewer?* | |
// @updateURL https://gist.github.com/a-gu/8313d8523f5e8a08e80b54beb1d7b241/raw/97ff557a0267dfc3929e63cf41873c161008239f/webtoon_light.user.js | |
// @grant none | |
// @run-at document-end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Better Browser Zoom | |
// @version 0.6 | |
// @description Userscript for a better experience using Zoom web conferencing in a web browser | |
// @author Andrew Gu | |
// @updateURL https://gist.githubusercontent.com/a-gu/9cc1b4caf6440cb2b918c13c72e0d0ce/raw/better_browser_zoom.user.js | |
// @grant unsafeWindow | |
// @grant GM_addStyle | |
// @grant GM_setValue | |
// @grant GM_getValue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bitcoinWords = 'abandon ability able about above absent absorb abstract absurd abuse access accident account accuse achieve acid acoustic acquire across act action actor actress actual adapt add addict address adjust admit adult advance advice aerobic affair afford afraid again age agent agree ahead aim air airport aisle alarm album alcohol alert alien all alley allow almost alone alpha already also alter always amateur amazing among amount amused analyst anchor ancient anger angle angry animal ankle announce annual another answer antenna antique anxiety any apart apology appear apple approve april arch arctic area arena argue arm armed armor army around arrange arrest arrive arrow art artefact artist artwork ask aspect assault asset assist assume asthma athlete atom attack attend attitude attract auction audit august aunt author auto autumn average avocado avoid awake aware away awesome awful awkward axis baby bachelor bacon badge bag balance balcony ball bamboo banana banner bar barely bargain barrel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If running on a new machine, make sure to allow this script to run using the below commands or similar: | |
# Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned | |
# Unblock-File -Path .\ChocoUpgradeAllNoLinks.ps1 | |
# powershell -File .\ChocoUpgradeAllNoLinks.ps1 | |
Set-StrictMode -Version 3.0 | |
# Snapshot Desktop links before upgrade | |
$links_before = Get-ChildItem "C:\Users\*\Desktop\*" -Filter "*.lnk" -File | |
# Upgrade packages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// fingerprint : basic system/browser fingerprinting function | |
// for use as a simple but robust user id | |
function fingerprint() { | |
// hash : simple hash-like function, not guaranteed to return same-size data | |
// or change output greatly on input changes | |
let hash = function (input) { | |
let temp = JSON.stringify(input), | |
out = BigInt(0) | |
for (let i = 0; i < temp.length; i++) { | |
out ^= BigInt(temp.charCodeAt(i)) << BigInt(i % 128) |
NewerOlder