Skip to content

Instantly share code, notes, and snippets.

View KnightsWhoSayNi0's full-sized avatar
💾
why is there no 5.25in floppy emoji

John Godman KnightsWhoSayNi0

💾
why is there no 5.25in floppy emoji
View GitHub Profile
#!/bin/bash
sudo su
sudo apt purge netbird -y
sudo rm -rf /var/lib/netbird/
curl -fsSL https://pkgs.netbird.io/install.sh | sh
exit
netbird up -m https://vpn.ists.io -k 8B6B0A25-1C6C-4D9E-8765-54F355D90FC1
autoinstall:
user-data:
users:
- name: blueteam
gecos: 'blueteam'
passwd: '$1$73IQEhRr$XpmCc/C3v93TLBZLpzZtI.'
groups: adm, sudo
shell: /bin/bash
packages:
- curl
@KnightsWhoSayNi0
KnightsWhoSayNi0 / schooldays.ts
Created September 4, 2024 15:06
Inverse schedule excel script — oddly specific problem
function main(workbook: ExcelScript.Workbook)
{
const days = workbook.getWorksheet("days");
const out = workbook.getWorksheet("out");
const dayRange: ExcelScript.Range = days.getRange("A2:B71"); // first sem
const outRange: ExcelScript.Range = out.getRange(); // whole sheet
let outIndex = 1;
import java.io.*;
/**
* @author John Godman
* Simple file token parser.
*/
public class Main
{
public static final int BUF_SIZE = 80,
@KnightsWhoSayNi0
KnightsWhoSayNi0 / password-policy.sh
Created October 18, 2023 02:23
Simple script to edit password policies in linux
#!/bin/bash
FILE="${FILE:-"/etc/login.defs"}"
sed -i "s/^[^#]*PASS_MAX_DAYS.*$/PASS_MAX_DAYS 90/" "${FILE}"
sed -i "s/^[^#]*PASS_MIN_DAYS.*$/PASS_MIN_DAYS 7/" "${FILE}"
sed -i "s/^[^#]*PASS_WARN_AGE.*$/PASS_WARN_AGE 14/" "${FILE}"
@KnightsWhoSayNi0
KnightsWhoSayNi0 / WaysToBrickAUnixSystem.md
Last active May 10, 2022 23:57 — forked from Scherso/WaysToBrickAUnixSystem.md
Different Ways You Shouldn’t use Your Computer, Going for every Lang

Ways To Not Use Your Unix Machine

(You probably shouldn't do this)

rm Remove Command