Skip to content

Instantly share code, notes, and snippets.

View that4chanwolf's full-sized avatar

Wise Horo that4chanwolf

View GitHub Profile
@that4chanwolf
that4chanwolf / String.prototype.autism.js
Created December 14, 2012 20:06
String.autism() method Matches ticks `'`, quotes `"`, and parenthesis `(`.
String.prototype.autism = function () {
var parens = 0,
ticks = 0,
quotes = 0,
line = this.valueOf();
for (var i = 0; i < line.length; i++) {
if (line[i] === '(') { // Parens
parens++;
} else if (line[i] === ')') {
parens--;
@that4chanwolf
that4chanwolf / gist:4435901
Created January 2, 2013 16:36
Kumagawa.pl
use Irssi;
use strict;
sub halp {
print("I'm a fucking loser.");
};
sub loser {
my ($text, $server) = @_;
if($text eq '') {
@that4chanwolf
that4chanwolf / mpd-np.sh
Created January 19, 2013 23:55
MPD now playing with dzen2
#!/bin/zsh
DZEN_LOCATION=$(which dzen2)
MPC_LOCATION=$(which mpc)
if [[ -z ${DZEN_LOCATION} ]]; then
echo "dzen2 not found" && exit 1
else
DZEN_COMMAND=(dzen2 -ta c -p 5 -y 25 -x 1050 -tw 285 -bg \#2a2f30 -fg \#ffffff -fn Terminus)
fi
@that4chanwolf
that4chanwolf / gist:8911081
Created February 10, 2014 06:06
inb4, an aegisub script that adds content before a line. This has probably been done 200 billion times but whatever.
-- Do whatever you want.
script_name = "inb4"
script_description = "Adds content before selected lines. Useful for OPs where you want \\fads or \\blurs, like every Commie OP ever."
script_author = "t4w"
script_version = "0.0.1a"
function inb4(subs, sel)
local t = ipairs(sel)
for __, i in ipairs(sel) do
@that4chanwolf
that4chanwolf / gist:8921631
Created February 10, 2014 18:40
Cloud2butt
// ==UserScript==
// @name Cloud2Butt
// @include *
// ==/UserScript==
(function() {
var textnodes = document.evaluate("//body//text()[not(ancestor::script) and not(ancestor::style)]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null),
node, text;
for(var i = 0; i < textnodes.snapshotLength; i++) {
node = textnodes.snapshotItem(i);
// ==UserScript==
// @name Framerate Police Police
// @namespace fpspolice
// @include http://store.steampowered.com/app/*
// @include https://store.steampowered.com/app/*
// @author Faggot
// ==/UserScript==
(function() {
document.querySelectorAll('a[href*="/curator/9393382-The-Framerate-Police"]')[0].parentElement.parentElement.style['display'] = 'none';