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 / Microsoft.PowerShell_profile.ps1
Last active March 26, 2025 08:42
PowerShell profile #windows #powershell
# Deploy: pwsh -EncodedCommand "cAB3AHMAaAAgAC0ARQB4AGUAYwB1AHQAaQBvAG4AUABvAGwAaQBjAHkAIABVAG4AcgBlAHMAdAByAGkAYwB0AGUAZAAgAC0AQwBvAG0AbQBhAG4AZAAgAHsAIABTAHQAYQByAHQALQBQAHIAbwBjAGUAcwBzACAAcAB3AHMAaAAgAHsAIAAtAEMAbwBtAG0AYQBuAGQAIAAiACAATgBlAHcALQBJAHQAZQBtACAALQBUAHkAcABlACAARABpAHIAZQBjAHQAbwByAHkAIAAtAEYAbwByAGMAZQAgACIAIgAkAEUAbgB2ADoAVQBTAEUAUgBQAFIATwBGAEkATABFAFwARABvAGMAdQBtAGUAbgB0AHMAXABQAG8AdwBlAHIAUwBoAGUAbABsACIAIgAgAHwAIABPAHUAdAAtAE4AdQBsAGwAOwAgAEkAbgB2AG8AawBlAC0AVwBlAGIAUgBlAHEAdQBlAHMAdAAgAC0ASABlAGEAZABlAHIAcwAgAEAAewAiACIAQwBhAGMAaABlAC0AQwBvAG4AdAByAG8AbAAiACIAPQAiACIAbgBvAC0AYwBhAGMAaABlACIAIgB9ACAALQBPAHUAdABGAGkAbABlACAAIgAiACQARQBuAHYAOgBVAFMARQBSAFAAUgBPAEYASQBMAEUAXABEAG8AYwB1AG0AZQBuAHQAcwBcAFAAbwB3AGUAcgBTAGgAZQBsAGwAXABNAGkAYwByAG8AcwBvAGYAdAAuAFAAbwB3AGUAcgBTAGgAZQBsAGwAXwBwAHIAbwBmAGkAbABlAC4AcABzADEAIgAiACAALQBVAHIAaQAgACcAaAB0AHQAcABzADoALwAvAGcAaQBzAHQALgBnAGkAdABoAHUAYgB1AHMAZQByAGMAbwBuAHQAZQBuAHQALgBjAG8AbQAvAFEATgBpAG0AYgB1AHMALwBkAGUAZAAxAGYAOQAzADgAYQAyAGIANQAwAG
@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...]
# 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 / 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
@QNimbus
QNimbus / README.md
Last active April 22, 2025 22:47
SSH Agent forwarding WSL2

SSH Agent forwarding in WSL2

Download npiperelay

To communicate between WSL and the 1Password SSH agent, we'd need to use npiperelay. This tool allows WSL to communicate with Windows' named pipes.

To install it, we need to open the GitHub repository and download the latest release. At the time of writing this post the latest release is v0.1.0 from July 2, 2020.

Unzip it and paste the npiperelay.exe file in any folder that's configured in your system's PATH. For example %USERPROFILE%/.wsl/mpiperelay.exe and then add %USERPROFILE%/.wsl to your PATH.

@QNimbus
QNimbus / PrusaSlicer original startup.gcode
Last active February 8, 2022 08:35
PrusaSlicer original startup g-code for 3D printing
M862.3 P "[printer_model]" ; printer model check
M862.1 P[nozzle_diameter] ; nozzle diameter check
M115 U3.10.0 ; tell printer latest fw version
G90 ; use absolute coordinates
M83 ; extruder relative mode
M104 S[first_layer_temperature] ; set extruder temp
M140 S[first_layer_bed_temperature] ; set bed temp
M190 S[first_layer_bed_temperature] ; wait for bed temp
M109 S[first_layer_temperature] ; wait for extruder temp
G28 W ; home all without mesh bed level
#!/usr/bin/env bash
##
## Title: deploy_pikvm.sh
## Description: Script to deploy uploaded certificates for use with PiKVM
## Author: B. van wetten
## Created date: 07-02-2022
## Updated date: 07-02-2022
## Version: 0.1
## GitHub Gist:
##
@QNimbus
QNimbus / PrusaSlicer startup.gcode
Last active February 9, 2022 09:16
PrusaSlicer startup g-code for 3D printing
M862.3 P "[printer_model]" ; printer model check
M862.1 P[nozzle_diameter] ; nozzle diameter check
M115 U3.10.0 ; tell printer latest fw version
M117 Initializing
; Set coordinate modes
G90 ; use absolute coordinates
M83 ; extruder relative mode
@QNimbus
QNimbus / placeholder.html
Last active January 27, 2022 07:57
Placeholder HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Dummy Page</title>
<meta name="description" content="Simple, quick, standalone responsive placeholder Website without any additional resources">
<meta name="author" content="https://gist.github.com/qnimbus">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css" integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous">
<!--[if lt IE 9]>
@QNimbus
QNimbus / usefull_cmds.sh
Last active April 22, 2024 10:28
Usefull commands
# Recursively append newline to files that do not yet end with '\n'
# Excludes .git/ folder
find . -type f -not -path "./.git/*" -exec sed -i -e '$a\' {} \;
# Quick port forward to remote host (e.g. for webmin)
ssh -l user -L 8080:localhost:10000 # Then browse to http://localhost:8080