Skip to content

Instantly share code, notes, and snippets.

View oxguy3's full-sized avatar

Hayden Schiff oxguy3

View GitHub Profile
@oxguy3
oxguy3 / my old blog theme.html
Created June 10, 2016 21:26
the old theme for my tumblr blog
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" content="{MetaDescription}" />
<title>{block:SearchPage}{lang:Search results for SearchQuery} - {/block:SearchPage}{block:PostTitle}{PostTitle} - {/block:PostTitle}{Title}</title>
<link rel="shortcut icon" href="{Favicon}" />
<link rel="apple-touch-icon" href="{PortraitURL-128}"/>
<link rel="alternate" type="application/rss+xml" href="{RSS}" />
@oxguy3
oxguy3 / opt-out.md
Last active June 16, 2016 18:25
Remove annoying crap from your life.
@oxguy3
oxguy3 / embiggener.js
Last active March 13, 2024 05:44
Greasemonkey script to find the biggest version of an image on a variety of sites
// ==UserScript==
// @name Embiggener
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Finds the biggest possible version of any image
// @author Hayden Schiff (oxguy3)
// @match *://*/*
// @grant unsafeWindow
// ==/UserScript==
@oxguy3
oxguy3 / zeldathonhack.php
Created June 23, 2016 02:17
a hastily made workaround for zeldathon mods while coebot is refusing to answer their commands
<?php
require_once("common.php");
requireLoggedIn();
if (!in_array($_SESSION['channel'], array("itsoxguy3", "supermcgamer", "endsgamer", "0rganics", "1862011", "22angel35", "360chrism", "8bitbrigadier", "ainkayes", "animejessica", "aubis2", "avvvee", "awildabra", "axlrosie", "bbaass_tmh", "blip", "bluehairirl", "bomb_mask", "bushelofchewygoodness", "carlsagan42", "choco", "clarelms", "coebot", "dansalvato", "dewtroid", "diredwarf", "endsgamer", "erythsea", "fakearcticlght", "fakearcticlight", "femtastic", "frosty10001", "fuzzy_wolf", "gaspra_", "greatscottlp", "hewhoamareismyself", "insaneintherain", "jacksonparodi", "jamesrct", "jb2448", "jellybeee", "johnmackay13", "jyggy11", "kampydk", "legosjedi", "letsnarvik", "lindsaypez", "lizerdoo", "lucarimew", "marishkabob", "metalninjawolf", "mika_w", "mistress_fi", "mojmann", "narcissawright", "nathan_eel", "nytsura", "oc1_", "ortholabs", "pauseunpause", "pkmnnerdfighter", "poodleskirtfanclub", "poptartgamer", "ppeach2010", "princeofcosmos", "purplesteph", "rev
@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

@oxguy3
oxguy3 / deploy.php
Last active August 5, 2023 20:21
Script used to automatically deploy from GitHub to a cPanel shared hosting server
<?php
/**
* deploy.php by Hayden Schiff (oxguy3)
* Available at https://gist.github.com/oxguy3/70ea582d951d4b0f78edec282a2bebf9
*
* No rights reserved. Dedicated to public domain via CC0 1.0 Universal.
* See https://creativecommons.org/publicdomain/zero/1.0/ for terms.
*/
// random string of characters; must match the "Secret" defined in your GitHub webhook
@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 / 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.

@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 / 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..."