Skip to content

Instantly share code, notes, and snippets.

# License: MIT
# Do whatever you want to with this.
function DownloadAndExtract([string]$url) {
$savedProgressPreference = $ProgressPreference
$ProgressPreference = [System.Management.Automation.ActionPreference]::SilentlyContinue
$filename = [io.path]::GetFileName($url)
$outputDirectory = [io.path]::Combine($pwd, [System.IO.Path]::GetFileNameWithoutExtension($filename))
Invoke-WebRequest $url -UseBasicParsing -OutFile $filename
@peruihkxt
peruihkxt / Bible.comDarkMode.user.js
Last active July 16, 2019 00:46
Gives Bible.com a dark theme
// ==UserScript==
// @name Bible.com Dark Mode
// @version 0.2
// @description Give Bible.com a dark theme
// @author You
// @match https://*.bible.com/*
// @grant none
// @updateURL https://gist.github.com/JeremyLee/3886555679f6af9de22b434ccd423e8f/raw/Bible.comDarkMode.user.js
// ==/UserScript==
@peruihkxt
peruihkxt / Admiral-AntiAdblock-Killer.user.js
Last active January 7, 2023 01:51
Kills the Admiral anti adblock nonsense. Just click on the *Raw* button to install the script into Tampermonkey.
// ==UserScript==
// @name Admiral AntiAdblock Killer
// @version 0.2
// @description
// @author JeremyLee
// @match https://*/*
// @match http://*/*
// @grant none
// @updateURL https://gist.github.com/JeremyLee/2f7ffe2c7ef6576de36795dadaa2a535/raw/Admiral-AntiAdblock-Killer.user.js
// ==/UserScript==
function ConvertFrom-FixedWidth($strings) {
# The first column is the header. We assume that columns are separated by at least two spaces.
$headerRegex = [regex] "\w+\s{2,}"
$columns = $headerRegex.Matches($strings[0]) | ForEach-Object { [pscustomobject]@{
Name = $_.Value.Trim()
Start = $_.Index
Length = $_.Length
} }
$values = @()
@peruihkxt
peruihkxt / SnipeITAssetListWarrantyLink.user.js
Last active November 21, 2022 15:21
Show Dell Warranty link beside the serial number on Snipe-IT
// ==UserScript==
// @name Make Freshdesk Compact
// @namespace http://tampermonkey.net/
// @version 0.5
// @description try to take over the world!
// @author You
// @match https://*.freshdesk.com/a/*
// @grant none
// @updateURL https://gist.github.com/JeremyLee/564d300617c3ce81956bb3e060a2934f/raw/MakeFreshdeskCompact.user.js
// ==/UserScript==
@peruihkxt
peruihkxt / PrintWifiPasswords.ps1
Created May 9, 2018 15:18
Prints Wifi passwords from a remote machine by using Powershell remoting
#Make a list with all WiFi SSID's and passwords stored locally on Windows OS.
Param (
[string] $ComputerName
)
Invoke-Command -ComputerName $ComputerName -ScriptBlock {
$output = netsh.exe wlan show profiles
$profileRows = $output | Select-String -Pattern 'All User Profile'
$profileNames = New-Object System.Collections.ArrayList
@peruihkxt
peruihkxt / letsencrypt-unifi.sh
Created May 5, 2018 18:39 — forked from bsodmike/letsencrypt-unifi.sh
Using LetsEncrypt With The Unifi Controller
#!/usr/bin/env bash
# Ref: https://www.reddit.com/r/Ubiquiti/comments/43v23u/using_letsencrypt_with_the_unifi_controller/
# Original: https://source.sosdg.org/brielle/lets-encrypt-scripts/raw/master/gen-unifi-cert.sh
# ---
# Modified script from here: https://github.com/FarsetLabs/letsencrypt-helper-scripts/blob/master/letsencrypt-unifi.sh
# Modified by: Brielle Bruns <bruns@2mbit.com>
# Download URL: https://source.sosdg.org/brielle/lets-encrypt-scripts
# Version: 1.3
# Last Changed: 03/21/2017
# 02/02/2016: Fixed some errors with key export/import, removed lame docker requirements
header .company-logo {
max-width: initial !important;
}
a {
color: #992136;
}
.global-nav__item .tree a.current {
color: #992136;
@peruihkxt
peruihkxt / tsheets-round-payroll-report.js
Created March 26, 2018 15:57
TSheets - Round Payroll Report
// ==UserScript==
// @name Round Payroll Report
// @namespace http://jlee.in
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://jdlee.tsheets.com/
// @grant none
// ==/UserScript==