Skip to content

Instantly share code, notes, and snippets.

View circleupx's full-sized avatar

Yunier circleupx

  • South Florida
  • 08:48 (UTC -04:00)
View GitHub Profile
@mike-weiner
mike-weiner / brew-install-specific-formula.md
Last active April 4, 2024 20:30
An explanation of how to install a specific version of a Homebrew formula.

Install Previous Homebrew Formula

Sometimes you need to install a specific, older version of an existing Homebrew Formula. In this guide I am going to demonstrate how to install an older version of kubectl, but it can be generalized for an Formula.

The Kubernetes CLI is available as a Homebrew Formulae: https://formulae.brew.sh/formula/kubernetes-cli#default

At the time of writing, my only options to install kubectl via Homebrew are:

  • brew install kubectl
    • Would install the default version of v1.29
  • brew install kubectl@1.29 or brew install kubectl@1.28
@davidfowl
davidfowl / .NET6Migration.md
Last active April 11, 2024 02:02
.NET 6 ASP.NET Core Migration
@sindresorhus
sindresorhus / esm-package.md
Last active April 25, 2024 08:14
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
using System;
using System.Threading.Tasks;
namespace System.Collections.Concurrent
{
public static class ConcurrentDictionaryExtensions
{
/// <summary>
/// Provides an alternative to <see cref="ConcurrentDictionary{TKey, TValue}.GetOrAdd(TKey, Func{TKey, TValue})"/> that disposes values that implement <see cref="IDisposable"/>.
/// </summary>
@Gutek
Gutek / C# Version Cheat Sheet.md
Last active February 8, 2022 09:33
Short cheat sheet of changes in C# language from version 6 to 9

CS 6

read-only auto properties

Small help with immutable types...

// private readonly int _age;
// public int Age { get { return _age; } }
public int Age { get; }
@naesean
naesean / jsonapi_oas.yml
Last active April 4, 2024 05:57
OpenAPI 3.0 schemas that comply with the JSON:API 1.0 specification
JSONAPIObject:
description: Includes the current JSON:API version for this specification as well as optional meta information
type: object
required:
- version
properties:
version:
type: string
default: '1.0'
example: '1.0'
@heytherewill
heytherewill / RxMappings.csv
Created March 3, 2019 20:03
Rx.NET mappings
Rx.NET name Reactive Extensions name
Observable.Return Observable.just
Select map
SelectMany flatMap
Where filter
Aggregate reduce
Debounce throttle
Synchronize serialize
@nblumhardt
nblumhardt / Program.cs
Last active October 27, 2023 18:39
Enrich.WithCaller()
using System;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using Serilog;
using Serilog.Configuration;
using Serilog.Core;
using Serilog.Events;
namespace ConsoleApp24
@shortjared
shortjared / list.txt
Last active April 19, 2024 10:41
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@darraghoriordan
darraghoriordan / swhmac.groovy
Created September 19, 2017 06:56
Adding custom hmac auth to swagger ui
(function () {
$(function () {
/*I add the ui elements I need here. I thought it would be better put them in here at runtime rather than hard code them in the index.html in case the index.html from my version of swashbuckle is made obsolete in a future version of the package. */
var hmacAuthUi =
'
&lt;div class="input"&gt;&lt;label for="input_api_username"&gt;Api Username: &lt;/label&gt;&lt;input placeholder="Api Username" id="input_api_username" name="input_api_username" type="text" size="20"&gt;&lt;/div&gt;
' +
'
&lt;div class="input"&gt;&lt;label for="input_api_hmackey"&gt;Api Key: &lt;/label&gt;&lt;input placeholder="ApiKey" id="input_api_hmackey" name="input_api_hmackey" type="text" size="20"&gt;&lt;/div&gt;