Skip to content

Instantly share code, notes, and snippets.

View Unihedro's full-sized avatar
Advent of Code leaderboard contender ⭐

Unihedron Unihedro

Advent of Code leaderboard contender ⭐
View GitHub Profile
@Glorfindel83
Glorfindel83 / broken-image-repairer.md
Last active August 19, 2023 14:08
Broken Image Repairer

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 http://example.com/image.png

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).

@Namelessname9
Namelessname9 / Reincarnation.java
Created July 22, 2017 11:47
Returns cost, FC cost and gems needed, all to buy all the RPs unlocked in a R at once
package RG;
import java.util.Arrays;
public class Reincarnation
{
private int currentRP, maxRP;
private double totalCost, factionCost, gemsRequired;
private int rNumber;
@m-ender
m-ender / simple-challenges.md
Last active February 24, 2022 23:07
Simple challenges on CodeGolf.SE to take new programming languages for a spin.
@ornicar
ornicar / lichess.proxy.conf
Last active July 16, 2021 07:08
Set up a lichess proxy to bypass firewalls and play chess at school/work
# /etc/nginx/sites-enabled/lichess.proxy.conf
# Replace "lichess.scalex.org" by your own domain.
# Note: This only works for the "en" subdomain.
server {
listen 80;
server_name socket.en.lichess.scalex.org;
location / {
proxy_set_header Host socket.en.lichess.org;
proxy_http_version 1.1;
@CS1000
CS1000 / broscript.js
Created September 24, 2014 23:20
Bro Script (so chat)
Paste in SO chat room console bro:
(function() {
"use strict";
var chat = document.getElementById('chat');
function parseNode(node) {
if (node.classList
&& node.classList.contains('message')
&& !node.classList.contains('pending')
&& !node.querySelector('.onebox')
@TheItachiUchiha
TheItachiUchiha / DateAxis.java
Created September 18, 2014 12:38
ToolTipOnLineChart
public final class DateAxis extends Axis<Date> {
/**
* These property are used for animation.
*/
private final LongProperty currentLowerBound = new SimpleLongProperty(this, "currentLowerBound");
private final LongProperty currentUpperBound = new SimpleLongProperty(this, "currentUpperBound");
private final ObjectProperty<StringConverter<Date>> tickLabelFormatter = new ObjectPropertyBase<StringConverter<Date>>() {
var EventType = {
MessagePosted: 1,
MessageEdited: 2,
UserEntered: 3,
UserLeft: 4,
RoomNameChanged: 5,
MessageStarred: 6,
DebugMessage: 7,
UserMentioned: 8,
MessageFlagged: 9,