Skip to content

Instantly share code, notes, and snippets.

View tsungtwu's full-sized avatar

Tsung Wu tsungtwu

View GitHub Profile
@tsungtwu
tsungtwu / Cloud Security Orienteering Checklist.md
Created August 28, 2021 18:55 — forked from ramimac/Cloud Security Orienteering Checklist.md
A Checklist of Cloud Security Orienteering

Cloud Security Orienteering: Checklist
by Rami McCarthy
via TL;DR sec

How to orienteer in a cloud environment, dig in to identify the risks that matter, and put together actionable plans that address short, medium, and long term goals.

Based on the Cloud Security Orienteering methodology.

Checklist

@tsungtwu
tsungtwu / docker-compose.yml
Last active September 6, 2021 03:11 — forked from adibenc/docker-compose.yml
example docker-compose.yml for kong, postgres and konga, a bit fixes
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@tsungtwu
tsungtwu / cf-function-uri-rewrite.js
Created April 10, 2022 16:04
Use AWS CloudFront Functions for URI Rewrites
function handler(event) {
var request = event.request;
var rewrites = [
['/summer21','/recipies?year=2021&season=summer'],
['/recipies/homemade-mouse-and-cheese/', '/recipies/homemade-mac-and-cheese/'],
['/recipies/camping/grilling', '/recipies?activities=camping&with=grill']
]
for (var arrayIndex in rewrites){
if (request.uri == rewrites[arrayIndex][0]) {
@tsungtwu
tsungtwu / google-tips
Created July 15, 2022 08:53 — forked from qwo/google-tips
Google Recruiter Candidate Tips ..
xxx,
Thanks again for taking the time to speak with me and for sending me your information. I'm excited to tell you that we would like to move forward in the process!
One of our coordinators will be emailing you within the next week from an @google.com domain with the date and time of your phone interview. In the meantime, I've included some preparation materials (below.)
Please note this will be a technical interview that will last for approximately 45 minutes. Google takes an academic approach to the interviewing process. This means that we are interested in your thought process, your approach to problem solving as well as your coding abilities. You may be asked questions that relate to technical knowledge, algorithms, coding, performance, how to test solutions, and perhaps your interest in Google products. The best advice that I can give you is to treat the interview like a conversation, talk through the problems, and please feel free to ask the interviewer if you are not clear with any of the questio
@tsungtwu
tsungtwu / latency.txt
Created August 15, 2022 14:54 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD