Skip to content

Instantly share code, notes, and snippets.

View llaughlin's full-sized avatar

Logan Laughlin llaughlin

View GitHub Profile
@llaughlin
llaughlin / Deployments.md
Last active November 16, 2023 19:39
Kubernetes Commands

Get CPU & Memory Request & Limit for each deployment

Expanded
k get deploy -o yaml | yq '[.items[].spec.template.spec.containers[] | {.name: (.resources | {"cpu-req":.requests.cpu, "cpu-limit":.limits.cpu, "mem-req":.requests.memory, "mem-limit":.limits.memory})} ]'
Shortened
k get deploy -o yaml | yq '[.items[].spec.template.spec.containers[] | {.name: (.resources | {"cpu": .requests.cpu + " / " + .limits.cpu, "mem": .requests.memory + " / " + .limits.memory})} ]'
@llaughlin
llaughlin / dark-custom.css
Last active August 25, 2023 18:35
JSON Viewer Pro
#rbrahul-awesome-json{
font-size: 10pt;
}
.property{
color: #86AED6;
}
.json-literal-numeric{
color: #D6AED6;
@llaughlin
llaughlin / night-owl.omp.custom.json
Created August 25, 2023 15:01
Oh My Posh Themes
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#21c7a8",
"foreground": "#011627",
"leading_diamond": "\u256d\u2500\ue0b6",
{
"Title": "Dotnet",
"Description": "Common dotnet properties",
"Filters": [],
"Columns": [
{
"Expression": "Source"
},
{
"Expression": "RequestPath"
# Quickly re-create all binding redirects in all projects
Get-Project -All | Add-BindingRedirect | Out-Null
@llaughlin
llaughlin / Resharper Formatter
Created August 5, 2021 15:49
Inline resharper formatting rules - alignment - code style - indention
// @formatter:align_first_arg_by_paren false
// @formatter:align_linq_query true
// @formatter:align_multiline_argument true
// @formatter:align_multiline_array_and_object_initializer true
// @formatter:align_multiline_calls_chain true
// @formatter:align_multiline_expression true
// @formatter:align_multiline_extends_list true
// @formatter:align_multiline_for_stmt true
// @formatter:align_multiline_parameter true
// @formatter:align_multiline_switch_expression true
@llaughlin
llaughlin / devcontainer.json
Created July 1, 2021 16:07
Dev Container VS Code config
{
"extensions": [
"ms-dotnettools.csharp",
"formulahendry.dotnet-test-explorer",
"fernandoescolar.vscode-solution-explorer",
"shardulm94.trailing-spaces",
"pkief.material-icon-theme",
"jmrog.vscode-nuget-package-manager",
"patcx.vscode-nuget-gallery",
"k--kato.docomment",
@llaughlin
llaughlin / index.html
Last active June 5, 2020 20:00
dotnet-script-example
<div id="app">
<h1>{{ header }}</h1>
<p>Feel free to edit the HTML, JavaScript and CSS in this playground. The preview will update in real-time, so that
you can visually explore your ideas.</p>
<button @click="sayHi">Say Hi <span class="fa fa-heart" /></button>
</div>
@llaughlin
llaughlin / Readme.md
Last active July 27, 2020 19:12
Boxstarter Server 2019

Execution instructions:

$cred = Get-Credential LLaughlinHV\Admin
$boxVm = Enable-BoxstarterVM -VmName LLaughlinHV -Credential $cred


$scriptUrl = "https://gist.githubusercontent.com/llaughlin/7be7bd8eaccb5edbc8ad16b50977aee9/raw/b543db14178f502bda3f3a0280ed0db7850790ad/HyperVSetup.ps1"

$objectBrowserUrl = "https://gist.githubusercontent.com/llaughlin/7be7bd8eaccb5edbc8ad16b50977aee9/raw/af26c39aca10c7b084fb6fd456a6617e2c157776/PSObjectBrowser.psm1"