Skip to content

Instantly share code, notes, and snippets.

View mausworks's full-sized avatar

Rasmus Wennerström mausworks

View GitHub Profile
mausworks /
Created January 3, 2017 18:32
A simple description of mind.
public abstract class Conciousness
    public abstract Action Handle(SensoryData sensoryData);
mausworks /
Last active April 6, 2017 21:14
When they prey on your naivity— I prey on theirs.

Chase <3 also wants me to join their tournament.

Chase <3: hi dude
Chase <3: what is your rank?
maus 「マウス」: Not sure.
maus 「マウス」: Wanna find out?
Chase <3: we have our own team we need to play in the tournament, we are missing one person
Chase <3: we have our own team we need to play in the tournament, we are missing one person
Chase <3: you can help us?
mausworks / BasicAuthentication.cs
Last active February 22, 2018 16:19
A functional helper class for Basic authentication. For tests, check out:
public class BasicAuthentication
public const string Scheme = "Basic";
public const char DelimiterSymbol = ':';
public string Username { get; }
public string Password { get; }
mausworks / human-id.js
Last active October 18, 2019 09:14
Generate an easy to interpret ID.
* The characters which will be used in the ID.
* Note that similar characters such as 0 and O are removed.
const ID_LENGTH = 5;
const randomCharIndex = () => Math.floor(Math.random() * CHARACTERS.length);
const getRandomChar = () => CHARACTERS[randomCharIndex()];
import 'dart:async';
class Game {
String id = null;
Duration tickDuration = const Duration(microseconds: (1000000 ~/ 60));
DateTime updated = DateTime(0);
Timer _timer = null;
mausworks /
Created December 1, 2020 09:23
C# formatting parameters (or arguments)

The reasoning for formatting parameters this way is so that we can intepret the argument list as one continous thing, without having to spend time aligning things.

The short cases


public static string Stringify(
 SomeLongTypeName someLongTypeName, int repeat)