Skip to content

Instantly share code, notes, and snippets.

View jsturtevant's full-sized avatar
💻
right clicking and viewing the source

James Sturtevant jsturtevant

💻
right clicking and viewing the source
View GitHub Profile
@noelbundick
noelbundick / README.md
Created June 6, 2018 19:58
Locust on Azure Container Instances

Running Distributed Locust on Azure Container Instances

Locust is an open source load testing tool that can be run inside a container

Below is how I got Locust up and running on Azure Container Instances

Note: I prefer head/workers, controller/nodes, etc, but I've used master/slave for clarity & consistency with the Locust docs in this doc

Design

@weijuans-msft
weijuans-msft / FeaturesRemovedFromServerCoreContainer
Last active February 10, 2021 06:47
Features Removed from Windows Server Core Container base image starting with Insider Build 17074 (For Windows Server v1803 release)
Mar 12, 2018 update: due to issues found internally, we added back 2 features:
Printing-Client
Windows-Defender-Features
-------
In the recent blog we shared that we removed a number of features to further reduce the size of the Windows Server Core container base image.
https://techcommunity.microsoft.com/t5/containers/a-smaller-windows-server-core-container-with-better-application/ba-p/382412.
Below is that list of features we removed. Let us know if you have any concern or share your feedback with us how this has worked for you. Thanks.
@harrewarre
harrewarre / gist:fe017a95ee82d61d7784278f81f07ea6
Created October 10, 2017 10:39
PS Run Azure RM template as Service Principcal
$psCredential = New-Object System.Management.Automation.PSCredential("client", (ConvertTo-SecureString "secret" -AsPlainText -Force))
Add-AzureRMAccount -ServicePrincipal -Tenant "tenant" -Credential $psCredential
@squat
squat / azure-vxlan.md
Last active April 23, 2021 04:27
Debugging VXLAN issues on Azure

Azure VXLAN Issues

Introduction

Between June 24-25, the nodes in Tectonic clusters running on Azure automatically updated the OS from Container Linux 1353.8.0 to 1409.2.0. After this upgrade, the nodes began to experience increased latency and failure rate in requests. Interestingly, we found that the size of the HTTP request played a role in determining the success of requests to services running on the Kubernetes cluster. We found that setting the client's interface's MTU to 1370 made all requests succeed; incrementing the MTU to 1371 caused the failure of large HTTP requests to resurface. Additionally, enabling TCP MTU probing on the clients ensured all requests would succeed, albeit with increased latency. In order to identify the minimum set of circumstances needed to reproduce the issue, I ran several tests involving different network topologies.

@zaenk
zaenk / .0-packer-ansible-wls.md
Last active June 19, 2024 21:51
Packer, Hyper-V, Ansible, Windows, WLS

Create Linux images on Windows with Packer

Prerequisites:

  • Windows 10 Pro
  • WLS, Ubuntu 16.04 (a.k.a.: Bash on Ubuntu on Windows)
  • Hyper-V
  • Packer (1.0.0, added to path)
  • Ansible (2.3.0, installed on WSL)
  • qemu-img (2.3.0, added to path)
@ianphil
ianphil / DockerNetworkHack.sh
Created June 23, 2016 20:03
I was in meetings all day and used that time to learn a little about Docker Networks.
#
# Learn About Docker Networks
# github/tripdubroot
# Docker version 1.12.0-rc2
# build 906eacd
# experimental
#
# https://docs.docker.com/engine/userguide/networking/dockernetworks/#docker-embedded-dns-server
# https://docs.docker.com/engine/userguide/networking/configure-dns/
# https://github.com/docker/libnetwork/blob/ed311d050fda7821f2e7c53a7e08a0205923aef5/resolver.go
@guitarrapc
guitarrapc / Get-EtwTraceProvider.ps1
Last active March 26, 2025 00:38
ETW (Event Tracing for Windows) Providers and their GUIDs for Windows 10 x64
#Requires -RunAsAdministrator
#Requires -Version 5.0
# requires Windows 10
Get-EtwTraceProvider | Select-Object SessionName, Guid | sort SessionName
# as Markdown
<#
#Requires -RunAsAdministrator
$result = Get-EtwTraceProvider | sort SessionName
$result | %{"|Name|GUID|";"|----|----|";}{"|$($_.SessionName)|$($_.Guid)|"}
#>
@kstrauss
kstrauss / Additional Notes
Last active December 14, 2021 01:28
Example of publishing simple ETW events (no manifest and therefore EventLog) and consuming them in a realtime fashion
All need the Microsoft.Diagnostics.Tracing.TraceEvent nuget package
Shows how you can both produce some simple ETW events (these are not written to the eventlog)
A couple of ways to consume said events.
1. using standard tooling like perfview, xperf, etc.
2. create your own EventListener class as demonstrated by ProducerAndSimpleListener, which allows you to do pretty much anything
3. listen in realtime as done in RealTimeListener
4. Others do similar things I believe like tx.windows
@cridenour
cridenour / gist:74e7635275331d5afa6b
Last active March 20, 2025 09:04
Setting up Vim as your Go IDE

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

@codingoutloud
codingoutloud / make-keys.bat
Last active October 3, 2024 07:10
Handy OpenSSL command-line combinations I've used - they might've been hard to find or come up with, so capturing them here.
@echo off
if _%1_==__ goto USAGE
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem -subj "/CN=My Cert Name"
openssl pkcs12 -export -out mycert.pfx -inkey mycert.pem -in mycert.pem -passout pass:%1
openssl x509 -inform pem -in mycert.pem -outform der -out mycert.cer
openssl pkcs12 -in mycert.pfx -nodes -passin pass:%1 | openssl x509 -noout -fingerprint
openssl x509 -in mycert.pem -noout -fingerprint