Skip to content

Instantly share code, notes, and snippets.

View blizzy78's full-sized avatar

Maik Schreiber blizzy78

View GitHub Profile
public class MontyHall {
public static void main(String... args) {
boolean[] doors = new boolean[3];
int wins = 0;
int losses = 0;
int tries = 10000000;
for (int i = 1; i <= tries; i++) {
// fill doors
// ==UserScript==
// @name Remove Golem.de Inline Ads
// @namespace http://blizzy.de/
// @version 0.1
// @description Removes inline ads from golem.de
// @match http://*.golem.de/*
// @copyright 2016, Maik Schreiber
// @require //code.jquery.com/jquery-3.1.0.min.js
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Remove Golem.de Subscription Ads
// @namespace http://blizzy.de/
// @version 0.1
// @description Removes subscription ads from golem.de
// @match http://*.golem.de/*
// @copyright 2016, Maik Schreiber
// @require //code.jquery.com/jquery-3.1.0.min.js
// @grant none
// ==/UserScript==
@blizzy78
blizzy78 / SelfRef.java
Created January 5, 2016 17:25
Maths Puzzle: The self descriptive number
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Supplier;
import java.util.stream.Stream;
/*
Maths Puzzle: The self descriptive number
https://www.youtube.com/watch?v=K6Qc4oK_HqY
@blizzy78
blizzy78 / FixMeshRotationEditor.cs
Created March 22, 2015 05:40
FixMeshRotationEditor.cs - Unity: Fix mesh's rotation after importing from Blender
using UnityEngine;
using UnityEditor;
/*
Fixes a mesh's rotation after importing it from Blender. In Blender, the Z axis points in the
"up" direction, while in Unity, Z points in the "forward" direction. This script rotates the
mesh's vertices so that it is upright again.
To use this, create an object from a mesh in the hierarchy view, then locate the Mesh Filter
in the inspector. There, click on the new "Fix Rotation" button.
@blizzy78
blizzy78 / remove-golem-pre-video-ads.js
Last active August 16, 2016 12:05
Remove pre-video ads from golem.de
// ==UserScript==
// @name Remove Golem.de Pre-Video Ads
// @namespace http://blizzy.de/
// @version 1.0
// @description Removes pre-video ads from videos on golem.de
// @match http://*.golem.de/*
// @copyright 2014-2016, Maik Schreiber
// @require //code.jquery.com/jquery-3.1.0.min.js
// @grant none
// ==/UserScript==