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 November 18, 2024 18:55
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 November 22, 2024 11:33
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 December 6, 2024 00:17
Tesla Key Card Protocol

Tesla Key Card Protocol

Researched by Robert Quattlebaum [email protected].

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 November 27, 2024 22:56
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 December 14, 2024 06:12
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 August 6, 2024 05:43
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 November 28, 2024 08:37
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 December 9, 2024 20:23 — forked from chetan/yardoc_cheatsheet.md
Improved YARD cheatsheet