Skip to content

Instantly share code, notes, and snippets.

{
"timeStamp": 1706126581694,
"version": "1.55.0",
"userSettings": {
"autoUpdate": false,
"externalLists": "https://gitlab.com/magnolia1234/bypass-paywalls-clean-filters/-/raw/main/bpc-paywall-filter.txt\nhttps://raw.githubusercontent.com/liamengland1/miscfilters/master/antipaywall.txt",
"importedLists": [
"https://gitlab.com/magnolia1234/bypass-paywalls-clean-filters/-/raw/main/bpc-paywall-filter.txt",
"https://raw.githubusercontent.com/liamengland1/miscfilters/master/antipaywall.txt"
]
@pryorda
pryorda / install choco
Last active January 31, 2023 03:40
INstalled Choco apps
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install -y packages.config
@pryorda
pryorda / Process
Created January 24, 2023 16:24
Clear Windows Update History
https://www.elevenforum.com/t/clear-windows-update-history-in-windows-11.2509/
powershell -windowstyle hidden -command "Start-Process cmd -ArgumentList '/s,/c,net stop usosvc & net stop wuauserv & del %systemroot%\SoftwareDistribution\DataStore\Logs\edb.log & del /f /q C:\ProgramData\USOPrivate\UpdateStore\* & net start usosvc & net start wuauserv & UsoClient.exe RefreshSettings' -Verb runAs"
Second Run this
https://www.elevenforum.com/t/reset-windows-update-in-windows-11.3808/
#!/bin/bash
TARGET_ACCOUNT_REGION="us-west-2"
SRC_PROFILE="temp-ignitebankstest"
DEST_PROFILE="temp-ignitebanksqa"
DESTINATION_ACCOUNT_REGION="us-west-2"
DESTINATION_ACCOUNT_BASE_PATH="304374835924.dkr.ecr.$DESTINATION_ACCOUNT_REGION.amazonaws.com"
REPO_LIST=($(aws ecr --profile ${SRC_PROFILE} describe-repositories --query 'repositories[].repositoryUri' --output text --region $TARGET_ACCOUNT_REGION))
REPO_NAME=($(aws ecr --profile ${SRC_PROFILE} describe-repositories --query 'repositories[].repositoryName' --output text --region $TARGET_ACCOUNT_REGION))
@pryorda
pryorda / gist:30b473bc4fffd243d9ce01e5b95576fe
Created December 14, 2022 04:04
Powershell set CPU Priority
https://www.thewindowsclub.com/change-process-priority-for-running-processes-using-command-line
gps |select Name,PriorityClass |Where-Object {$_.Name.contains("logi")}
Get-WmiObject Win32_process | Where-Object { $_.Name.contains("logi") } | foreach-object { $_.SetPriority(256) }
gps |select Name,PriorityClass |Where-Object {$_.Name.contains("logi")}
https://devblogs.microsoft.com/scripting/powertip-find-processes-with-high-priority/
@pryorda
pryorda / fasstterrrr.sh
Last active June 10, 2021 08:36
Faster Rsync
find /media/files/ -printf "%P\n" > file_list.txt
mkdir -p split_file_list/
split -l 100000 file_list.txt split_file_list/
ls split_file_list/ |parallel -j9 --ungroup rsync --super -e \"ssh -i /home/user/.ssh/key\" --rsync-path=\"sudo rsync\" -aAvp --files-from=split_file_list/{} /media/files/ ubuntu@nfs-server1.*.com:/mnt/data
@pryorda
pryorda / gist:c9592983e6ac68b8ffe7b888324d83cc
Created January 22, 2020 18:30
Grant privs on windows script
<# -- UserRights.psm1 --
The latest version of this script is available at https://gallery.technet.microsoft.com/Grant-Revoke-Query-user-26e259b0
VERSION DATE AUTHOR
1.0 2015-03-10 Tony Pombo
- Initial Release
1.1 2015-03-11 Tony Pombo
- Added enum Rights, and configured functions to use it
@pryorda
pryorda / count_by_day.sh
Last active November 7, 2019 20:22
Get Count of Prometheus values by Day
#!/bin/bash
startdate=2019-10-01
enddate=$(date -I)
d="$startdate"
while [ "$d" != "$enddate" ]; do
current=$d
d=$(date -I -d "$d + 1 day")
data=$(curl -s 'http://prometheus/api/v1/query_range?query=probe_http_status_code\{job="kubernetes-services",instance=~".*conversion.*"\}&start='$current'T00:00:00.000Z&end='$d'T00:00:00.000Z&step=15s')
#!/bin/bash
grep rw-p /proc/$1/maps \
| sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' \
| while read start stop; do \
gdb --batch --pid $1 -ex \
"dump memory $1-$start-$stop.dump 0x$start 0x$stop"; \
done
# use strings on file after.
@pryorda
pryorda / dump_memory.sh
Created October 19, 2019 05:18
Dump Process Memory
#!/bin/bash
grep rw-p /proc/$1/maps \
| sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' \
| while read start stop; do \
gdb --batch --pid $1 -ex \
"dump memory $1-$start-$stop.dump 0x$start 0x$stop"; \
done
# use strings on file after.