Skip to content

Instantly share code, notes, and snippets.

View kittsville's full-sized avatar
🦆
Scala? Never heard of er

Kit kittsville

🦆
Scala? Never heard of er
View GitHub Profile
@kittsville
kittsville / DM of the Rings Scraper.py
Last active September 30, 2015 16:43
A small Python script to download all of the pages from DM of the Rings by Shamus Young
# DM of the Rings Scraper
# A web comic scraper that downloads all pages of Shamus Young's DM of the Rings for your offline reading pleasure
# By Kit Maywood
# @kittsville
# License: WTFPL
# Python v: 2.6
import os
import sys
import urllib
@kittsville
kittsville / Steam Workshop Unsubscribe
Created September 30, 2015 16:42
A JavaScript one-liner to un-subscribe you from a page's worth of Steam workshop subscriptions
jQuery("a[id^='UnsubscribeItemBtn']").each(function(i,e){e.click();});console.log('Done!');
@kittsville
kittsville / NppGCC Makefile
Created November 24, 2015 16:16
Compiles a C project using the makefile in the same directory as the current Npp file
NPP_SAVE
cd "$(FULL_CURRENT_PATH)"
mingw32-make
@kittsville
kittsville / Useful LaTeX Stuff.tex
Last active February 20, 2017 11:39
Config/function names/general stuff I use in LaTeX. Easier than remembering the last project I used $thing in
%
% Many of things involve solutions from TeX, the LaTeX Stack Exchange
% You guys are amazing
%
% Stops ugly hyperlink box
\documentclass[11pt,hidelinks]{article}
% Custom margins using Geometry package
@kittsville
kittsville / Haskell Assessment.hs
Last active April 30, 2016 14:00
CS3518 Haskell Assessment 2016
-- ## HELPERS ##
-- General purpose functions used in multiple answers to avoid duplicate code
-- 1. count
-- Counts occurrences of given input in given list of inputs.
--
-- Preconditions:
-- List must be finite
count :: (Eq a) => [a] -> a -> Int
@kittsville
kittsville / Git Aliases
Last active July 25, 2017 13:37
Helpful Git Aliases
/**
* git wipe
* Removes all uncommitted changes and untracked files/folders
*/
git config --global alias.wipe '!git reset --hard && git clean -fd'
/**
* git undo
* Removes the last commit but leaves all its changes.
* Really useful if you fuck-up the commit message
@kittsville
kittsville / Bulk Flair Upload.js
Last active May 4, 2016 10:16
Allows bulk adding of subreddit user flair templates from a text file
/**
* Bulk Flair Upload
* Version 0.1
* Author: @kittsville
* Allows bulk adding of user flair templates from a text file
* Only supports flair name, not CSS class
*/
if (!window.FileReader || ![].forEach) {
throw "Your browser sucks so this won't work";
}
@kittsville
kittsville / httpd-app.conf
Last active September 7, 2016 22:32
Apache config for local development builds
<VirtualHost *:80>
ServerName sitename.localhost
ServerAlias www.sitename.localhost
DocumentRoot C:/xampp/apps/sitename/htdocs
<Directory "C:/xampp/apps/sitename/htdocs">
Options -MultiViews +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
@kittsville
kittsville / RandomSerializable.php
Last active June 16, 2016 15:17
Generates a random serializable value such as a string, boolean or array
<?php
/**
* Random Serializable
* @author Kit Maywood
* @licence WTFPL
* @version 1.0
*
* Generates a random serializable value such as a string, boolean or array.
* Arrays themselves contain random serializable values
* I realised how stupid this was but decided to finish it anyway
'body':
'ctrl-tab ^ctrl': 'unset!'
'ctrl-tab': 'pane:show-next-item'
'ctrl-shift-tab ^ctrl': 'unset!'
'ctrl-shift-tab': 'pane:show-previous-item'
'ctrl-alt-s': 'window:save-all'