Skip to content

Instantly share code, notes, and snippets.

View maxisam's full-sized avatar
💭
I may be slow to respond.

Sam Lin maxisam

💭
I may be slow to respond.
View GitHub Profile
@Zerpet
Zerpet / deployment.yaml
Last active September 23, 2024 03:48
RabbitMQ Perf Test deployment in Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: perf-test-deployment
labels:
app: perf-test
spec:
replicas: 1
selector:
matchLabels:
@JonasMH
JonasMH / HealthMetricsHostedService.cs
Last active April 1, 2019 22:56
Reporting Service for Microsoft.Extensions.Diagnostics.HealthChecks -> App Metrics
using App.Metrics;
using App.Metrics.Gauge;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace JonasMH.AspNetCore
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active July 14, 2026 13:46
set -e, -u, -o, -x pipefail explanation
@marcopaga
marcopaga / lets-encrypt-wildcard-certs-using-azure-dns-on-aks.md
Last active January 20, 2026 04:49
Let's encrypt wildcard TLS certificates for Azure DNS using cert-manager on AKS (Azure Kubernetes Service)

This gist will guide you through the setup of a wildcard Let's encrypt TLS certificate.

Let's encrypt

Let’s encrypt is one of a new kind of Certificate Authority. You can get a TLS certificate from them for your website free of charge and without any manual overhead. These certificates are trusted in most browsers that are out there and will show up as valid. Instead of sending Mails or even paper around you can call an API and prove your domain ownership with simple challenges. Basically you call the API with a hostname or domain name you need a TLS certificate for and you get back a challenge string that you need to put in a well known location on your http host or as a txt record in your dns system.

The little helper for Kubernetes: Cert-Manager

You can find many clients that manage the proces

@paladique
paladique / resources.md
Last active April 2, 2018 20:00
Getting started with Angular and .NET Core Web API
@danny0838
danny0838 / .gitconfig
Last active June 23, 2020 22:57
實用的 Git 配置值
[core]
quotepath = false # 中文檔名如實顯示而不轉碼
autocrlf = false # commit 及 checkout 時不根據作業系統轉換檔案的換行字元 (避免不小心改動原 repo 的換行字元)
safecrlf = false # 檢查文字類檔案是否混合了 CRLF 及 LF 換行字元 (搭配 autocrlf,這裡一起關閉)
ignorecase = false # 檔名大小寫不同時視為相異 (更動大小寫才能 commit)
whitespace = cr-at-eol # diff 時行尾 CRLF 不顯示 ^M
fileMode = false # 忽略檔案的 x 屬性 (for Windows)
symlinks = false # 忽略符號連結 (for Windows)
editor = /usr/bin/vim # 預設的文字編輯器 (for Linux)
[alias]
@ruanbekker
ruanbekker / setup-kubernetes-ubuntu-16.md
Last active October 21, 2023 08:25
Install a 3 Node Kubernetes Cluster on Ubuntu 16

Master: Dependencies

apt update && apt upgrade -y
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -

cat <<EOF > /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
@dentechy
dentechy / WSL-ssh-server.md
Last active July 7, 2026 02:31
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
/* https://github.com/eisnerd/feedback-tool + github issues
Example:
$.feedbackGithub({
token: "16222221222128357fab95ec80b56a43c9a1868b429",
issues: {
repository: "tokland/feedback-test",
title: "feedback from user",
renderBody: (body) => "my own data\n" + body,
@markarnott
markarnott / Add-AspNetCoreEnvVarElems.ps1
Created September 6, 2017 15:02
A powershell script to inject environmentVariable elements into aspNetCore Element in web.config for ASP.NET Core Module
#
# == Turn This ==
# <?xml version="1.0" encoding="utf-8"?>
# <configuration>
# <system.webServer>
# <handlers>
# <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
# </handlers>
# <aspNetCore processPath=".\MyCoreGizmo.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
# </system.webServer>