Skip to content

Instantly share code, notes, and snippets.

View sojournercntl's full-sized avatar
🌌
at work

Marcus sojournercntl

🌌
at work
View GitHub Profile
using System;
using System.Threading.Tasks;
namespace System.Collections.Concurrent
{
public static class ConcurrentDictionaryExtensions
{
/// <summary>
/// Provides an alternative to <see cref="ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, Func{TKey, TValue})"/> that disposes values that implement <see cref="IDisposable"/>.
/// </summary>
@sojournercntl
sojournercntl / MinimalAPIs.md
Created April 14, 2022 17:03 — forked from davidfowl/MinimalAPIs.md
Minimal APIs at a glance
jQuery.tableOfContents =
function (tocList) {
jQuery(tocList).empty();
var prevH2Item = null;
var prevH2List = null;
var index = 0;
// foreach
@sojournercntl
sojournercntl / something.cs
Created December 24, 2019 16:11
The for OS detection in .net core
public static class OS
{
public static bool IsWin() =>
RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
public static bool IsMac() =>
RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
public static bool IsGnu() =>
RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
@sojournercntl
sojournercntl / base.html
Created November 24, 2019 19:44
Webfactory - Basic Banking Style
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Basic Online Banking</title>
<link rel="stylesheet" href="http://static.sdev-software.com/cdn/helix/vendors/iconfonts/mdi/css/materialdesignicons.min.css" />
@sojournercntl
sojournercntl / keybase.md
Created September 13, 2019 20:23
Keybase Identity

Keybase proof

I hereby claim:

  • I am sojournercntl on github.
  • I am sojournercntl (https://keybase.io/sojournercntl) on keybase.
  • I have a public key ASBxBgpFw2QmiISW3pw5alWXjZ1AfbYWHpovq85dAHkTbAo

To claim this, I am signing this object:

@sojournercntl
sojournercntl / dns_updater.py
Created June 18, 2019 12:33
The following python script allows you to easily update the dynamic dns entry of a Namecheap domain using python and a cronjob.
import urllib2
import json
import xml.etree.ElementTree as Tree
# --------------------------------------------
from time import strftime, gmtime
host = "https://myexternalip.com/json"
# --------------------------------------------
dns_host = ""
@sojournercntl
sojournercntl / erp.md
Created June 8, 2019 15:28
ERP - Semiramis 2018/19 Prozesse

Prozesse

  • Semiramis - 2018/19
Beschaffung
  • Beschaffungsartikel erstellen
    Artikel
@sojournercntl
sojournercntl / Bundesliga.sql
Created June 6, 2019 12:44
Bundesliga Schema
CREATE SCHEMA bundesliga;
USE bundesliga;
CREATE TABLE Schiedsrichter(
ZulassungsNummer INTEGER PRIMARY KEY AUTO_INCREMENT,
Vorname VARCHAR(150),
Nachname VARCHAR(150)
);
CREATE TABLE Stadions(
@sojournercntl
sojournercntl / ios_cheatsheet.pdf
Last active June 4, 2019 10:51
Netzwerktechnik - Kompendium
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.