Skip to content

Instantly share code, notes, and snippets.

@fstab
fstab / expecting.md
Created September 2, 2016 22:48 — forked from ksafranski/expecting.md
Basic principles of using tcl-expect scripts
View expecting.md

Intro

TCL-Expect scripts are an amazingly easy way to script out laborious tasks in the shell when you need to be interactive with the console. Think of them as a "macro" or way to programmaticly step through a process you would run by hand. They are similar to shell scripts but utilize the .tcl extension and a different #! call.

Setup Your Script

The first step, similar to writing a bash script, is to tell the script what it's executing under. For expect we use the following:

#!/usr/bin/expect
@fstab
fstab / tmux-shortcuts.md
Last active October 28, 2022 12:47
tmux cheatsheet
View tmux-shortcuts.md

Config File

The default <prefix> key is Ctrl-b. To get more screen-like behavior, change the <prefix> to Ctrl-a in ~/.tmux-conf like this:

unbind C-b
set -g prefix C-a

In Screen, to send Ctrl-a to an application, you must hit Ctrl-a a. Enable this for tmux using the following ~/.tmux-conf entry:

@fstab
fstab / CKMS-Blog-Post-Evaluation.md
Created February 2, 2022 16:40
Source Code for the CKMS Blog Post
View CKMS-Blog-Post-Evaluation.md

The space requirements for CKMS quantiles were evaluated by adding the following test to CKMSQuantilesTest in client_java.

@Test
public void testBlog() {
    Random random = new Random(0);
    Quantile q05 = new Quantile(0.5, 0.01);
    Quantile q95 = new Quantile(0.95, 0.005);
    Quantile q99 = new Quantile(0.99, 0.001);
    dump(random, 1000, q95);
    dump(random, 10*1000, q95);
@fstab
fstab / MATRIX.md
Last active January 5, 2022 12:31
How to use matrix.org and vector.im as an IRC client
View MATRIX.md

How to use matrix.org and vector.im as an IRC client

How to Join an IRC Channel on matrix.org

Join the room #freenode_<#channel>:matrix.org, replacing <#channel> with the name of the IRC channel. For example, in order to join the #prometheus IRC channel, join the room #freenode_#prometheus:matrix.org on matrix.org.

In vector.im, rooms can be joined with the directory symbol on the bottom left.

@fstab
fstab / prometheus-workshop.md
Last active October 5, 2021 14:24
Prometheus Workshop Notes
View prometheus-workshop.md

These are notes for my Prometheus workshop. The follow-up workshop on Prometheus/Kubernetes can be found here.

Overview

  • Technology: Time Series Database
  • Approach: Black Box vs White Box
  • Scope: Time Series (Prometheus) vs. Logfiles (ELK), vs. Tracing (Zipkin)

node_exporter

@fstab
fstab / readme.adoc
Created February 11, 2018 22:23 — forked from arun-gupta/readme.adoc
Kubernetes Cluster on AWS
View readme.adoc
  1. kops: https://github.com/kubernetes/kops

    1. Getting Started Guide: https://github.com/kubernetes/kops/blob/master/docs/aws.md

    2. Installing Kubernetes on AWS with kops: https://kubernetes.io/docs/getting-started-guides/kops/

    3. Mulit-master Kubernetes Cluster on AWS with kops: http://blog.arungupta.me/multimaster-kubernetes-cluster-amazon-kops/

    4. Booting Kubernetes on Amazon Elastic Compute with kops: https://deis.com/docs/workflow/quickstart/provider/aws/boot/

    5. Setting up an HA Kubernetes Cluster in AWS with private topology with kops 1.5.1: https://www.nivenly.com/kops-1-5-1/

    6. Kubernetes on AWS: https://daemonza.github.io/2017/01/15/kubernetes-on-aws/

    7. Your 2nd day with Kubernetes on AWS: https://www.nivenly.com/2nd-hour/

  2. Tectonic (Terraform): http://github.com/coreos/tectonic-installer

@fstab
fstab / prometheus-kubernetes-workshop.md
Last active March 22, 2020 12:20
Prometheus/Kubernetes Workshop Notes
View prometheus-kubernetes-workshop.md

These are notes for my Kubernetes/Prometheus workshop. The notes for the Prometheus introduction workshop can be found here.

The first part of this workshop is taken from episode 001 of the excellent TGI Kubernetes series by Heptio.

The demo runs on AWS.

Preparation (before the workshop)

Before the demo, do the following:

@fstab
fstab / task1.go
Last active March 28, 2017 18:34
View task1.go
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)