Skip to content

Instantly share code, notes, and snippets.

View tony-landreth's full-sized avatar

Tony Landreth tony-landreth

View GitHub Profile
@tony-landreth
tony-landreth / bindings.vim
Created September 5, 2022 10:38
vim key bindings
" Key bindings
" set mapleader
let mapleader = ","
let maplocalleader = "\\"
" disable search highlight
nmap <silent> <C-N> :silent noh<CR>
" ,e to fast finding files. just type beginning of a name and hit TAB
@tony-landreth
tony-landreth / go-stdlib-interface-selected.md
Created August 16, 2022 18:08 — forked from asukakenji/go-stdlib-interface-selected.md
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@tony-landreth
tony-landreth / 2_scenario_1.go
Last active August 10, 2022 16:07
#2: What’s Wrong With Me?
/*
The problem with the code is that the switch statement would have been
comparing v, the interface instance, directly to each type. These things
are incomparable.
We should query v's type like this "v.(type)" to send the type down the chain of
case statements.
*/
package main
@tony-landreth
tony-landreth / 3_impermanent_solution.md
Last active August 10, 2022 16:23
#3: The Impermanent Solution

You have written a Kubernetes application that leverages Pod Security Policies that is deployed to customers' sites. Please answer the following questions:

● How would you work on phasing Pod Security Policies out of your application?

If I know a security expert who's familiar with the situation, I would ask them for advice. Then, I would start by looking for the points of dependency in my application code and make sure that I have good test coverage around them before touching anything.

@tony-landreth
tony-landreth / flat_map_test.go
Last active August 10, 2022 15:43
#1: The Map is Flat
package flatten
import (
"testing"
)
/*
#1: The Map is Flat
The goal of this exercise is to write a function that flattens an arbitrarily nested map into a one-dimensional map.