Skip to content

Instantly share code, notes, and snippets.

Effective Engineer - Notes

What's an Effective Engineer?

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

Adopt the Right Mindsets

@javouhey
javouhey / gist:d4c0882e990453a1e70ca0f5e403bcf0
Last active December 11, 2017 05:12
Best talks at Kubecon + CloudNativeCon 2017 North America
These are a subset of the talks that I attended & ones that I enjoyed.
In no particular order:
1. Shipping in Pirate-Infested Waters: Practical Attack and Defense in Kubernetes
Greg Castle & CJ Cullen, Google
https://kccncna17.sched.com/event/CU86/shipping-in-pirate-infested-waters-practical-attack-and-defense-in-kubernetes-a-greg-castle-cj-cullen-google
- The presenters wore hats that matched with the pirate theme.
- tldr; basic ways to harden your kubernetes cluster.
- extra: Google security team (in the Seattle office) is hiring.
0x99CD46E14d28B88460334C8c83eD8D987bA64d0e
@javouhey
javouhey / linux.sh
Created January 9, 2017 01:43 — forked from marcan/linux.sh
Linux kernel initialization, translated to bash
#!/boot/bzImage
# Linux kernel 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
2016-nov-22 - installed https://blog.golang.org/go-fonts in C:\dev\2016\image
@javouhey
javouhey / latency.markdown
Created October 9, 2016 04:26 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

#!/usr/bin/env python
import sys, os, time, atexit
from signal import SIGTERM
class Daemon:
"""
A generic daemon class.
Usage: subclass the Daemon class and override the run() method
@javouhey
javouhey / gist:11240251
Created April 24, 2014 03:15
Exception running PyHawk client using requests 2.2.1
> /home/gavin/dev/gavin/hawkeye/useful/pyhawk/mycode/sample_client.py(53)<module>()->None
-> main()
(Pdb) c
Traceback (most recent call last):
File "sample_client.py", line 53, in <module>
main()
File "sample_client.py", line 33, in main
res = requests.get(url, data=params, headers=headers)
File "/home/gavin/dev/gavin/hawkeye/useful/pyhawk/local/lib/python2.7/site-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
function goinit {
export GOROOT=/usr/local/Cellar/go/1.2.1/libexec
if [ $# -lt 1 ]
then
echo "No directories were created."
export GOPATH=$(pwd -P)
export PATH=$PATH:$GOPATH:$GOPATH/bin
else
echo "$1 being created"
mkdir $1