Skip to content

Instantly share code, notes, and snippets.

@mark05e
mark05e / RemoveWebroot.ps1
Last active October 29, 2025 23:27
PowerShell script to forcefully remove Webroot SecureAnywhere. It is recommended to run the script twice, with a reboot after the first run. Maintenance Note - https://gist.github.com/mark05e/0a04a54c1e8489c770bd91e4910d7df9
# Removes Webroot SecureAnywhere by force
# Run the script once, reboot, then run again
# Webroot SecureAnywhere registry keys
$RegKeys = @(
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\WRUNINST",
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\WRUNINST",
"HKLM:\SOFTWARE\WOW6432Node\WRData",
"HKLM:\SOFTWARE\WOW6432Node\WRCore",
"HKLM:\SOFTWARE\WOW6432Node\WRMIDData",
@marco79cgn
marco79cgn / top_500_albums_widget.js
Last active March 10, 2025 23:16
A scriptable widget that shows a random Top 500 album and opens it in Spotify
// insert your Spotify client id and secret here
let clientId = "xxx"
let clientSecret = "xxx"
// use your spotify country iso code to optimize search results
let spotifyCountry = "DE"
// optional: the ip of your node-sonos-http-api and room name; use "sonos" as parameter in your widget settings to activate it
let sonosUrl = "http://192.168.178.10:5005/Kitchen"
@royki
royki / grub.md
Last active July 11, 2023 03:40
GRUB Command or Recovery
  • In legacy GRUB the default is /boot/grub/menu.list
  • In GRUB2 the default is /boot/grub/grub.cfg
  • We mainly edit /etc/default/grub, which controls mainly the appearance of the GRUB menu.
  • We may also edit the scripts in /etc/grub.d/
  • These are the scripts that boot your operating systems, control external applications such as memtest & os_prober
  • theming./boot/grub/grub.cfg is built from /etc/default/grub & /etc/grub.d/*
  • update-grub
  • grub> prompt, that is the full GRUB 2 command shell.
  • GRUB2 started normally and loaded the normal.mod module other modules which are located in /boot/grub/[arch]/
  • If GRUB2 didn’t find grub.cfg file then, grub rescue> is prompted that means it couldn’t find normal.mod, so it probably couldn’t find any of the boot files.
@royki
royki / LinuxCommand.md
Last active July 11, 2023 03:38
Linux Administration
  • Users are on the system are listed in an alphabetical order - cut /etc/passwrd -d":" -f1 | sort
  • User has shell access - cat /etc/passwd | cut -d":" -f4,5,6,7 | grep "^0" or count - cat /etc/passwd | cut -d":" -f4 | grep "^0" | wc -l
  • Export the Users' list to a file - cut /etc/passwd -d ":" -f1 > system_users.txt
  • Count the number of Users - cat ./system_users.txt | sort | wc –l
  • Compare - cat ./system_users.txt - cut /etc/passwd -d ":" -f1 > system_users002.txt && cat system_users002.txt | sort | wc -l
  • Diff - diff ./system_users.txt ./system_users002.txt
  • how many words begin with the letter a from the main user dictionary - egrep '^a.*$' /usr/share/dict/words | wc -l
  • tee to both view and write files and directories in /etc - ls -d /etc/a* | tee ./etc_report_a.txt
  • Kernel Info - lsb_release -a or uname -a or hostnamectl or cat /proc/os-release
@AveYo
AveYo / ..runasTI.bat
Last active October 19, 2025 08:46
Lean and Mean runas TrustedInstaller / System compact snippet to easily integrate in your batch scripts
@echo off& title RunAsTI - lean and mean snippet by AveYo, 2018-2022
goto :nfo
[FEATURES]
- innovative HKCU load, no need for reg load / unload ping-pong; programs get the user profile
- sets ownership privileges, high priority, and explorer support; get System if TI unavailable
- accepts special characters in paths for which default run as administrator fails
- adds Send to - RunAsTI right-click menu entry to launch files and folders as TI via explorer
[USAGE]
- First copy-paste RunAsTI snippet after .bat script content
- Then call it anywhere to launch programs with arguments as TI
@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active October 29, 2025 07:52
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active October 24, 2025 11:14
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@zubayerahamed
zubayerahamed / zpl_command.md
Created August 24, 2018 13:11
How to print ZPL file using terminal on linux

to see which printer is availabe in this system , simply type

lpstat -p -d

Output: printer HP-LaserJet-1200 is idle. enabled since Thu 09 Aug 2018 01:29:05 PM +06 printer Zebra-Technologies-ZTC-GK420t is idle. enabled since Fri 24 Aug 2018 05:54:04 PM +06 printer ZTC-GK420t is idle. enabled since Fri 24 Aug 2018 05:54:04 PM +06 system default destination: Zebra-Technologies-ZTC-GK420t

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh [email protected]

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

Postgres Cheatsheet

This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.

Setup

installation, Ubuntu

http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL