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
  • Student
  • North America
  • 03:01 (UTC -04:00)
View GitHub Profile
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 / notes.md
Last active February 24, 2023 17:49
Notes

Programming Notes

2/22/23

Grammar : Syntax; formats; etc...

Parsing

  • Non-deterministic - essentially, doesn't end (the file parsing we did)
  • Deterministic - Fixed format
@KnightsWhoSayNi0
KnightsWhoSayNi0 / Barista.java
Last active November 28, 2022 03:14
Barstucks
/**
* STRAZZA Pd. 8
* PGM 4
* @author john
* @see Coffee
*/
public class Barista
{ /**
* Input of coffee orders in an array. Graded data from Strazza.
*/
public class PrimeyTimey
{
/* John Godman - Program 2
* Strazza Pd. 8
*/
// configuration constants
public static final int START = 2,
END = 250;
@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