Skip to content

Instantly share code, notes, and snippets.

@IronTooch
IronTooch / gist:d821d2274fda60324471c19940ef6d35
Created February 17, 2022 16:31
Check Clock Sources Available in Linux
cat /sys/devices/system/clocksource/*/available_clocksource
@IronTooch
IronTooch / RemoveCrapware.ps2
Created February 8, 2022 23:05
Remove Crapware from New Windows 10 Install
Get-AppxPackage *3dbuilder* | Remove-AppxPackage
Get-AppxPackage *windowsalarms* | Remove-AppxPackage
Get-AppxPackage *windowscalculator* | Remove-AppxPackage
Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage
Get-AppxPackage *windowscamera* | Remove-AppxPackage
Get-AppxPackage *officehub* | Remove-AppxPackage
Get-AppxPackage *skypeapp* | Remove-AppxPackage
Get-AppxPackage *getstarted* | Remove-AppxPackage
Get-AppxPackage *zunemusic* | Remove-AppxPackage
Get-AppxPackage *windowsmaps* | Remove-AppxPackage
@IronTooch
IronTooch / annotations.cs
Created February 8, 2022 23:02
C# Documentation Annotations to support Intellisense
/// <typeparam name="TKey">The key value.</typeparam>
/// <typeparam name="TValue">The value.</typeparam>
/// <param name="dic">Dictionary.</param>
/// <param name="key">Key we're looking for.</param>
/// <param name="defaultValue">Default for the type.</param>
/// <returns> TValue the value of the key or the default. </returns>
@IronTooch
IronTooch / DjangoSuperuser.md
Created February 8, 2022 23:00
Creating Django Super User

Creating an Admin Interface User:

python manage.py createsuperuser --username myAdminUser --email [email protected]

(Optionally: Set DJANGO_SUPERUSER_PASSWORD Environment variable to set new passwords for python manage.py createsuperuser command, and execute with python manage.py createsuperuser --noinput --username myAdminUser --email [email protected])

@IronTooch
IronTooch / ansible-extravars.sh
Created February 8, 2022 07:08
Ansible Playbook with ExtraVars containing arrays
ansible-playbook playbook.yml -i 11.22.33.44, -u my_user --extra-vars '{"my_first_var":"first_var_value","my_second_var":"second_var_value","my_array_var":["first_array_element","second_array_element","third_array_element"]}'
@IronTooch
IronTooch / getServerName.sh
Last active February 8, 2022 06:54
Gets a new server name that starts with the Param Given
#!/bin/bash
export SERVER_NAMES_GIST='https://gist.github.com/IronTooch/dfc71ed972badabf45b7104520206ede/raw/fa2e41e8d2633ffa4c05d975cc7413e07bdd9f8e/server-names.txt'
getNewServerName() {
curl -s $SERVER_NAMES_GIST | grep "^$1" | shuf | head --lines 1
}
# Usage
# curl -s "https://gist.github.com/IronTooch/15e9e43327a1f24c1b45aba33a73ec9f/raw/479e40e6646f24f519d48e27e3c3b82b8aeeff91/getServerName.sh" >> ~/.bashrc;source ~/.bashrc
@IronTooch
IronTooch / expect.sh
Created February 4, 2022 19:51
Expect Example
#!/usr/bin/expect -f
set timeout -1
spawn step ca init --ssh
expect "Hosted - fully-managed step-ca cloud instance run for you by smallstep"
send -- "\r"
expect "(e.g. Smallstep)"
send -- "Example.com CA\r"
@IronTooch
IronTooch / mech-names.txt
Created February 4, 2022 07:14
List of BattleTech Mech Names
adder
annihilator
argus
assassin
atlasprime
avatar
awesome
battlemaster
blackhawk
blackjack
@IronTooch
IronTooch / carriers.txt
Last active February 4, 2022 06:47
List of US Aircraft Carriers
# Sample usage: `curl <gist> | tail --lines +4 | shuf | head --lines 1`
abrahamlincoln
america
antietam
bataan
belleauwood
bennington
bonhommerichard
boxer
bunkerhill
@IronTooch
IronTooch / tank-names.txt
Created February 4, 2022 06:40
List of Tanks
# Sample usage: `curl <gist> | tail --lines +4 | shuf | head --lines 1`
locust
chaffee
lee
sherman
pershing
hellcat
walker
patton
sheridan