Skip to content

Instantly share code, notes, and snippets.

View oxguy3's full-sized avatar

Hayden Schiff oxguy3

View GitHub Profile
@oxguy3
oxguy3 / bandcamp-to-plex
Last active September 14, 2015 17:53
Converting Bandcamp file names to Plex file names with mmv
mmv "* - * - [0-9][0-9] *.mp3" "#3#4 - #5.mp3"
mmv "* - cover.*" "cover.#2"
=== EASILY INSTALL CHROME ON FEDORA 22 ===
For some reason, Google Chrome is kind of a pain in the butt to install on
Fedora, and then another pain in the butt to make it not have two icons in your
dock. Let's fix that. Just open a Terminal (no, you don't need to be root) and
paste these lines in to get pain-free Google Chrome. After you run this, press
Alt+F2 and type "r" to make GNOME update.
cat << EOF | sudo tee /etc/yum.repos.d/google-chrome.repo
@oxguy3
oxguy3 / stackoverflow_tag_icons.js
Last active March 17, 2022 18:46
Tampermonkey script for Stack Overflow to replace the names of your favorite tags with compact icons
// ==UserScript==
// @name Stack Overflow tag icons
// @namespace http://schiff.io
// @version 0.1
// @description Replace tag names with pretty icons
// @author Hayden Schiff (oxguy3)
// @match http://stackoverflow.com/*
// @grant none
// ==/UserScript==
@oxguy3
oxguy3 / imagemagick-cheatsheet.md
Last active August 29, 2015 14:25
A list of useful commands with ImageMagick

ImageMagick commands reference

Most basic usage (convert file type)

convert SRC DEST
convert -format FORMAT SRC DEST # explicitly define type instead of relying on extensions

Basic functions

Resize image

@oxguy3
oxguy3 / gist:db5b1c799d472f244f23
Last active August 29, 2015 14:24
import jQuery via console (for fiddling with other people's websites)
var f = document.createElement('script');
f.setAttribute("src", "https://code.jquery.com/jquery-1.11.3.min.js")
document.getElementsByTagName("head")[0].appendChild(f);
@oxguy3
oxguy3 / cook_scraper.py
Created June 26, 2015 02:07
scrape property tax PINs from Cook County IL's website
from lxml import html
import requests
import sqlite3
import sys
con = sqlite3.connect("cook_county.db")
con.execute("CREATE TABLE IF NOT EXISTS properties(pin TEXT(18) UNIQUE, number TEXT(63), street TEXT(255), unit TEXT(255), city TEXT(255), zip TEXT(5))")
con.execute("DELETE FROM properties")
@oxguy3
oxguy3 / CoebotDateParsing.java
Last active August 29, 2015 14:19
CoeBot date parsing
import java.util.Scanner;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.Period;
import org.joda.time.PeriodType;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.PeriodFormatter;
import org.joda.time.format.PeriodFormatterBuilder;
@oxguy3
oxguy3 / gist:30b4ad5ca5a00291cfb2
Created March 24, 2015 02:01
Custom artist icons for Google Play Music
// ==UserScript==
// @name Custom artist icons for Google Play Music
// @namespace https://play.google.com/music/
// @version 0.1
// @description Allows for custom icons for your artists in Google Play Music
// @author Hayden Schiff (oxguy3)
// @match https://play.google.com/music/*
// @grant unsafeWindow
// @require https://code.jquery.com/jquery-1.11.2.min.js
// ==/UserScript==
@oxguy3
oxguy3 / gist:5608b69a30132ae16291
Created March 11, 2015 16:43
better command restrict logic for coebot
} else if (msg[1].equalsIgnoreCase("restrict")
&& msg.length >= 4) {
String command = msg[2].toLowerCase();
String levelStr = msg[3].toLowerCase();
int level = -1;
String cleanLevelStr = "";
if (channelInfo.getCommand(command) != null) {
if (levelStr.equalsIgnoreCase("owner")
|| levelStr.equalsIgnoreCase("owners")) {
level = 3;
@oxguy3
oxguy3 / gist:400bf90c1e3984e69d82
Created February 23, 2015 17:42
Phedran Patreon server waypoints
filetimestamp:201502231052
name:Unstable1,x:568,z:800,y:63,enabled:false,red:0.46034193,green:0.54231054,blue:0.29657978,suffix:,world:,dimensions:0#
name:SPAWN,x:244,z:254,y:70,enabled:true,red:0.23921569,green:0.007843138,blue:0.003921569,suffix:,world:,dimensions:0#
name:oxguy3,x:265,z:430,y:13,enabled:false,red:0.003921569,green:0.5058824,blue:0.023529412,suffix:,world:,dimensions:0#
name:Phedran,x:644,z:317,y:69,enabled:false,red:0.5215317,green:0.12488675,blue:0.7475541,suffix:,world:,dimensions:0#
name:Malkavian_Mime,x:285,z:337,y:70,enabled:false,red:0.6037983,green:0.9702504,blue:0.4332052,suffix:,world:,dimensions:0#
name:PORTAL,x:216,z:264,y:47,enabled:true,red:0.6039216,green:0.03529412,blue:0.003921569,suffix:,world:,dimensions:-1#
name:blazes,x:1016,z:-912,y:60,enabled:true,red:0.84313726,green:0.85490197,blue:0.0,suffix:,world:,dimensions:-1#
name:Fortress 2,x:1176,z:-72,y:48,enabled:true,red:0.35793942,green:0.70589083,blue:0.35481787,suffix:,world:,dimensions:-1#
name:Fortress 1,x:-144,z:-544