Skip to content

Instantly share code, notes, and snippets.

View thpham's full-sized avatar

Thomas Kim Pham thpham

View GitHub Profile
@thpham
thpham / 00-cloud-config.yml
Created March 8, 2020 17:56 — forked from janeczku/00-cloud-config.yml
Annotated RancherOS Cloud-init configuration snippets
#cloud-config
# Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease).
hostname: myhost
# Authorize SSH keys for the `rancher` sudoer user
ssh_authorized_keys:
- ssh-rsa AAA...ZZZ example1@rancher
@thpham
thpham / it930x.nix
Created April 26, 2020 20:22 — forked from gtgteq/it930x.nix
px4_drv.nix
{ stdenv, fetchFromGitHub, fetchzip }:
stdenv.mkDerivation rec {
pname = "it930x-firmware";
version = "1";
src = fetchFromGitHub {
owner = "nns779";
repo = "px4_drv";
rev = "90e0a4b30b812e7e5fff4483144f165de8914157";

Keybase proof

I hereby claim:

  • I am thpham on github.
  • I am thpham (https://keybase.io/thpham) on keybase.
  • I have a public key ASCd3T9dbXe-wHz-vuyelTDv_S7Jnj2lvFvqy9xW-yE-6wo

To claim this, I am signing this object:

import math
class Node:
def __init__(self, name, x, y, indexloc=None):
self.name = name
self.x = x
self.y = y
self.index = indexloc
###########################################################
# Automation of Everything #
# How To Combine Argo Events, Workflows, CD, and Rollouts #
# https://youtu.be/XNXJtxkUKeY #
###########################################################
# Requirements:
# - k8s v1.19+ cluster with nginx Ingress
# Replace `[...]` with the GitHub organization or the username
#!/bin/bash
# !!WARNING!!
# This will DELETE all efforts you have put into configuring nix
# Have a look through everything that gets deleted / copied over
nix-env -e '.*'
rm -rf $HOME/.nix-*
rm -rf $HOME/.config/nixpkgs
@thpham
thpham / HADOOP-ON-K8S.md
Created April 13, 2021 18:52 — forked from TeemuKoivisto/HADOOP-ON-K8S.md
How to install Hadoop to your local Kubernetes cluster

How to install Hadoop on your local Kubernetes cluster

Okey this is not the easiest way of running Hadoop on your local computer and probably you should instead just install it locally.

However if you really insist doing this here's how:

  1. Install kubectl, minikube and Docker if you don't already have it. I recommend using package-manager like Chocolatey. Minikube should install with VirtualBox as default driver which I recommend. When starting minikube we should increase its memory limit since our Hadoop node's pods need at least 2GB: minikube --memory 4096 --cpus 2 start (minikube's default is 1GB). NOTE: actually the Hadoop cluster by default uses about 10GB in memory limits and about 3GB running memory. From what I looked my k8s will overprovision to 300% of its capacity limits but use far less.
  2. Install helm. Then run helm init.
  3. Now you
@thpham
thpham / myweechat.md
Created June 20, 2021 22:35 — forked from pascalpoitras/config.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

You need at least WeeChat 3.2-dev

Enable mouse

/mouse enable

@thpham
thpham / eni-max-pods.txt
Last active August 16, 2021 10:47
Orignal EKS max pods vs extended hack
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may
# not use this file except in compliance with the License. A copy of the
# License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
@thpham
thpham / leadership_principles_questions.md
Created October 12, 2021 18:04
Interview questions

Are Right, A Lot

  1. Tell me about a decision for which data and analysis weren’t sufficient to provide the right course and you had to rely on your judgment and instincts. Give me two to three examples. They don’t have to be big strategic decisions – could be big or small.
  2. Tell me about a time you made a difficult decision and how you knew it was the right solution (probe on how they evaluated the options, if they received input, what data they reviewed, etc.)
  3. Give me an example of when you have to make an important decision in the absence of good data because there just wasn’t any. What was the situation and how did you arrive at your decision? Did the decision turn out to be the correct one? Why or why not?
  4. Tell me about a time when you made a bad decision and the learning from the experience enabled you to make a good decision later. What did you learn that you were able to apply?
  5. Tell me about a time when you have been faced with a challenge where the best way forward or strategy