- 1. Avoid all exercise
- 2. Eat what you're told
- 3. Don't waste your life in bed
- 4. Live better through chemistry
- 5. Maximize your screen time
- 6. If you want it, buy it
- 7. Can't afford it? Get it anyway!
- 8. Give 100 percent to your work
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# A simple hash table implementation in Ruby using Ruby's built-in | |
# prehashing methods, chaining, and variable load factors. | |
# | |
# Author:: Hunter Gatewood | |
# A linked-list node with key, value, and next node attributes. | |
class Node | |
attr_accessor(:key, :val, :next_node) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
random_note.py prints a random musical note at the passed interval (seconds). | |
If no interval passed, defaults 4 seconds. | |
""" | |
import itertools | |
import random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Read in notes from the passed notes.json file and send to our Twitch channel. | |
Usage: `python3 play_notes.py <your notes.json file>` | |
Notes: | |
- Careful about getting rate limited! The limits per 30 seconds | |
are 30 messages for non-mods and 100 messages for mods. Pass that | |
limit and your IP gets banned for 8 hours. See | |
https://help.twitch.tv/customer/portal/articles/1302780-twitch-irc. | |
- Expects fields in notes.json to be filled out (pass, nick, notes). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const isoFetch = require('isomorphic-fetch'); | |
const Dropbox = require('dropbox').Dropbox; | |
const util = require('util'); | |
exports.handler = function(context, event, callback) { | |
log(context); | |
log(event); | |
const whitelisted_numbers = [ | |
context.HCG_NUM_1, |
Quick overview of installing Network UPS Tools on macOS.
- Config files are located in their normal Linux-style locations, with the
brew --prefix
prepended. So e.g., on Apple silicon,nut.conf
is located at/opt/homebrew/etc/nut/nut.conf
. - NUT's Homebrew service should be run as root, to support default shutdown command.
- While desktop macOS supports "wake after power loss", it doesn't seem to support "wake on power". It treats the graceful shutdown as a normal shutdown, which doesn't result in startup after power restore. Can either accept manual power-on required, or remove graceful shutdown.