Skip to content

Instantly share code, notes, and snippets.

@eggbean
eggbean / install_scoop.ps1
Last active March 19, 2025 13:07
PowerShell script to install scoop for multi-users and install packages that I use.
# PowerShell script to install scoop for multi-user and packages.
# If re-run when scoop is already installed, any additional packages
# are installed and shims are reset in order of the package list.
# I prefer to keep user and global packages as the same, so there's
# a minor inconvenience in some situations where packages will
# be listed twice with global commands.
#
# To avoid git ownership warnings, read this:
# https://stackoverflow.com/a/71904131/140872
# git config --global --add safe.directory "*" (double quotes on Windows)
@FriedrichWeinmann
FriedrichWeinmann / DomainCryptographyScan.ps1
Last active October 24, 2024 16:27
Scans an Active Directory domain's and its principal's kerberos encryption configuration.
<#
.SYNOPSIS
Scans an Active Directory domain's and its principal's kerberos encryption configuration.
.DESCRIPTION
Scans an Active Directory domain's and its principal's kerberos encryption configuration.
It will generate all data via LDAP, and analyze the results for possible authentication issues.
It supports three ways to report:
- Print: Write analysis of results to screen
@pythoninthegrass
pythoninthegrass / .bashrc
Last active May 24, 2024 15:56
Synology shell config
#/etc/profile: system-wide .profile file for ash.
# shellcheck disable=SC2155
umask 077
export PATH="/volume1/@appstore/git/bin:/opt/bin:/opt/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin"
export PGDATA=/var/services/pgsql
export TERMINFO=/usr/share/terminfo
@jonlabelle
jonlabelle / ldap_search_filter_cheatsheet.md
Last active April 15, 2025 16:07
LDAP Search Filter Cheatsheet
ipconfig /release; ipconfig /flushdns; ipconfig /renew; netsh winsock reset; netsh interface ipv4 reset; netsh interface ipv6 reset; netsh interface ip delete destinationcache;
@gasman
gasman / encode.py
Created October 25, 2020 12:23
Encoding a file as a Youtube video - https://www.youtube.com/watch?v=hyqLv2_zBdA
# Encode inputfile.tar.gz as a series of video frames
# Frames are written to frames/frameNNNN.png
from PIL import Image
with open('inputfile.tar.gz', 'rb') as f:
data = f.read()
WIDTH = 120
HEIGHT = 90
CHUNK_SIZE = int((WIDTH * HEIGHT) / 8)
@CybersamuraiDK
CybersamuraiDK / wifi-passwords.ps1
Last active January 25, 2025 21:34 — forked from willjobs/wifi-passwords.ps1
PowerShell script to show all wifi passwords saved in Windows
(netsh wlan show profiles) | Select-String "\:(.+)$" | %{$name=$_.Matches.Groups[1].Value.Trim(); ($details=netsh wlan show profile name="$name" key=clear) -and ($pass=($details | Select-String "Key Content\W+\:(.+)$").Matches.Groups[1].Value.Trim() -or "N/A"); [PSCustomObject]@{PROFILE_NAME=$name;PASSWORD=$pass}} | Format-Table -AutoSize
@RomelSan
RomelSan / kitty-theme.md
Last active April 17, 2023 09:24
Kitty Theme

Kitty portable recommended settings

  1. Terminal --> Features --> Disable Application Keypad mode
  2. Terminal --> Keyboard --> The Function keys and keypad --> Linux
  3. Connection --> Data --> set terminal-type string to linux
  4. Window -> Appearance set check for "Allow selection of variable pitch fonts"
  5. Window -> Colours set check for "Selected text is a different colour"
  6. Use font Cascadia Code PL included with "Windows Terminal" app or download from github
    File to install: CascadiaCodePL.ttf
    https://github.com/microsoft/cascadia-code
  7. If you are using oh my zsh then you can use the fonts from nerdfonts.com
@jimanx2
jimanx2 / AgentDeploymentScript.sh
Last active February 7, 2024 11:25
TrendMicroDeepSecurityInstallScript
#!/bin/bash
ACTIVATIONURL='dsm://agents.deepsecurity.trendmicro.com:443/'
MANAGERURL='https://app.deepsecurity.trendmicro.com:443'
CURLOPTIONS='--silent --tlsv1.2'
linuxPlatform='';
isRPM='';
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo You are not running as the root user. Please try again with root privileges.;
@MichaelCurrin
MichaelCurrin / self-extracting-shell-scripts.md
Last active February 8, 2025 01:24
Self-extracting shell scripts

Self-extracting shell scripts

Guide to using MakeSelf tool to create self-extracting shell scripts for easy distribution

How to package your shell scripts project as a release which can be easily downloaded, extracted, and run.

This is intended to work with one or more executable scripts that use a shell shebang. This could work with other shebangs I guss, but you're probably better off using the packaging approach for that language.

This guide is written for macOS / Linux.