Skip to content

Instantly share code, notes, and snippets.

View MrModest's full-sized avatar

Kamil MrModest

View GitHub Profile
@MrModest
MrModest / UML.json
Last active November 27, 2017 18:19
[{
"Modifier": "publicMod",
"Name": "Angle",
"FullName": "Tetris.Angle",
"Namespace": "Tetris",
"BaseClass": null,
"Attributes": [{
"Modifier": "publicMod",
"IsConstant": false,
"IsStatic": false,
@MrModest
MrModest / DictionaryWithCustomDefaultValue.cs
Last active May 31, 2018 15:46
Implementation for IDictionary with custom default value if key doesn't exist
//Author: John Sonmez | https://stackoverflow.com/users/45365 | https://github.com/jsonmez
//Source: https://stackoverflow.com/a/7061653/7422280
//GitHub: https://github.com/jsonmez/Defaultable-Dictionary
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace DefaultableDictionary
@MrModest
MrModest / Chan&IdolSankakuVideoHelper.user.js
Last active July 11, 2018 14:44
Resize HTML5 Player's width, disable autoplay, show control panel, set volume in 1%.
// ==UserScript==
// @name Chan & Idol Sankaku Video Helper
// @name:ja Chan & Idol Sankaku Video Helper
// @name:ru Chan & Idol Sankaku Video Helper
// @namespace https://www.sankakucomplex.com/
// @version 1.1.2
// @description Resize HTML5 Player's width, disable autoplay, show control panel, set volume in 1%.
// @description:ja Resize HTML5 Player's width, disable autoplay, show control panel, set volume in 1%.
// @description:ru Уменьшает ширину плеера до 1000, отключает автовоспроизведение, показывает панель навигации, устанавливает громкость в 1%.
// @author MrModest
using System;
namespace YourDomenName
{
public readonly struct Optional<TValue> where TValue : notnull
{
private readonly TValue? _value;
public static Optional<TValue> None { get; } = new (default, false);
@MrModest
MrModest / docker-compose.yml
Created September 11, 2021 19:23
Example docker-compose config
version: "3.9"
services:
db:
image: postgres
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
@MrModest
MrModest / Umlauts_and_Eszett.json
Last active February 13, 2023 22:11
Karabiner Umlauts and Eszett config
{
"title": "German Umlaut",
"rules": [
{
"description": "Change option + a/o/u to ä/ö/ü",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "a",

⚠️ WARNING! All the content below was generated by ChatGPT, so take it with a grain of sault.


Legend:

  • Global refers to the ease of relocating with the job internationally.
  • Salary refers to the expected salary for the job compared to the average salary in the region.
  • WLB refers to the work-life balance,
    • with Possible meaning that a normal 40-hour workweek is common
  • and Hardly possible meaning that overtime or unusual schedules are common.
/*
Source: https://www.reddit.com/r/Anki/comments/ggt5uf/edits_to_nightmode_not_working_trying_to_change/
*/
html {
overflow: scroll;
overflow-x: hidden;
}
/* CONTAINER FOR YOUR CARDS */
#kard {
@MrModest
MrModest / anki-deutsch-nomen-template.html
Last active February 26, 2023 14:06
Template for Anki: German nouns - Deutsch Nomen
<!--
Fields: Übersetzung; Artikel; Nomen; Plural; Beispiel
-->
{{FrontSide}} <!-- {{Übersetzung}} -->
<hr id=answer>
<span class="{{Artikel}}"><b>{{Artikel}}</b> {{Nomen}}</span>
data class Playbook(
val name: String,
val hosts: Host[],
val remoteUser: User,
val varFiles: File[],
val vars: ObjectNode // need valitation so root will be only Map
val tasks: Task[]
)
sealed class ObjectNode {