Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block Glorfindel83

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile


Please don't make more work for other people by vandalizing your posts. By posting on the Stack Exchange (SE) network, you've granted a non-revocable right, under the CC BY-SA 3.0 license for SE to distribute that content. By SE policy, any vandalism will be reverted. If you want to know more about deleting a post, consider taking a look at: How does deleting work?

Edit summary

don't vandalize your post please - restored to previous version

package com.stackexchange.rpg;
import java.util.Random;
public class Statistics {
public static void main(String[] args) {
long total = 0, samples = 0;
while (true) {
total += sample();
View Broken UserVoice link repairer output
View Cross-site investigator (Survey 2019).csv
Site Banner? Census badge? false false false false false false false false false false false false false false false false false false
View Cross-site investigator (Survey 2019).user.js
// ==UserScript==
// @name Cross-site investigator
// @namespace
// @match
// @require
// @connect *
// @connect *
// @connect *
// @connect *
// @connect *
View help.csv 0 Asking 0 dont-ask 0 Asking 1 closed-questions 0 Asking 2 on-topic 0 Asking 3 what-to-do-instead-of-deleting-question 0 Asking 4 deleted-questions 1 Our model 0 conduct 1 Our model 1 behavior 1 Our model 2 interesting-topics 1 Our model 3 promotion 1 Our model 4 roomba

Broken Image Repairer

What is the problem?

A long time ago, it was possible to inline images from all kinds of external sources. Since the switch from HTTP to HTTPS, this is no longer possible; only HTTPS sources are allowed. This leads to ugly blurbs like

alt text

instead of a nicely formatted page with images. Sometimes, the links don't even work anymore, even with HTTPS images, which will show like this: ... Luckily, we have the Wayback Machine which is able to rescue some of the lost images. Since a picture often says more than a thousand words, it's important to bring back the post into its original state; important enough to justify the occasional bump of an old post (see below).

Glorfindel83 / inbox.js
Created Dec 4, 2018
Search global inbox for notification types
View inbox.js
let lastPageURL = $("#inbox-pager a:nth-last-child(2)").attr("href");
let lastPage = parseInt(lastPageURL.substring(lastPageURL.indexOf("&page=") + 6));
let baseURL = lastPageURL.substring(0, lastPageURL.indexOf("&page=") + 6);
var itemTypes = {};
function fetchPage(page) {
if (page > lastPage) {
console.log(baseURL + page);
View packing-106.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View off-topic.js
function check(i) {
if (i < 317093) return;
var questionID = i.toString();
$.get("" + questionID, function(data) {
var question = $(data).find("#question");
if (question.attr("data-questionid") == questionID) {
console.log(questionID + "," + question.hasClass("deleted-answer") + ","
+ question.find("div.user-action-time:contains(asked)").find("span.relativetime").attr("title"));
setTimeout(function() { check(i - 1); }, 1000);
You can’t perform that action at this time.