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 FutureReview | |
// @author benjol | |
// @version 1.0.1 | |
// @description Hack Unanswered tab to point to review | |
// @include http://stackoverflow.com/* | |
// @include http://meta.stackoverflow.com/* | |
// @include http://*.stackexchange.com/* | |
// @include http://meta.*.stackexchange.com/* | |
// @exclude http://*.gaming.stackexchange.com/* |
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 AutoReviewComments | |
// @namespace benjol | |
// @version 1.3.1 | |
// @description Add pro-forma comments dialog for reviewing (pre-flag) | |
// @grant none | |
// @include http*://*stackoverflow.com/questions* | |
// @include http*://*stackoverflow.com/review* | |
// @include http*://*stackoverflow.com/admin/dashboard* | |
// @include http*://*stackoverflow.com/tools* |
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
//http://stackoverflow.com/questions/4075289/race-car-puzzle | |
// shuffle an array (in-place) | |
let rand = new System.Random() | |
let shuffle a = | |
let swap (a: _[]) x y = | |
let tmp = a.[x] | |
a.[x] <- a.[y] | |
a.[y] <- tmp | |
Array.iteri (fun i _ -> swap a i (rand.Next(i, Array.length a))) a |
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 SelfUpdatingScript | |
// @version 1.0.0 | |
// @namespace Benjol (http://stackoverflow.com/users/11410/benjol) | |
// @description Template script for a self-updating script | |
// @credits Kudos to http://stackoverflow.com/users/115866/balpha | |
// @include https://gist.github.com/* | |
// ==/UserScript== | |
function with_jquery(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
// ==UserScript== | |
// @name NonBreakSpaces+ | |
// @namespace benjol | |
// @description Make Ctrl-space add a non-break-space in textareas | |
// @include http://french.stackexchange.com/questions/* | |
// @include http://meta.french.stackexchange.com/questions/* | |
// @include http://chat.stackexchange.com/rooms/1098/* | |
// ==/UserScript== | |
function inject(f) { | |
var script = document.createElement("script"); |
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
' These macros can be used to automatically swap between project and file references when adding/removing projects from a solution. | |
' When adding a new project to a solution, all the existing projects (and the new project) are scanned to see if there | |
' are existing file references to the project. If so, the file reference will be updated to a project reference. | |
' Conversely, when removing a project, if the macro can file a dll on the references path which has the same name as the removed | |
' project, it will change the project reference to a file reference. | |
' There are a few idiosyncrasies to be aware of: in my environment, all projects build to a common folder, so the macro will set references | |
' to 'No Copy', 'Any version', EXCEPT for 'Test' projects | |
' (Note that not all project types are supported) | |
' This code won't update a project when it is removed (impossible to save a project when it's already 'gone') |
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 RenameUser | |
// @namespace benjol | |
// @description Rename users (especially ones with 'default' names) | |
// @include http://stackoverflow.com/* | |
// @include http://meta.stackoverflow.com/* | |
// @version 1.0.0 | |
// ==/UserScript== | |
function with_jquery(f) { |