Skip to content

Instantly share code, notes, and snippets.

View BoxedBrain's full-sized avatar

BoxedBrain

  • Netwrix
  • Germany
  • 22:53 (UTC +01:00)
View GitHub Profile
@BoxedBrain
BoxedBrain / Canon_SELPHY_CP1500.ppd
Created August 13, 2024 16:21 — forked from benjaminkott/Canon_SELPHY_CP1500.ppd
CUPS Canon SELPHY CP1500 PostScript Printer Driver - PPD
*PPD-Adobe: "4.3"
*cupsMandatory: attributes-charset attributes-natural-language printer-uri
*% PPD created by ipp2ppd (v2:Feb 1 2018)
*FormatVersion: "4.3"
*FileVersion: "2.0"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PSVersion: "(3010.000) 0"
*LanguageLevel: "3"
*FileSystem: False
@BoxedBrain
BoxedBrain / MoveAllWindowsToMainMonitor.ps1
Created April 5, 2024 13:28
Move all open windows to the main monitor with PowerShell
# Load the necessary user32.dll functions
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class User32 {
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool GetWindowRect(IntPtr hWnd, out RECT lpRect);
[DllImport("user32.dll")]
@BoxedBrain
BoxedBrain / secs.sh
Last active June 1, 2023 16:48
Add publicly accessible GitHub user SSH public keys to 'authorized_keys'
#!/bin/bash
############################################################
# Script META #
############################################################
MetaName="secs.sh"
MetaDesc="Add publicly accessible GitHub user SSH public keys to 'authorized_keys'"
MetaVersion="2023.6.1"
@BoxedBrain
BoxedBrain / nps-cheat-sheet.ps1
Last active October 11, 2024 12:55
Netwrix Password Secure Cheat Sheet
# Some functions may require PS v6 or later - so let`s install it first
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
# ------------------------------------------------------------
# add local service account
$username = "svc_passwordsecure"
$password = Read-Host -AsSecureString
New-LocalUser -Name $username -Password $password -FullName "Netwrix Password Secure" -Description "Service account"
Add-LocalGroupMember -Group Administrators -Member $username
@BoxedBrain
BoxedBrain / docker-compose.yaml
Created January 5, 2023 10:40
Mailpit docker compose
version: '3.7'
services:
mailpit-server:
image: axllent/mailpit:latest
container_name: mailpit-server
hostname: mailpit-server
restart: unless-stopped
volumes:
@BoxedBrain
BoxedBrain / borg-borgmatic.markdown
Last active July 18, 2022 08:37
Install Borg-Backup & Borgmatic

Install Borg-Backup & Borgmatic

update packages

sudo apt update

Borg installation

go to tmp folder

cd /tmp/
@BoxedBrain
BoxedBrain / docker-cleanup.markdown
Created June 5, 2020 09:09
Docker cleanup cheatsheet

Docker cleanup cheatsheet

Delete all existing containers:

sudo docker rm -f $(docker ps -a -q)

Delete all stopped containers:

sudo docker rm -f $(docker ps -a -f status=exited)