Skip to content

Instantly share code, notes, and snippets.

@jmconway
jmconway / Set-Win10Baseline21H2.ps1
Created May 29, 2022 21:51
PowerShell module/helper script with custom functions for imaging Windows 10 build 21H2 with MDT/WDS.
# For the purposes of this script, assume DWORD values
function Set-RegistryItem {
param (
[CmdletBinding()]
[string]$Path
)
param (
[CmdletBinding()]
[string]$Name
)
@realAzazello
realAzazello / Personal_GHHbD_block-list.txt
Last active April 1, 2024 00:16
Personal block list used for GHHbD ('Google Hit Hider by Domain'), a userscript <http://www.jeffersonscher.com/gm/google-hit-hider/> created by Jefferson Scher
[Personal "Google Hit Hider by Domain" list]
['Bad' TLDs]
[https://greasyfork.org/en/forum/discussion/comment/55821/#Comment_55821]
[The Top 10 Worst TLDs - https://www.spamhaus.org/statistics/tlds/]
[https://github.com/hagezi/dns-blocklists#tlds]
[https://github.com/yokoffing/filterlists/blob/main/enhanced_site_protection.txt]
[https://github.com/ShadowWhisperer/BlockLists/blob/master/Lists/Top_Level]
[https://hblock.molinero.dev/most_abused_tlds.txt]
@ishad0w
ishad0w / microsoft_edge_uninstaller_21h1_ltsc.bat
Last active April 25, 2024 09:33
Microsoft Edge Uninstaller [Windows 10 LTSC 2021/21H1 Edition]
@echo off
@title Microsoft Edge Uninstaller [Windows 10 LTSC 2021/21H1 Edition]
ver
echo+
goto check_admin_permissions
:check_admin_permissions
echo Script must Run as Administrator! Detecting permissions...
net session >nul 2>&1
if %errorLevel% == 0 (
@ByronScottJones
ByronScottJones / profile.ps1
Last active May 30, 2021 00:27
Powershell Profile
#Requires -Version 7
# Version 1.2.9
$Secrets = get-content -raw -path ~/.secrets/secrets.json | cnvertfrom-json
# check if newer version
#$gistUrl = "https://api.github.com/gists/......."
gistUrl = $Secrets.PowershellProfile.gistUrl
$latestVersionFile = [System.IO.Path]::Combine("$HOME",'.latest_profile_version')
@crutkas
crutkas / InstallWinGet.ps1
Last active November 20, 2023 04:13
InstallWinGet PowerShell
function InstallWinGet()
{
$hasPackageManager = Get-AppPackage -name "Microsoft.DesktopAppInstaller"
if(!$hasPackageManager)
{
$releases_url = "https://api.github.com/repos/microsoft/winget-cli/releases/latest"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$releases = Invoke-RestMethod -uri "$($releases_url)"
@filhocodes
filhocodes / .gitignore
Created February 14, 2021 13:30
Ansible Setup
inventory.local.yml
@snizovtsev
snizovtsev / cdm_fio.sh
Last active February 5, 2024 22:35 — forked from i3v/cdm_fio.sh
Reproducing CrystalDiskMark tests with fio - fixes for https://unix.stackexchange.com/revisions/480191/9
#!/bin/bash
# This script is based on https://unix.stackexchange.com/revisions/480191/9 .
# The following changes proved to be necessary to make it work on CentOS 7:
# * removed disk info (model, size) - not very useful, might not work in many cases.
# * using "bw" instead of "bw_bytes" to support fio version 3.1 (those availible through yum @base)
# * escaping exclamation mark in sed command
# * the ".fiomark.txt" is not auto-removed
LOOPS=5 #How many times to run each test

WSL 2 Cisco AnyConnect Networking Workaround

Overview

WSL 2 uses a Hyper-V Virtual Network adapter. Network connectivity works without any issue when a VPN is not in use. However when a Cisco AnyConnect VPN session is established Firewall Rules and Routes are added which breaks connectivity within the WSL 2 VM. This issue is tracked WSL/issues/4277

Below outline steps to automatically configure the Interface metric on VPN connect and update DNS settings (/etc/resolv.conf) on connect/disconnect.

Manual Configuration

Set Interface Metrics

@benigumocom
benigumocom / debug_from_qr.py
Last active March 26, 2024 06:02
Connect Wireless Debug from Terminal on Android11
#!/usr/bin/env python3
"""
Android11
Pair and connect devices for wireless debug on terminal
python-zeroconf: A pure python implementation of multicast DNS service discovery
https://github.com/jstasiak/python-zeroconf
"""
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active April 29, 2024 16:42
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.