Skip to content

Instantly share code, notes, and snippets.

View tshak's full-sized avatar
🚀
Focusing

Tim Shakarian tshak

🚀
Focusing
  • TSHAK Enterprises
View GitHub Profile
@tshak
tshak / zig_arraylist_segfault.zig
Last active February 17, 2024 09:44
Zig ArrayList Not Safe :(
const std = @import("std");
pub fn main() !void {
var list = std.ArrayList(u21).init(std.heap.page_allocator);
try list.append(1);
list.deinit();
// Seg fault :(
std.debug.print("{}", .{list.items[0]});
@tshak
tshak / kcfg.yaml
Created August 5, 2020 12:54
Example kconfig with always failing readiness probe
apiVersion: serving.knative.dev/v1
kind: Configuration
metadata:
name: testdummy
namespace: apps
spec:
template:
metadata:
name: testdummy
spec:
@tshak
tshak / gist:768b68049bb66ce7d93a90ecc1b52004
Created March 6, 2019 14:33
Merge kube config bash func
# Merges a kube config into your existing kube config
# Based on https://github.com/kubernetes/kubernetes/issues/46381#issuecomment-461404505
kmerge() {
if [[ -z "$1" ]]; then
echo "usage 'kmerge newKubeConfig'"
exit 1
fi
cp ~/.kube/config ~/.kube/config.old
KUBECONFIG=~/.kube/config:$1 kubectl config view --flatten > ~/.kube/mergedkub && mv ~/.kube/mergedkub ~/.kube/config
@tshak
tshak / describeStuckPod.txt
Created October 2, 2018 13:16
Voyager stuck pod repro: kube describe po
Name: voyager-repro-5c65d99685-f84xr
Namespace: default
Node: ip-172-20-119-215.us-east-2.compute.internal/172.20.119.215
Start Time: Tue, 02 Oct 2018 15:07:51 +0200
Labels: origin=voyager
origin-api-group=voyager.appscode.com
origin-name=repro
pod-template-hash=1721855241
Annotations: ingress.appscode.com/last-applied-annotation-keys=
kubernetes.io/limit-ranger=LimitRanger plugin set: cpu request for container haproxy
@tshak
tshak / repro.yml
Last active October 1, 2018 15:02
Voyager Ingress for Stuck Ingress Pod repro
apiVersion: v1
kind: Service
metadata:
labels:
app: repro
name: repro
namespace: default
spec:
ports:
- port: 8080
@tshak
tshak / apex-up-golang-native-benchmarks.md
Last active March 7, 2018 12:01
Apex Up Native Golang Benchmarks

Introduction

The following is a very rough set of benchmarks to get an initial sense of the performance difference between up with the nodejs shim and with using native Go support in Lambda. While not rigorous, the summary conclusion is that other than warmup there is not a sigdifference between the two to warrent more rigorous testing.

Methodology

This test utilized up 0.5.4 as well as a custom version that only utilizes native Go support in Lambda. The testing was done with the simple Golang example app found in the documentation in eu-west-3. An EC2 instance in the same region ran various tests using Vegeta using stock AWS Ubuntu 16.04 image with the ulimit increated to 65000. After a clean up deploy, a 3 second warmup at 10RPS

Keybase proof

I hereby claim:

  • I am tshak on github.
  • I am tshak (https://keybase.io/tshak) on keybase.
  • I have a public key ASBd6ErPjb0hcj3Wa1f-Kf6BFXzZV6x81zkzDmqDrA9tXAo

To claim this, I am signing this object: