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
#!/bin/bash | |
current_disk_usage() { | |
df -h | awk '/\/$/ {print $5}' | |
} | |
percent_disk_usage_before=$(current_disk_usage) | |
if ! [ -x "$(command -v journalctl)" ]; then | |
echo 'Warning: journalctl is not installed.' |
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
#!/bin/sh | |
# Get a list of all staged Ruby (.rb) files | |
RUBY_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.rb$') | |
# If there are no Ruby files, skip the check | |
if [ -z "$RUBY_FILES" ]; then | |
exit 0 | |
fi |
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 | |
require 'date' | |
# Exit it script has already been run this boot session | |
return if File.exist?('/tmp/opensaysme_switch.lock') | |
# Create lock file to "turn off" script until next system boot | |
File.open('/tmp/opensaysme_switch.lock', 'w') | |
WEEKDAYS = %i[ |
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
class AdaptAndOvercome < RTanque::Bot::Brain | |
NAME = 'Adapt&Overcome' | |
include RTanque::Bot::BrainHelper | |
WALL_MARGIN = 100 | |
ACCEL_TICKS = 62 | |
CHANGE_DIRECTION_PROBABILITY = 0.002 | |
RAND_PRECISION = 2000000 | |
RADAR_PRECISION_RANGE = 0.1 | |
MIN_SHOT_DIST_PER_TICK = 5 |
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
### Keybase proof | |
I hereby claim: | |
* I am bkiahstroud on github. | |
* I am bkiahstroud (https://keybase.io/bkiahstroud) on keybase. | |
* I have a public key ASBzq6-2MtriWMWEFRjyZmDP8koCJo74XW2TtwiUlqxJcwo | |
To claim this, I am signing this object: |