Skip to content

Instantly share code, notes, and snippets.

View rowdyrotifer's full-sized avatar

Mai rowdyrotifer

  • San Francisco, CA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am MarkLalor on github.
  • I am marklalor (https://keybase.io/marklalor) on keybase.
  • I have a public key whose fingerprint is 5A72 A61D AB83 C220 E603 207D 1B7E AA18 F9BC EFDD

To claim this, I am signing this object:

@rowdyrotifer
rowdyrotifer / BetterLogger.java
Created July 13, 2016 06:37
Wrapper around Bukkit JavaPlugin logger since there seems to be no easy way (that I know of) to change the log levels that are outputted to the console. This logs everything (with prefixes) at the info level but only actually logs if the set level is high enough.
import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.plugin.java.JavaPlugin;
/**
* Wrapper around the logger as the log level
* features of Bukkit seem to be lacking :(
*
* @author Mark Lalor
@rowdyrotifer
rowdyrotifer / closebrowser
Last active December 31, 2015 07:39
Fall asleep while watching videos? Want your browser tab to close after X seconds? For OS X with Chrome/Safari. Example uses: "closebrowser chrome 3600" "closebrowser safari 3000"
#!/usr/bin/env bash
if [[ $1 == "chrome" ]]
then
echo "Closing active tab of Google Chrome in $2 seconds."
sleep $2
osascript -e 'tell app "Google Chrome" to close active tab of front window'
elif [[ $1 == "safari" ]]
then
echo "Closing active tab of Safari in $2 seconds."
sleep $2