Skip to content

Instantly share code, notes, and snippets.

View MarkWme's full-sized avatar
💻
10 PRINT "Hello"

Mark Whitby MarkWme

💻
10 PRINT "Hello"
  • UK
View GitHub Profile
@MarkWme
MarkWme / .zshrc
Last active September 3, 2025 12:12
.zshrc
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
@MarkWme
MarkWme / i3-config
Last active December 9, 2019 12:02
Configuration for i3wm
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
@MarkWme
MarkWme / LatestAKSVersion.sh
Created November 19, 2019 14:08
Discover the latest (non-preview) version of Kubernetes available in any give Azure region
#!/bin/bash
az aks get-versions -l westeurope --query 'orchestrators[?isPreview == null].[orchestratorVersion] | [-1]' -o tsv
@MarkWme
MarkWme / create_docker_registry_secret.sh
Created June 8, 2019 06:10
Create a Service Principal with acrpull role to pull images from Azure Container Registry
#!/bin/bash
kubectl create secret docker-registry acr-auth --docker-server <acr_name>.azurecr.io --docker-username <client_id> --docker-password <client-secret> --docker-email user@azurecr.io
@MarkWme
MarkWme / .hyper
Last active April 15, 2019 09:32
Configuration for Hyper (https://hyper.is/) terminal application, running on Windows with WSL (Windows Subsystem for Linux) with zsh
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
@MarkWme
MarkWme / gist:26f8a3e6a9d99d8eb25d74721bc6ef00
Created April 11, 2018 07:03
macOS: Show hidden files in Finder
defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder
@MarkWme
MarkWme / gist:d28f87b809708ea7a5387d7dab56563d
Created October 11, 2017 17:10
Azure Log Analytics - Update Resource Group
AzureActivity | where OperationName == "Update resource group"
@MarkWme
MarkWme / gist:282c7b820742f20bb081ffdc859f7002
Created October 11, 2017 17:04
Azure Log Analytics - Data Types
// Show a distribution of your data by type over the last 24 hours
union withsource=type *
| where TimeGenerated > ago(24h)
| summarize AggregatedValue = count() by type
| render piechart
@MarkWme
MarkWme / AzureContainerInstanceCommands.sh
Created July 27, 2017 13:39
Azure CLI Container Commands
az container list --resource-group x-rg-euw-cttaci --query value[].[name,provisioningState]
#
# Fix for "Module AzureRM was not found in central repository" error that occurs when attempting to
# install or update Azure PowerShell modules
#
# First register the repository. Everytime I've done this, the below repository is already present,
# but for some reason, you need to register it again with a different name. You'll also need to
# unregister the existing "PSGallery" otherwise Register-PSRepository will complain that that repo
# is already registered.
#
Unregister-PSRepository -Name PSGallery