Skip to content

Instantly share code, notes, and snippets.

@kms70847
kms70847 / soChatSpoilerAdd.user.js
Last active August 29, 2015 14:08
User script which adds a "spoiler" button to the Stack Overflow chat room interface.
// ==UserScript==
// @name spoiler button adder (SO Chat)
// @namespace about:blank
// @include http://chat.stackoverflow.com/rooms/*
// @version 1
// @grant none
// ==/UserScript==
//adds a spoiler to the input textarea.
//inserts it wherever your cursor is.
@kms70847
kms70847 / network_bar_filter.user.js
Last active April 30, 2018 17:55
Filters links out of Stack Overflow's "Hot Network Questions" sidebar
// ==UserScript==
// @name Network Bar Filter
// @namespace about:blank
// @include http://stackoverflow.com/*
// @include https://stackoverflow.com/*
// @include *.stackexchange.com/*
// @version 3
// @grant none
// ==/UserScript==
@kms70847
kms70847 / share_markdown.user.js
Last active April 21, 2021 16:00
For each Stack Overflow question, adds an additional box to the "share" button, containing a link with markdown
// ==UserScript==
// @name Share Markdown (Stack Overflow)
// @namespace about:blank
// @include /^https?:\/\/\w*.?(stackexchange.com|stackoverflow.com|serverfault.com|superuser.com|askubuntu.com|stackapps.com|mathoverflow.net)\/questions/.*/
// @version 8
// @grant none
// ==/UserScript==
function make_input(text){
var input = document.createElement("input");
@kms70847
kms70847 / avatar_blocker.user.js
Created February 2, 2015 17:49
removes the avatars of ten-or-less rep users
// ==UserScript==
// @name avatar blocker
// @namespace about:blank
// @description removes the avatars of ten-or-less rep users
// @include http://chat.stackoverflow.com/rooms/*
// @version 1
// @grant none
// ==/UserScript==
//gets the reputation of the user that owns this user-container
@kms70847
kms70847 / char_count_adder.user.js
Last active November 19, 2019 16:37
In SO chat, adds a label indicating the character count of your message
// ==UserScript==
// @name char count adder (SO Chat)
// @namespace .
// @description Adds a label indicating the character count of your message
// @include http://chat.stackoverflow.com/rooms/*
// @include https://chat.stackoverflow.com/rooms/*
// @version 3
// @grant none
// ==/UserScript==
@kms70847
kms70847 / animation.py
Last active August 29, 2015 14:24
KD Tree visualization
#animation.py
#prerequisites: ImageMagick (http://www.imagemagick.org/script/index.php)
import itertools
import os
import os.path
import subprocess
import shutil
import math
def generate_unused_folder_name():
// ==UserScript==
// @name Common Comments Box (Stack Overflow)
// @namespace about:blank
// @include http*://stackoverflow.com/questions/*
// @version 1
// @grant none
// ==/UserScript==
var question_comments = [
"Are you getting an error? If so, what is the error and stack trace? Is your code running, but producing unexpected output? If so, what output are you getting, and what output did you expect to get?",
@kms70847
kms70847 / float_visualizer.py
Last active May 16, 2019 12:32
Interacitve visualization of the binary form of any floating point number
from tkinter import Tk, Entry, Frame, Label, StringVar
import struct
import traceback
def float_to_int(x):
s = struct.pack("d", x)
x = 0
for value in s[::-1]:
x = (x << 8) | value
return x
@kms70847
kms70847 / fractal_visualizer.py
Last active June 19, 2018 18:13
Fractal Visualizer Tool
try:
from tkinter import *
except ImportError:
from Tkinter import *
try:
from queue import Queue
except ImportError:
from Queue import Queue
@kms70847
kms70847 / usernotes.user.js
Last active November 19, 2019 16:37
Adds persistent user notes to Stack Overflow chat
// ==UserScript==
// @name User Notes (SO Chat)
// @namespace .
// @include http://chat.stackoverflow.com/rooms/*
// @include https://chat.stackoverflow.com/rooms/*
// @version 2
// @grant GM_getValue
// @grant GM_setValue
// ==/UserScript==