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 Make Twitter Suck Less | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Make twitter suck slightly less by tweaking the layout | |
// @author @thebecwar | |
// @match http*://twitter.com/* | |
// @grant GM_addStyle | |
// ==/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
var gagStarted = new Date('2019-02-21T15:00:00+05:00'); | |
function setupTimer() { | |
var timerSpan = document.createElement('span'); | |
timerSpan.setAttribute('id', 'gag-time-content'); | |
timerSpan.innerText = 'It has been 0 days, 0 hours, 0 minutes and 0 seconds since Roger Stone last violated his gag order'; | |
var parent = document.getElementById('gag-timer'); | |
if (parent) { | |
parent.appendChild(timerSpan); | |
} | |
} |
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 KBP | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Parse KilledByPolice page into JSON data | |
// @author You | |
// @match http://killedbypolice.net/* | |
// @match http://www.killedbypolice.net/* | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js | |
// @grant none |
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 decimal | |
# for reference, the first 100 digits of pi | |
pi = decimal.Decimal('3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679') | |
# Basic recursive factorial calculation. For large n switch to iterative. | |
def fact(n): | |
if n == 0: | |
return 1 |
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
# This is Python 3, but the code should be pretty trivial to convert to Python 2 | |
import time | |
start = time.time() | |
# Original method for calculating | |
a = 0 | |
b = 0 | |
x = [] | |
h = 0 |
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 UnclickHome | |
// @namespace NoNamespacePlease | |
// @include /^https?://(.*).stackoverflow\.com/.*/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
$(document).ready(function() { | |
var selTab = $(".selected.intellitab").attr("data-id"); |
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
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Linq; | |
using System.Windows.Forms; | |
namespace ScratchApp | |
{ | |
public partial class Form1 : Form | |
{ |
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
.method private hidebysig static void Main(string[] args) cil managed | |
{ | |
.entrypoint | |
// Code size 38 (0x26) | |
.maxstack 2 | |
.locals init ([0] int64 num1, | |
[1] int32 num2, | |
[2] bool a, | |
[3] bool b, | |
[4] bool c) |
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
#define BADMACRO(t, s, f) \ | |
{\ | |
##t str[] = s; \ | |
f << str << endl; \ | |
} | |
#define BADMACRO2(t, s, f) \ | |
{ \ | |
BADMACRO(##t, ##s, ##f) \ | |
} |
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
interface ITrigger | |
{ | |
void ProcessMessage(Message msg, ref Room rm); | |
bool HandleChatEvent(EventType type, object EventData); | |
} | |
//OR | |
interface Hatman.Events.IChatEventHandler |