Skip to content

Instantly share code, notes, and snippets.

View WillSullivan's full-sized avatar
😕
Being stupid in clever ways

Will Sullivan WillSullivan

😕
Being stupid in clever ways
View GitHub Profile
@WillSullivan
WillSullivan / TaggedQuestionList.userscript
Last active May 6, 2016 19:29
This userscript will add a list (initially hidden in an expandable div) containing links to every question listed on a tag page (i.e., questions/tagged/something). When a link in this list is clicked, it goes away. This allows you to easily open up many questions with this tag at the same time. Simply ctrl-click on the first link, then keep clic…
// ==UserScript==
// @name Tag list
// @namespace http://statestreetgang.net/
// @version 1.1
// @description Adds an expandable list containing a link to every question on the current tag page. Useful when you want to open many questions with the same tag at the same time.
// @match http://stackoverflow.com/*tag*/*
// @match http://meta.stackoverflow.com/*tag*/*
// ==/UserScript==
function exec(fn) {
var script = document.createElement('script');
@WillSullivan
WillSullivan / IllegalTagEradicator.userscript
Created July 8, 2013 14:37
This is a great tool for people who hate tags. Bad tags preferably. Automatically edits out tags you specify from questions. For example, a tag that stinks and should be burninated would be "guide". Its meta-y, is usually used by people looking for tutorial links, or by people who don't quite get tags (e.g., user asks the question "how do I add …
// ==UserScript==
// @name Shitty tag eradicator
// @namespace http://statestreetgang.net/
// @version 1.0
// @description Quick way to remove the Books tag and delete the question.
// @match http://stackoverflow.com/questions/*
// ==/UserScript==
function exec(fn) {
var script = document.createElement('script');
@WillSullivan
WillSullivan / hideignoredquestionscheckbox.userscript
Created July 9, 2013 21:20
Userscript that adds a checkbox to the questions page that removes ignored questions from your list.
// ==UserScript==
// @name Remove ignored
// @namespace http://statestreetgang.net/
// @version 0.1
// @description enter something useful
// @match http://stackoverflow.com/questions
// @copyright 2012+, You
// ==/UserScript==
function exec(fn) {
var script = document.createElement('script');
@WillSullivan
WillSullivan / AlwaysBeClosing
Last active May 22, 2017 13:50
Always Be Closing
// ==UserScript==
// @name Always Be Closing
// @namespace http://statestreetgang.net/
// @version 1.2
// @description Adds easy-to-use buttons for closing crap questions.
// @match http*://stackoverflow.com/questions/*
// @copyright 2012+, You
// ==/UserScript==
var container = document.createElement('div'), resultSpan = document.createElement('span'), post, tries = 0;
1. create a new wpf project called ContentControlDataTemplate
2. open MainWindow.xaml
3. Remove all text, paste the following
<Window x:Class="ContentControlDataTemplate.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ContentControlDataTemplate"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HowDoILoops
{
class Program
{
@WillSullivan
WillSullivan / gist:6f550f45db2b3f0c7674804c7390052b
Created January 22, 2019 16:54
Can i catch an Op Cancelled Expression
class Program
{
static async Task Main(string[] args)
{
var cts = new CancellationTokenSource();
var task = DoSomeWork(cts.Token);
await Task.Delay(2000);
cts.Cancel();
await Task.Delay(2000);
WriteLine("Yep, we done");