Skip to content

Instantly share code, notes, and snippets.

View martijn's full-sized avatar

Martijn Storck martijn

View GitHub Profile
@jaredpar
jaredpar / community-standup-explained.cs
Created January 12, 2023 23:35
This is the code I demonstrated at the .NET Community Standup on 2023/1/12 with comments to explain how it works.
using System;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
#nullable disable
// The stand up link https://www.youtube.com/watch?v=jaPk6Nt33KM
// String vs. string
@davidfowl
davidfowl / MinimalAPIs.md
Last active May 18, 2024 18:28
Minimal APIs at a glance
@pedrovasconcellos
pedrovasconcellos / RestSharpWithPollyExample.cs
Last active March 8, 2024 03:57
Example using restsharp with polly
using Polly;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Net;
using System.Text.Encodings.Web;
using System.Text.Json;
using System.Threading.Tasks;
namespace RestSharpWithPolly
@cetinajero
cetinajero / ddrescue.md
Last active April 10, 2024 03:46
Guide for using Ddrescue to recover data

Guide for using Ddrescue to recover data

Start command:

ddrescue -d /dev/sda output.img output.mapfile

NOTE: If direct disc access is not available in your system, try raw devices.

@darconeous
darconeous / tesla-key-card-protocol.md
Last active May 7, 2024 23:59
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum darco@deepdarc.com.

Last updated 2020-02-03.

Image of Tesla Key Card Image of Tesla Model 3 Key Fob

@SteveSandersonMS
SteveSandersonMS / blazor-state-user-docs.md
Last active February 29, 2024 02:46
Preserving State in Server-Side Blazor applications

Preserving State in Server-Side Blazor applications

Server-side Blazor is a stateful application framework. Most of the time, your users will maintain an ongoing connection to the server, and their state will be held in the server's memory in what's known as a "circuit". Examples of state held for a user's circuit include:

  • The UI being rendered (i.e., the hierarchy of component instances and their most recent render output)
  • The values of any fields and properties in component instances
  • Data held in DI service instances that are scoped to the circuit

Occasionally, users may experience a temporary network connection loss, after which Blazor will attempt to reconnect them to their original circuit so they can continue.

@zoilomora
zoilomora / README.md
Last active May 13, 2024 16:49
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

@Ruben-E
Ruben-E / edgerouter-x.md
Last active January 25, 2024 23:12
Configure EdgeRouter X for KPN fiber / glasvezel

Setup interface eth1 and configure the DHCP/DNS server

configure
 
set interfaces ethernet eth1 address 192.168.2.254/24
set interfaces ethernet eth1 description "eth1 - LAN"
set interfaces ethernet eth1 duplex auto
set interfaces ethernet eth1 speed auto
 
@BretFisher
BretFisher / docker-for-mac.md
Last active May 15, 2024 05:19
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@phansch
phansch / yardoc_cheatsheet.md
Last active March 1, 2024 18:17 — forked from chetan/yardoc_cheatsheet.md
Improved YARD cheatsheet