Skip to content

Instantly share code, notes, and snippets.

@nightpool
nightpool / app.rb
Created March 13, 2015 21:45
sinatra template
#!/usr/local/ruby/bin/ruby
ENV['HOME'] = "/home/USER"
rb_log = File.open('../cgi.log', 'a')
STDERR.reopen rb_log
STDERR.puts ENV.inspect
require 'rubygems'
require 'rack'
@nightpool
nightpool / tumblr_splashes.js
Last active August 29, 2015 14:19
Tumblr Splashes
//* TITLE tumblr splashes **//
//* VERSION 0.1 **//
//* DESCRIPTION Random splashes! **//
//* DEVELOPER nightpool42 **//
//* DETAILS Replaces the Nike ad with random splashes from minecraft and homestuck **//
//* FRAME false **//
//* BETA false **//
/* (c) 2015 nightpool42
Code licensed under the GPLv3
[Adblock Plus 2.3.1]
! Title: block genius chat
genius.com###chat
|http://*.genius.com/chat
({"refreshMillis":60000,
"allowFuture":false,
"strings": {
"prefixAgo":null,
"prefixFromNow":null,
"suffixAgo":"",
"suffixFromNow":"from now",
"seconds":"now",
"minute":"it's been a minute",
"minutes":"%d minutes ago",
@nightpool
nightpool / ghostlist.js
Created October 24, 2015 15:59
tumblr gostlist
XKit.tools.add_function(this.hook_ghostlist, true, {"nested": this.preferences.type.value === "nested"});
hook_ghostlist: function(){
/* global Tumblr, add_tag */
window.XKitBR = add_tag;
if(!window.XKBR_init){
Tumblr.fastDashboard.options.onAfterAttach =
_.wrap(Tumblr.fastDashboard.options.onAfterAttach, function(f, el, g, j){
if(!window.XKitBR.nested){
jQuery(el).find(".xkitBR_old_reblogs").remove();
//* TITLE Editable Reblogs **//
//* VERSION 3.3.2 **//
//* DESCRIPTION Restores ability to edit previous reblogs of a post **//
//* DEVELOPER new-xkit **//
//* FRAME false **//
//* BETA false **//
XKit.extensions.editable_reblogs = new Object({
running: false,
commit d5c69689a1f1a373b477971ba5f750a5c33754b9
Author: nightpool <[email protected]>
Date: Wed Jun 28 20:04:56 2017 -0400
change bio length to 413, only 8 newlines, auto-size bio textarea
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js
index da1f550f..db39f657 100644
--- a/app/javascript/packs/public.js
+++ b/app/javascript/packs/public.js
@nightpool
nightpool / -
Created October 30, 2017 02:58
This file has been truncated, but you can view the full file.
{"0": {"boxes": {"0": {"occluded": 0, "ybr": 578, "ytl": 417, "xbr": 2770, "outside": 0, "attributes": [], "xtl": 2420}, "1": {"occluded": 0, "ybr": 577, "ytl": 416, "xbr": 2770, "outside": 0, "attributes": [], "xtl": 2420}, "2": {"occluded": 0, "ybr": 577, "ytl": 416, "xbr": 2771, "outside": 0, "attributes": [], "xtl": 2421}, "3": {"occluded": 0, "ybr": 577, "ytl": 416, "xbr": 2771, "outside": 0, "attributes": [], "xtl": 2421}, "4": {"occluded": 0, "ybr": 577, "ytl": 416, "xbr": 2772, "outside": 0, "attributes": [], "xtl": 2422}, "5": {"occluded": 0, "ybr": 577, "ytl": 416, "xbr": 2772, "outside": 0, "attributes": [], "xtl": 2422}, "6": {"occluded": 0, "ybr": 577, "ytl": 416, "xbr": 2773, "outside": 0, "attributes": [], "xtl": 2423}, "7": {"occluded": 0, "ybr": 577, "ytl": 417, "xbr": 2768, "outside": 0, "attributes": [], "xtl": 2416}, "8": {"occluded": 0, "ybr": 578, "ytl": 418, "xbr": 2764, "outside": 0, "attributes": [], "xtl": 2409}, "9": {"occluded": 0, "ybr": 579, "ytl": 419, "xbr": 2760, "outside": 0,
@nightpool
nightpool / -
Created October 30, 2017 03:04
This file has been truncated, but you can view the full file.
{"0": {"boxes": {"0": {"occluded": 0, "ybr": 578, "ytl": 417, "xbr": 2770, "outside": 0, "attributes": [], "xtl": 2420}, "1": {"occluded": 0, "ybr": 577, "ytl": 416, "xbr": 2770, "outside": 0, "attributes": [], "xtl": 2420}, "2": {"occluded": 0, "ybr": 577, "ytl": 416, "xbr": 2771, "outside": 0, "attributes": [], "xtl": 2421}, "3": {"occluded": 0, "ybr": 577, "ytl": 416, "xbr": 2771, "outside": 0, "attributes": [], "xtl": 2421}, "4": {"occluded": 0, "ybr": 577, "ytl": 416, "xbr": 2772, "outside": 0, "attributes": [], "xtl": 2422}, "5": {"occluded": 0, "ybr": 577, "ytl": 416, "xbr": 2772, "outside": 0, "attributes": [], "xtl": 2422}, "6": {"occluded": 0, "ybr": 577, "ytl": 416, "xbr": 2773, "outside": 0, "attributes": [], "xtl": 2423}, "7": {"occluded": 0, "ybr": 577, "ytl": 417, "xbr": 2768, "outside": 0, "attributes": [], "xtl": 2416}, "8": {"occluded": 0, "ybr": 578, "ytl": 418, "xbr": 2764, "outside": 0, "attributes": [], "xtl": 2409}, "9": {"occluded": 0, "ybr": 579, "ytl": 419, "xbr": 2760, "outside": 0,
use std::collections::HashSet;
use std::fmt;
use std::fs::File;
use std::io::BufReader;
use std::io::prelude::*;
#[derive(Clone, Debug)]
enum Edit {
None,
Add,