Skip to content

Instantly share code, notes, and snippets.

View stormasm's full-sized avatar
💭
nushell core team member

Michael Angerman stormasm

💭
nushell core team member
  • arcadian group
  • corvallis, oregon
View GitHub Profile
@stormasm
stormasm / terminating_write.rs
Created January 8, 2020 16:12 — forked from trinity-1686a/terminating_write.rs
idea for a boxable terminating writer
#[doc(hidden)]
pub struct AntiCallToken(());
/// Trait used to indicate when no more write need to be done on a writer
pub trait TerminatingWrite: Write {
/// Indicate that the writer will no longer be used. Internally call terminate_ref.
fn terminate(mut self) -> io::Result<()> where Self: Sized {
self.terminate_ref(AntiCallToken(()))
}
@stormasm
stormasm / alexa.js
Created September 28, 2019 17:20 — forked from chilts/alexa.js
Getting the Alexa top 1 million sites directly from the server, unzipping it, parsing the csv and getting each line as an array.
var request = require('request');
var unzip = require('unzip');
var csv2 = require('csv2');
request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip')
.pipe(unzip.Parse())
.on('entry', function (entry) {
entry.pipe(csv2()).on('data', console.log);
})
;

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@stormasm
stormasm / kubernetes_add_service_account_kubeconfig.sh
Created December 5, 2018 01:56 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@stormasm
stormasm / react.md
Created October 8, 2017 16:50 — forked from monicao/react.md
React Lifecycle Cheatsheet

React Component Lifecycle

  • getInitialState
  • getDefaultProps
  • componentWillMount
  • componentDidMount
  • shouldComponentUpdate (Update only)
  • componentWillUpdate (Update only)
  • componentWillReceiveProps (Update only)
  • render
@stormasm
stormasm / linux.sh
Created January 10, 2017 00:26 — forked from marcan/linux.sh
Linux kernel initialization, translated to bash
#!/boot/bzImage
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name