This file contains hidden or 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
| openssl s_client -showcerts -connect SERVER_NAME:443 -showcerts </dev/null 2>/dev/null|openssl x509 -outform PEM >mycertfile.pem |
This file contains hidden or 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
| import {collectDefaultMetrics, register} from 'prom-client'; | |
| collectDefaultMetrics({ register }); | |
| export async function GET() { | |
| const metrics : string = await register.metrics(); | |
| return new Response(metrics, { | |
| status: 200, | |
| headers: { | |
| "Content-Type": register.contentType, |
This file contains hidden or 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
| #! /usr/bin/env bash | |
| brew services list | grep started | cut -f 1 -d ' ' | xargs -n 1 brew services restart |
This file contains hidden or 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
| #! /usr/bin/env bash | |
| brew list | xargs brew reinstall |
This file contains hidden or 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
| #! /usr/bin/env bash | |
| kubectl get secret --output yaml | /usr/local/bin/yq '.items[] | { (.metadata.name): (.data | to_entries) | map_values({ (.key): (.value | @base64d )}) }' | |
| echo |
This file contains hidden or 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
| // found at https://www.strathweb.com/2016/09/strongly-typed-configuration-in-asp-net-core-without-ioptionst/ | |
| public static class ServiceCollectionExtensions | |
| { | |
| public static TConfig ConfigurePOCO<TConfig>(this IServiceCollection services, IConfiguration configuration, Func<TConfig> pocoProvider) where TConfig : class | |
| { | |
| if (services == null) throw new ArgumentNullException(nameof(services)); | |
| if (configuration == null) throw new ArgumentNullException(nameof(configuration)); | |
| if (pocoProvider == null) throw new ArgumentNullException(nameof(pocoProvider)); |
This file contains hidden or 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
| [Fact] | |
| public async Task InterceptShouldTrace() | |
| { | |
| IList<Activity> exportedActivities = new List<Activity>(); | |
| IHostBuilder hostBuilder = Host.CreateDefaultBuilder(); | |
| var source = Guid.NewGuid().ToString("N"); | |
| hostBuilder.ConfigureServices((_, serviceCollection) => |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>KeepAlive</key> | |
| <true/> | |
| <key>Label</key> | |
| <string>my.gitsign-credential-cache</string> | |
| <key>ProgramArguments</key> | |
| <array> |
This file contains hidden or 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
| #! /usr/bin/env bash | |
| for file in src/**/*.csproj | |
| do | |
| cat $file | \ | |
| xq '[(try(.Project.ItemGroup[].PackageReference) // [])] | flatten' | \ | |
| jq '[.[].["@Include"]]' | \ | |
| jq --arg file ${file} '{"file":$file, "refs":.}' | \ | |
| yq eval --prettyPrint '[.]'; | |
| done |
This file contains hidden or 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
| ### Keybase proof | |
| I hereby claim: | |
| * I am stand-sure on github. | |
| * I am stand_sure (https://keybase.io/stand_sure) on keybase. | |
| * I have a public key ASCyW_dmVCsEDjWTcomieNrIhS2NJrkfRyww-S2qFc7K2Ao | |
| To claim this, I am signing this object: |