Skip to content

Instantly share code, notes, and snippets.

View deniseyu's full-sized avatar
💫
yip yip!

Denise Yu deniseyu

💫
yip yip!
View GitHub Profile
@deniseyu
deniseyu / books.md
Last active June 26, 2020 21:18
Books I bought 💸
Title Author Theme Link
TCP/IP Illustrated, Volume 1 Kevin Fall & others Systems/networking
Systems Performance: Enterprise and the Cloud Brendan Gregg Linux/systems
Linux Kernel Development Robert Love Linux/systems
Advanced Programming in the Unix Environment Richard Stevens
Introduction to Algorithms Thomas Cormen Compsci
Production Ready Microservices Susan Fowler Ops/infra
Seeking SRE David Blank-Edelman SRE
The Goal Eliyahu Goldratt Process/leadership
@deniseyu
deniseyu / cheat.js
Last active April 13, 2020 23:56
Cheat at the Kittens Game
// convert all wood to beams
function allWoodToBeams() {
document.getElementsByClassName('craftTable')[0].childNodes[2].childNodes[5].childNodes[0].click();
}
// all minerals to slabs
function allMineralsToSlabs() {
document.getElementsByClassName('craftTable')[0].childNodes[3].childNodes[5].childNodes[0].click();
}
@deniseyu
deniseyu / gist:e00de7353181914a8496d6d0958677a0
Created April 13, 2020 23:35
Cheat at the Kittens Game
// convert all wood to beams
document.getElementsByClassName('craftTable')[0].childNodes[2].childNodes[5].childNodes[0].click();
// all minerals to slabs
document.getElementsByClassName('craftTable')[0].childNodes[3].childNodes[5].childNodes[0].click();
// all beams to scaffolds
document.getElementsByClassName('craftTable')[0].childNodes[10].childNodes[5].childNodes[0].click();
// send all hunters
#!/usr/bin/env bash
set -m
echo "starting runc"
runc &
echo "starting containerd"
containerd &
@deniseyu
deniseyu / nuke-containerd.sh
Created November 28, 2019 19:36
Removes all containers across all namespaces in containerd (forcibly!!11!)
#!/bin/bash
set -o errexit
main () {
local namespaces=$(list_namespaces)
for namespace in $namespaces; do
local tasks=$(list_tasks $namespace)
for task in $tasks; do
@deniseyu
deniseyu / main.go
Created June 27, 2019 18:42
Mucking around with goroutines
package main
import (
"context"
"fmt"
"math/rand"
"time"
)
func main() {
# For sub/pub to NATS job running in bosh-lite director.
#
# Ruby won't be in the path by default. To fix, run:
# export PATH=$PATH:/var/vcap/packages/ruby-2.4-r5/bin
#
# Also will need to load nats gem into the machine's local gem cache:
# gem install nats
require 'nats/client'
require 'eventmachine'
@deniseyu
deniseyu / generate-certs.md
Last active November 21, 2018 14:59
BOSH Certificates: How to change the expiration time on generated director certificates

To generate a certificate with an expiration date that is controllable (eg. 20 minutes in the future) you can do the following steps:

This might be useful for debugging issues around expired/invalid certificates or recreating scenarios during the cert rotation track of work.

Modify the BOSH CLI code

In the vendored config server code, you can modify the code to return a different expiration date:

https://github.com/cloudfoundry/bosh-cli/blob/master/vendor/github.com/cloudfoundry/config-server/types/certificate_generator.go#L171

@deniseyu
deniseyu / main.md
Last active May 15, 2017 15:09
Running system tests in Concourse containers

Context:

When hijacking into Concourse containers, environment variables don't always stick around. We need these to run system tests end-to-end.

After running fly -t <org> hijack -j <pipeline>/<job>, choose the build # and container. Then...

  1. source git-tile-pipeline/scripts/common/helpers.sh
  2. parse_locks git-tile-pipeline/scripts/common/ release-lock/metadata
  3. add_ssh_key_from_var "$BOSH_INSTANCE_SSH_KEY"
@deniseyu
deniseyu / questions.md
Last active March 2, 2017 17:22
Specific feedback questions

Writing feedback is difficult, and we don't know what skills our colleagues are trying to work on. Can we come up with questions to target specific areas of improvement?

Tooling

  • Do I write descriptive, brief commit messages?
  • Can I improve my command of the tools we use (anything from BOSH to vim)?
  • Have I made good suggestions about shortcuts and other ways to more effectively use our tools?
  • Are we following the "Boy Scout Rule" -- leaving things cleaner than we found them, including our scripts?

Problem-Solving Skills

  • Do I effectively identify the next step to take?