Skip to content

Instantly share code, notes, and snippets.

View bluPhy's full-sized avatar
🏠
Working from home

bluPhy bluPhy

🏠
Working from home
View GitHub Profile
@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@bluPhy
bluPhy / linux-update-cleanup.sh
Last active November 26, 2024 19:42
Script to keep Linux updated and basic clean-up
#!/usr/bin/env bash
# Function to check if a command exists
command_exists() {
if command -v "$1" &>/dev/null; then
#msg "Command $1 exists\n" "success"
return 0 # Command exists
else
msg "Command $1 does not exist\n" "danger"
return 1 # Command does not exist
#!/usr/bin/env bash -v
# This prevents the installer from opening dialog boxes during the installation process. As a result, it stops the errors from displaying
# export DEBIAN_FRONTEND=noninteractive
### Adding default user
while true; do
read -p "Provide the password for default username (kali):" -s -r password
if [[ $password =~ ^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z]).{8,}$ ]]; then
# Password meets all conditions
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active April 30, 2025 04:34
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
# INSTALL SOURCES FOR CHROME REMOTE DESKTOP AND VSCODE
RUN apt-get update && apt-get upgrade --assume-yes
RUN apt-get --assume-yes install curl gpg wget
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg && \
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
@geerlingguy
geerlingguy / minecraft.yml
Created September 24, 2020 18:01
Minecraft installation on Kubernetes via Ansible and Helm
# Minecraft Server deployment for Kubernetes clusters via Ansible's Helm module.
#
# The Helm module is part of the Kubernetes collection. Install it with:
#
# ansible-galaxy collection install community.kubernetes
#
# Then run the playbook:
#
# ansible-playbook main.yml
#
@bluPhy
bluPhy / Use-RunAsAdmin(function).ps1
Last active September 10, 2021 18:23
Check if script is running as Administrator or with elevated privilege, if not use RunAs
function Use-RunAs {
# Check if script is running as Administrator or with elevated privilege, if not use RunAs
# Use Check Switch to check if admin
param([Switch]$Check)
# Detecting OS Platform, win32nt for Windows or unix for Linux/Unix
$OSPlatform = (([System.Environment]::OSVersion.Platform).ToString()).ToLower()
if ($OSPlatform -eq "unix") {
Write-Warning "Detected Linux/Unix OS, you don't need this, use sudo"
exit # Quit this session of powershell
@RobertPaulson90
RobertPaulson90 / aws-config-deleteallrules.ps1
Last active September 29, 2021 11:40
Quick'n'dirty PowerShell script to delete ALL rules for "AWS Config". Yeah, cause that's hella expensive apparently and the Management Console doesn't allow you to delete them all at once... This obviously relies on the AWS CLI.
# DANGER. DON'T RUN UNLESS YOU REALLY WANT TO DELETE ALL YOUR AWS CONFIG RULES.
$deserialized = aws configservice describe-config-rules | ConvertFrom-Json
$arr = $deserialized.ConfigRules | select -ExpandProperty ConfigRuleName
foreach($x in $arr) {
# if your API keys aren't setup you may want to add them in the script
aws configservice delete-config-rule --config-rule-name $x | write-host
}
@JustinShenk
JustinShenk / idle-shutdown.sh
Last active January 15, 2025 11:37
Google Cloud Platform (GCP) instance idle shutdown
#!/bin/bash
# Add to instance metadata with `gcloud compute instances add-metadata \
# instance-name --metadata-from-file startup-script=idle-shutdown.sh` and reboot
# NOTE: requires `bc`, eg, sudo apt-get install bc
# Modified from https://stackoverflow.com/questions/30556920/how-can-i-automatically-kill-idle-gce-instances-based-on-cpu-usage
threshold=0.1
count=0
wait_minutes=60
while true
@amanjuman
amanjuman / SoftEther VPN Server Setup in Raspberry Pi 3
Last active October 18, 2023 05:20
SoftEther VPN Server Setup in Raspberry Pi 3
sudo su
cd /root/
wget https://www.softether-download.com/files/softether/v4.34-9745-rtm-2020.04.05-tree/Linux/SoftEther_VPN_Server/32bit_-_ARM_EABI/softether-vpnserver-v4.34-9745-rtm-2020.04.05-linux-arm_eabi-32bit.tar.gz
tar xzf softether-vpnserver-v4.34-9745-rtm-2020.04.05-linux-arm_eabi-32bit.tar.gz && rm softether-vpnserver-v4.34-9745-rtm-2020.04.05-linux-arm_eabi-32bit.tar.gz
cd vpnserver && sudo make
cd ..
sudo mv vpnserver /usr/local && cd /usr/local/vpnserver/
sudo chmod 600 *