Skip to content

Instantly share code, notes, and snippets.

View QNimbus's full-sized avatar
🎯
Focusing

Bas QNimbus

🎯
Focusing
  • The Netherlands
View GitHub Profile
@QNimbus
QNimbus / bloatware
Last active June 6, 2022 11:48
Remove Samsung bloatware
# Samsung S22 debloat
## Install SDK tools
Download Android SDK Platform tools [here](https://developer.android.com/studio/releases/platform-tools)
## ADB Commands
Get list of all apps
```ps
# Blueprint metadata
blueprint:
name: Motion activated area light
description: |
Use one or more sensors to trigger a dimmable area light. Manual operation of the light will (temporarily) disable the automation.
Required entities:
- Sensor(s)
- Light entity
@QNimbus
QNimbus / bash-script-template.sh
Created December 29, 2022 11:49
Bash boilerplate script
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat << EOF # remove the space between << and EOF, this is due to web plugin issue
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@QNimbus
QNimbus / Microsoft.PowerShell_profile.ps1
Last active March 26, 2025 08:42
PowerShell profile #windows #powershell
# Deploy: pwsh -EncodedCommand "cAB3AHMAaAAgAC0ARQB4AGUAYwB1AHQAaQBvAG4AUABvAGwAaQBjAHkAIABVAG4AcgBlAHMAdAByAGkAYwB0AGUAZAAgAC0AQwBvAG0AbQBhAG4AZAAgAHsAIABTAHQAYQByAHQALQBQAHIAbwBjAGUAcwBzACAAcAB3AHMAaAAgAHsAIAAtAEMAbwBtAG0AYQBuAGQAIAAiACAATgBlAHcALQBJAHQAZQBtACAALQBUAHkAcABlACAARABpAHIAZQBjAHQAbwByAHkAIAAtAEYAbwByAGMAZQAgACIAIgAkAEUAbgB2ADoAVQBTAEUAUgBQAFIATwBGAEkATABFAFwARABvAGMAdQBtAGUAbgB0AHMAXABQAG8AdwBlAHIAUwBoAGUAbABsACIAIgAgAHwAIABPAHUAdAAtAE4AdQBsAGwAOwAgAEkAbgB2AG8AawBlAC0AVwBlAGIAUgBlAHEAdQBlAHMAdAAgAC0ASABlAGEAZABlAHIAcwAgAEAAewAiACIAQwBhAGMAaABlAC0AQwBvAG4AdAByAG8AbAAiACIAPQAiACIAbgBvAC0AYwBhAGMAaABlACIAIgB9ACAALQBPAHUAdABGAGkAbABlACAAIgAiACQARQBuAHYAOgBVAFMARQBSAFAAUgBPAEYASQBMAEUAXABEAG8AYwB1AG0AZQBuAHQAcwBcAFAAbwB3AGUAcgBTAGgAZQBsAGwAXABNAGkAYwByAG8AcwBvAGYAdAAuAFAAbwB3AGUAcgBTAGgAZQBsAGwAXwBwAHIAbwBmAGkAbABlAC4AcABzADEAIgAiACAALQBVAHIAaQAgACcAaAB0AHQAcABzADoALwAvAGcAaQBzAHQALgBnAGkAdABoAHUAYgB1AHMAZQByAGMAbwBuAHQAZQBuAHQALgBjAG8AbQAvAFEATgBpAG0AYgB1AHMALwBkAGUAZAAxAGYAOQAzADgAYQAyAGIANQAwAG
@QNimbus
QNimbus / iptables.sh
Last active May 31, 2023 20:17
Basic iptables configuration
trustedIP="1.2.3.4/32"
cat <<- EOF > /etc/iptables/rules.v4
# Generated by iptables-save v1.8.7 on Wed Mar 29 14:37:32 2023
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
@QNimbus
QNimbus / premake5.lua
Last active April 1, 2023 10:47
Premake boilerplate
-- premake5.lua
workspace "MyProject"
architecture "x64"
configurations { "Debug", "Release", "Dist" }
-- Variables
OutputDir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
@QNimbus
QNimbus / .wslconfig
Last active July 30, 2023 14:39
WSL2 Config
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB
memory=4GB
# Sets the VM to use two virtual processors
processors=2
# Automatically mount Windows drive when the distribution is launched
@QNimbus
QNimbus / .Windows deployment & provisioning
Last active March 20, 2025 20:49
Windows deployment & provisioning #windows
Office 365 config.xml
Windows Sandbox config.wsb
Windows-Installer.ps1
boxstarter-sandbox.ps1
boxstarter-win11.ps1