Skip to content

Instantly share code, notes, and snippets.

Avatar
🌌
at work

Marcus sojournercntl

🌌
at work
View GitHub Profile
View ConcurrentDictionaryExtensions.cs
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 Apr 14, 2022 — forked from davidfowl/MinimalAPIs.md
Minimal APIs at a glance
View MinimalAPIs.md
View toc.js
jQuery.tableOfContents =
function (tocList) {
jQuery(tocList).empty();
var prevH2Item = null;
var prevH2List = null;
var index = 0;
// foreach
@sojournercntl
sojournercntl / something.cs
Created Dec 24, 2019
The for OS detection in .net core
View something.cs
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 Nov 24, 2019
Webfactory - Basic Banking Style
View base.html
<!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" />
View keybase.md

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 Jun 18, 2019
The following python script allows you to easily update the dynamic dns entry of a Namecheap domain using python and a cronjob.
View dns_updater.py
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 Jun 8, 2019
ERP - Semiramis 2018/19 Prozesse
View erp.md

Prozesse

  • Semiramis - 2018/19
Beschaffung
  • Beschaffungsartikel erstellen
 Artikel
View Bundesliga.sql
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 Jun 4, 2019
Netzwerktechnik - Kompendium
View ios_cheatsheet.pdf
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.