Skip to content

Instantly share code, notes, and snippets.

View HairyMike's full-sized avatar

Mike Eller HairyMike

  • Rakuten
  • Belfast
View GitHub Profile
@HairyMike
HairyMike / alias.sh
Last active August 29, 2023 13:05
Handy aliases
# These aliases depend on the following: az-cli, gum, kubectx, kubens
# Choose your Azure Account
alias azacc='choice=$(az account list -o tsv --query "[].name" | gum choose --selected="$(az account show --query "name" -o tsv)") && az account set --name "$choice"'
# Choose your Kubernetes Context
alias kctx='choice=$(kubectx | gum choose --selected=$(kubectx -c)) && kubectx "$choice"'
# Choose your Kubernetes Namespace
alias kns='choice=$(kubens | gum choose --selected=$(kubens -c)) && kubens "$choice"'
const express = require('express');
const app = express();
const port = 3000;
const https = require('https');
const options = {
hostname: 'ink.twetch.com',
port: 443,
path: '/twonks/market/sold',
method: 'GET'
@HairyMike
HairyMike / Thing.ts
Last active March 22, 2021 21:33
Type aliases and higher order functions with Typescript
type Thing = {
shape: Shape,
size: number,
}
enum Shape {
Circle,
Square,
Rectangle,
Triangle,
const request = require("request");
const http = require("http");
var agent = new http.Agent({
keepAlive: true,
//maxSockets: 25, // uncomment this line to fix the problem
keepAliveMsecs: 3000
});
async function asyncGet() {