Skip to content

Instantly share code, notes, and snippets.

tmux new -s name
tmux attach-session -t name
sudo apt install magic-wormhole
wormhole send filename.txt
wormhole receive
{"csp-report":{"blocked-uri":"https://code.highcharts.com/stock/modules/data.js","column-number":1,"disposition":"enforce","document-uri":"https://localhost:44301/Evil.aspx","effective-directive":"script-src-elem","original-policy":"default-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://localhost https://remote.captcha.com https://cdnjs.cloudflare.com https://www.googletagmanager.com https://platform.twitter.com; style-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net https://cdnjs.cloudflare.com; frame-src https://platform.twitter.com; img-src 'self' https://www.googletagmanager.com https://syndication.twitter.com; connect-src https: wss:; report-uri https://localhost:44301/api/CSPReport; report-to csp-endpoint","referrer":"","status-code":200,"violated-directive":"script-src-elem"}}
@MrChrisWeinert
MrChrisWeinert / RandomBashBits.txt
Last active May 6, 2025 15:47
Random bash bits
#bin/bash
#This will list out all the .md files that DON'T contain 'tags'
for filename in `find ./ | grep 'md$'`; do grep -L tags $filename; done
#WITH tags
for filename in `find ./ | grep 'md$'`; do grep -l tags $filename; done
#Find in all files:
find ./ -exec grep 'Critical' /dev/null {} \; | tee ~/grepResults.txt
@MrChrisWeinert
MrChrisWeinert / Excel Date Format for SQL datetime
Last active July 6, 2023 20:52
This is the Excel Date Format to use that will properly display SQL server's datetime data type.
yyyy-mm-dd hh:mm:ss.000
or
dd-mmm-yy hh:mm AM/PM
'Emergency script created for a friend to toggle HDR
Set oShell = CreateObject("WScript.Shell")
oShell.Run("""ms-settings:display""")
WScript.Sleep 2000
oShell.AppActivate "settings"
WScript.Sleep 100
oShell.SendKeys "{TAB}"
WScript.Sleep 100
oShell.SendKeys "{TAB}"
WScript.Sleep 100
#Create the list of base images to select from
$Ubuntu = New-Object System.Management.Automation.Host.ChoiceDescription '&Ubuntu', 'OS: Ubuntu 20.04.3 Desktop'
$Win10 = New-Object System.Management.Automation.Host.ChoiceDescription 'Win1&0', 'OS: Windows 10'
$Win11 = New-Object System.Management.Automation.Host.ChoiceDescription 'Win1&1', 'OS: Windows 11 Updated January 2022'
$Server = New-Object System.Management.Automation.Host.ChoiceDescription '&Server', 'OS: Windows Server 2022 Updated January 2022'
$options = [System.Management.Automation.Host.ChoiceDescription[]]($Ubuntu, $Win10, $Win11, $Server)
$VMName = Read-Host("Please enter your VM Name")
$OS = $Host.UI.PromptForChoice("","Please select an Operating System",$options, 0)
@MrChrisWeinert
MrChrisWeinert / triage.bat
Last active January 24, 2023 16:49
Windows triage
tasklist > info.txt && arp -a >> info.txt && netstat -ano >> info.txt && sc query >> info.txt && systeminfo >> info.txt
@MrChrisWeinert
MrChrisWeinert / WhatVersionOfOperatingSystemIsRunning.sh
Created December 9, 2021 20:29
Shows what version of Linux is running
#!/bin/zsh
grep VERSION /etc/os-release
uname -v
uname -r
<!ENTITY all '%start;%goodies;%end;'>
@MrChrisWeinert
MrChrisWeinert / GameOfLife.cs
Created August 4, 2020 15:00 — forked from lennartb-/GameOfLife.cs
Conway's Game of Life in C# (Console App) with basic arrays and without any fancy complicated stuff. No error checking included.
using System;
namespace GameOfLife {
public class LifeSimulation {
private int Heigth;
private int Width;
private bool[,] cells;
/// <summary>