Here is how you can emulate Azure managed identity on your local system by running an instance metadata service identity endpoint and simulating the token API to return an access token from Azure CLI. You can use this for example to log into SQL Server Management studio using your Azure CLI identity, or locally test code that uses the "Azure only" [ManagedIdentityCredential](https://learn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# EditorConfig is awesome: https://EditorConfig.org | |
# | |
# More info about editorconfig for C# and .NET in Visual Studio see: | |
# https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2019 | |
# | |
# Most of the .NET and C# rules below were taken from the | |
# Microsoft Roslyn team's editorconfig at: | |
# https://github.com/dotnet/roslyn/blob/master/.editorconfig | |
# Top-most EditorConfig file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.8' | |
configs: | |
loki-conf: | |
file: ./loki.conf | |
fluent-bit-conf: | |
file: ./fluent-bit.conf | |
networks: | |
monitoring: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Modified from https://gist.github.com/EtherZa/581d9276336353838b2c939f9554d479 | |
# | |
# This script finds the files that are about to be committed, | |
# and runs dotnet format on them before adding them back to staging | |
# | |
# install dotnet-format: dotnet tool install -g dotnet-format | |
# make sure installed dotnet tools are on your path: | |
# export PATH="$PATH:$HOME/.dotnet/tools/" | |
# copy to .git/hooks/pre-commit and make executable |
Directories on host machine:
-
/data/certbot/letsencrypt
-
/data/certbot/www
-
Nginx server in docker container
docker run -d --name nginx \
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Starter pipeline | |
# Start with a minimal pipeline that you can customize to build and deploy your code. | |
# Add steps that build, run tests, deploy, and more: | |
# https://aka.ms/yaml | |
trigger: | |
- master | |
pool: | |
vmImage: 'windows-latest' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace MyNamespace | |
{ | |
public class Debouncer : IDisposable | |
{ | |
private readonly CancellationTokenSource cts = new CancellationTokenSource(); | |
private readonly TimeSpan waitTime; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using Xamarin.Auth; | |
namespace MyNetStandardLibrary.OAuth2 | |
{ | |
// inspired by https://lostechies.com/jimmybogard/2014/11/13/mobile-authentication-with-xamarin-auth-and-refresh-tokens/ | |
public class CustomOAuth2Authenticator : OAuth2Authenticator | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Instructions for quick gluster server (1 node) setup with a volume on LVM. | |
# No replication, just using localhost. | |
# | |
# See https://docs.gluster.org/en/latest/Administrator%20Guide/Brick%20Naming%20Conventions/ | |
# | |
# Install GlusterFS | |
add-apt-repository ppa:gluster/glusterfs-4.0 | |
apt-get install glusterfs-server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | |
<PropertyGroup> | |
<TargetFramework>netstandard1.0</TargetFramework> | |
<IsPackable>true</IsPackable> | |
<IncludeBuildOutput>false</IncludeBuildOutput> | |
<ContentTargetFolders>contentFiles</ContentTargetFolders> | |
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences> |
NewerOlder