Skip to content

Instantly share code, notes, and snippets.

View Mikescher's full-sized avatar

Mike Schwörer Mikescher

View GitHub Profile
@Mikescher
Mikescher / clockify_month_counter.js
Last active April 18, 2021 20:03
clockify month counter
// ==UserScript==
// @name New script - clockify.me
// @namespace Violentmonkey Scripts
// @match https://clockify.me/*
// @grant none
// @version 1.0
// @author -
// @description 18/04/2021, 05:13:34
// @run-at document-end
// ==/UserScript==
List<int> err = new List<int>();
void Main()
{
Mikescher("^\\\\").Dump();
Test("Atif Aziz (749653)", AtifAziz);
Test("Jeffrey L Whitledge (298968)", JeffreyLWhitledge);
Test("Daniel Earwicker (298990)", DanielEarwicker);
Test("Anton (299795)", Anton);
@Mikescher
Mikescher / rapscript.js
Last active August 29, 2015 14:07
[Greasemonkey] Rapla - script ((TINF12B5))
// ==UserScript==
// @name Rapla Highlighter
// @namespace https://rapla.dhbw-karlsruhe.de
// @include https://rapla.dhbw-karlsruhe.de/*
// @version 1
// @require http://code.jquery.com/jquery-latest.js
// @grant none
// @author Mikescher
// ==/UserScript==
this.$ = this.jQuery = jQuery.noConflict(true);
@Mikescher
Mikescher / ASCIICircle.cs
Created September 10, 2014 14:05
LINQ - ASCII Circle
Enumerable.Range(0, 100*100)
.Select(p => Tuple.Create(p % 100 - 50, p / 100 - 50))
.Select(p => Tuple.Create(p.Item1, p.Item2/ (8.0/12)))
.Select(p => Math.Sqrt(Math.Pow(p.Item1, 2) + Math.Pow(p.Item2, 2)))
.Select(p => p >= 45)
.Select(p => p ? "#" : " ")
.Select((p, i) => new { x = i, v = p })
.GroupBy(p => p.x / 100)
.Select(p => p.Select(q => q.v).ToList())
.Select(p => p.Aggregate((a, b) => a+b))
@Mikescher
Mikescher / Prime.cs
Created September 10, 2014 13:48
LINQ - Primes
Enumerable.Range(2, 1000)
.Where(p =>
!Enumerable.Range(2, p/2 + 1)
.Any(q => p%q == 0 && p-q != 0)
)
@Mikescher
Mikescher / FizzBuzz.cs
Last active August 29, 2015 14:06
LINQ - FizzBuzz
Enumerable.Range(1, 100)
.Select(p => ((p%3==0) ? 2 : 0) | ((p%5==0) ? 1 : 0))
.Select((p, i) => new string[]
{
(i+1)+"",
"Fizz",
"Buzz",
"FizzBuzz"
}[p])
.Aggregate((a, b) => a + Environment.NewLine + b)
@Mikescher
Mikescher / Twitch Unicode Hell
Last active August 3, 2020 18:59
Things from Twitch chat ( Spam Toolbox :3 )
༼ ᕤºل͟º ༽ᕤ
¢‿¢
¯\_(ツ)_/¯
ᕙ༼ຈل͜ຈ༽ᕗ
ó‿ó