This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Remove Signup Bar | |
// @namespace http://tampermonkey.net/ | |
// @version 1.0 | |
// @description Remove the "sign up for twitter!" bar that blocks 20% of the content on every Twitter page | |
// @author Kevin | |
// @match https://twitter.com/* | |
// @icon https://www.google.com/s2/favicons?domain=twitter.com | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#copied from https://chat.stackoverflow.com/transcript/message/52153354#52153354 | |
class folly(zip(), zip(__name__), zip(), zip(__file__), zip()): | |
hel = help | |
locals()[r""u'''d | |
'''fr''] = __qualname__ | |
exc = exit | |
def Tel(f, a, k): | |
return getattr(a[0], f)(*a[1:], **dict(tuple(k.items())[2:])) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){function urlsafe_encode(s){return btoa(s).replace(/\+/g, "-").replace(/\//g, "_")};function encode_utf8(s) {return unescape(encodeURIComponent(s));};function add_spoiler(){try{var input = document.getElementById("input");var left = input.value.slice(0, input.selectionStart);var middle = input.value.slice(input.selectionStart, input.selectionEnd);var right = input.value.slice(input.selectionEnd);if (middle.length == 0){var response = window.prompt("Enter spoiler text.", "");if (response == null || response.length == 0){return;}else{middle = response;};};middle = encode_utf8(middle);middle = encodeURIComponent(urlsafe_encode(middle));middle = "[view spoiler](http://sopython.com/spoiler/" + middle + ")";input.value = left + middle + right;input.setSelectionRange(left.length + middle.length, left.length + middle.length);input.focus();}catch(e){console.log(e);};};function create_button(name, id, func){var buttonArea = document.getElementById("chat-buttons");var button = document.createElemen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Simplest Possible Way To Make A Python File Into A Package That's Importable From Anywhere | |
~~~ A Guide For (And By) the Incurably Befuddled ~~~ | |
============================================================================================== | |
SCENARIO: while writing a one-shot project, you construct a module named LovelyCoconut.py. | |
#main.py | |
import LovelyCoconut | |
LovelyCoconut.bang_halves_together() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import base64 | |
import os | |
import pickle | |
import time | |
import re | |
import json | |
from bs4 import BeautifulSoup as BS | |
MIN_TIME_BETWEEN_REQUESTS = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name UnicodeEmojiAdder | |
// @version 6 | |
// @include http://chat.stackoverflow.com/rooms/* | |
// @include https://chat.stackoverflow.com/rooms/* | |
// @grant none | |
// ==/UserScript== | |
var style_template = ` | |
.boxPositioner{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Emoticon Adder | |
// @version 1 | |
// @include http://chat.stackoverflow.com/rooms/* | |
// @include https://chat.stackoverflow.com/rooms/* | |
// @grant none | |
// ==/UserScript== | |
//note: emoticons with slash characters, for example ¯\_(ツ)_/¯, must be quadruple-escaped. Once for javascript, and again for markdown. | |
var choices = ["---", "(◕‿◕)", "(╯°□°)╯︵ ┻━┻", "( ͡° ͜ʖ ͡°)", "ಠ_ಠ", " ¯\\\\_(ツ)_/¯", "👍", "🐍"]; |
NewerOlder