Skip to content

Instantly share code, notes, and snippets.

View oxguy3's full-sized avatar

Hayden Schiff oxguy3

View GitHub Profile
@oxguy3
oxguy3 / adblock_whitelist.txt
Last active March 3, 2017 00:35
whitelist for my adblocker
192.168.1.32
about-scheme
achievementhunter.com
adf.ly
analytics.google.com
app.plex.tv
arstechnica.com
asdf.com
askubuntu.com
bandcamp.com
<?php
function printHead() {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
@oxguy3
oxguy3 / languify.sh
Last active November 14, 2016 05:07
Tag anime as japanese
#!/bin/bash
# Tag videos as a given language
# Examples:
# Tag a single MP4 video as Japanese:
# ./languify.sh jpn Attack on Titan Episode 1.mp4
# Tag all MP4 files in the directory as English:
# ./languify.sh eng % mp4
function erroranddie {
echo "Invalid command! Syntax: ./languify.sh <lang> <file> OR ./languify.sh <lang> % <ext>"
@oxguy3
oxguy3 / myphotos.md
Last active September 19, 2016 19:08
My Flickr photos

Hayden Schiff's photos

I've taken to photography as a super casual hobby, and I'm posting my photos on Flickr. Most/all of them are Creative Commons licensed, so you're free to use them for whatever (subject to license terms). I'm throwing together an index here for easily finding things.

You can see all of my tags here.

By person

For every person I identify in one of my photos, I tag it "firstname lastname", so even if a name isn't listed below, you can find someone by manually looking up the "firstnamelastname" tag. Or just browse through the list of all my tags.

Who is FCC playing in the first round of the playoffs?

Short answer: Probably Charleston Battery, maybe Rochester Rhinos, possibly (but probably not) Charlotte Independence or Richmond Kickers

Long answer:

Regardless of what happens next weekend (Sep 24), FC Cincinnati is definitely going to be the #3 team coming out of the regular season, which means we play the #6 ranked team in the first round of the playoffs (see: USL Playoffs bracket). Right now, that's Rochester, but ranks 4 through 7 are all really close, so that could change next weekend. #6 Rochester is gonna be playing #12 Toronto, and #5 Charleston is gonna be playing #1 New York. In the likely event that Rochester has a better result than Charleston (i.e. Rochester wins and Charleston doesn't, or Rochester draws and Charleston loses), then Rochester will move up in the standings, and FCC will play Charleston. If Rochester and Charleston have the same result, or Charleston does

@oxguy3
oxguy3 / crackpack without curse.md
Last active August 26, 2016 01:50
How to use the Crackpack without the Curse Launcher

How to use the Crackpack without the Curse Launcher

So if you want to play Crackpack (or any other modpacks in the Curse/FTB launcher) without having to open the annoying Curse app, here's what you do. First, you do need to install Curse and download the modpack you want. Run it once (just open the launcher; you don't actually have to hit play from the Minecraft launcher). Once it's installed, go to the Settings button in the Curse app, click "Minecraft", and then copy the address listed as "Minecraft Install Location".

Next, open Notepad/TextEdit (or your text editor of choice). If you're on Windows, copy-paste the "crackpack.bat" file below into your text editor. If you're on Mac or Linux, copy-paste the "crackpack.sh" file below into your text editor (warning: haven't actually tested this one). On the first line, replace "REPLACEME" with the address you copied from the Curse app. Then save it as "crackpack.bat" or "crackpack.sh". On Mac/Linux you might have to open a terminal and run `chmod 700 crack

@oxguy3
oxguy3 / getminecraft.sh
Created August 22, 2016 22:27
old bash script from high school -- used this to download Minecraft to school computers (I did not make the best use of my free bells...)
#!/bin/bash
cd ~/Desktop
echo ""
echo "DOWNLOADING MC.DMG..."
curl http://wowsuchaddress.zapto.org/htdocs/Minecraft.dmg -o mc.dmg
echo ""
echo "MOUNTING MC.DMG..."
hdiutil attach -nobrowse mc.dmg
echo ""
echo "COPYING MC TO DESKTOP..."
@oxguy3
oxguy3 / guestsucks.sh
Created August 22, 2016 22:24
old bash script from high school -- I used this to quickly disable natural scrolling and download Chrome every time I used school computers
#!/bin/bash
cd ~/Desktop
echo ""
echo "LAUNCHING MOUSE PREFERENCES..."
osascript -e 'tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.mouse"
end tell'
echo ""
echo "DOWNLOADING CHROME.DMG..."
@oxguy3
oxguy3 / prime-player-tweaks.css
Last active July 9, 2016 21:13
CSS to make Prime Player's mini-player look nice for live-streaming. Use the "Normal" layout option with this
* {
font-family: "Segoe UI", sans-serif;
}
#player {
background-color: #0F0F0F !important;
height: 104px !important;
}
#top {
height: 80px !important;
}
@oxguy3
oxguy3 / coebot.tv notes - how to identify mods.md
Last active June 23, 2016 18:20
scratch notes about how I'm going to detect who is/isn't a mod for the website's control panel

So I want to add a control panel to CoeBot. The big problem is that Twitch does not have a good API for finding out if some is/isn't a moderator. There's this TMI endpoint, but that will only list moderators who are currently in chat, which is not ideal.

Someone else with the same problem as me wrote a bit of PHP that actually logs into IRC, runs the "/mods" command, and parses Twitch's response to get the mod list. I think I'm gonna go ahead and use this code. However, the problem is that logging into IRC is very slow, so I have to very carefully limit how often I do that. If I do it too much, it will result in a) slow loading times and therefore b) a very exploitable DDoS vulnerability.

Here's my plan: by default, the website will assume that the logged-in user is not a moderator in any channel. If the user tries to go to the "settings" page, it'll have a message something l