Skip to content

Instantly share code, notes, and snippets.

View brandoningli's full-sized avatar

Brandon Ingli brandoningli

View GitHub Profile
@brandoningli
brandoningli / disable_printer_autoadd.sh
Created October 12, 2021 01:55
Disable GNOME printer discovery (avahi and cups-browsed)
#!/bin/bash
# NOTE: This may also disable file server auto discovery
# https://www.linuxupdate.co.uk/2021/05/19/how-to-stop-gnome-auto-printer-discovery-on-fedora-ubuntu-mint/
# Tested on Pop!_OS 20.04 LTS (Ubuntu based)
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
@brandoningli
brandoningli / keybase.md
Created October 24, 2019 19:51
Keybase

Keybase proof

I hereby claim:

  • I am brandoningli on github.
  • I am brandoningli (https://keybase.io/brandoningli) on keybase.
  • I have a public key whose fingerprint is 3C06 9319 1277 764F FD2E 469F 53EC CC36 18A6 6DC1

To claim this, I am signing this object:

@brandoningli
brandoningli / randomItem.cpp
Last active February 8, 2017 02:01
Selects a random entry from a given list of items, like Class Members. Takes data from a text file called 'items.txt' that lists every item, one per line.
/*
Selects a random entry from a given list of items, like Class Members.
items.txt contains the items, one per line.
*/
#include <fstream>
#include <vector>
#include <string>
#include <time.h>
#include <iostream>
#include <Windows.h>