Skip to content

Instantly share code, notes, and snippets.

View uthark's full-sized avatar
🎯
Focusing

Oleg Atamanenko uthark

🎯
Focusing
View GitHub Profile
@uthark
uthark / gist:6bb436bc4af04242af4b0bd9ec4b9e5e
Last active October 19, 2023 15:51
ia newsletter issue
iA Newsletter
Subscribe to receive product updates, announcements, and a look behind the scenes. Select your newsletter menu:
Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /var/www/vhosts/ia.net/new.ia.net/wp-content/themes/iA-library/inc/components/newsletter.php:67 Stack trace:
#0 /var/www/vhosts/ia.net/new.ia.net/wp-content/themes/iA-library/inc/components/newsletter.php(67): in_array('writer', NULL) #1 /var/www/vhosts/ia.net/new.ia.net/wp-content/themes/iA-library/inc/default/functions.php(174): include('/var/www/vhosts...')
#2 /var/www/vhosts/ia.net/new.ia.net/wp-content/themes/iA-library/inc/default/functions.php(180): include_template_part('inc/components/...', '', Array)
#3 /var/www/vhosts/ia.net/new.ia.net/wp-content/themes/iA-library/single.php(92): include_component('newsletter', '', Array)
#4 /var/www/vhosts/ia.net/new.ia.net/wp-includes/template-loader.php(106): include('/var/www/vhosts...')
#5 /var/www/vhosts/ia.net/new.ia.net/wp-b
@uthark
uthark / pihole.yaml
Created October 7, 2021 04:43
Pi Hole Static Pod
apiVersion: v1
kind: Pod
metadata:
name: pihole
# namespace: pihole
spec:
hostNetwork: true
dnsPolicy: "None"
dnsConfig:
nameservers:
@uthark
uthark / lifecycle-partial.yaml
Created July 23, 2019 16:21
Lifecycle hook CNI Plugin
lifecycle:
preStop: # taint node before stop.
exec:
command:
- /bin/sh
- -c
- /usr/bin/lifecycle_hook.sh preStop
postStart: # untaint node after start.
exec:
command:
@uthark
uthark / lifecycle_hook.sh
Created July 23, 2019 16:20
Lifecycle hooks for CNI Plugin
#!/usr/bin/env bash
set -e
# Helper script to automatically taint/untaint node based on CNI condition.
# Used as a lifecycle hook for CNI Deployment.
# Tainting helps to prevent FailedCreatePodSandbox issue caused by long CNI Plugin startup/restart
# when there are pods scheduled on the nodes which doesn't have IP addresses assigned yet.
# Expected environment variables:
# MY_NODE_NAME - Name of the node.
@uthark
uthark / latency.txt
Created February 8, 2019 13:51 — 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
@uthark
uthark / istio-website-routing-v2.yaml
Created September 25, 2018 20:48
istio-website-routing-v2.yaml
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: website-gateway
spec:
selector:
# Which pods we want to expose as Istio router
# This label points to the default one installed from file istio-demo.yaml
istio: ingressgateway
@uthark
uthark / istio-website-routing.yaml
Created September 25, 2018 20:48
istio-website-routing.yaml
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: website-gateway
spec:
selector:
# Which pods we want to expose as Istio router
# This label points to the default one installed from file istio-demo.yaml
istio: ingressgateway
@uthark
uthark / istio-my-websites.yaml
Created September 25, 2018 19:18
istio-my-websites.yaml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: web-v1
namespace: default
spec:
replicas: 1
template:
metadata:
labels:

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@uthark
uthark / keybase.md
Last active October 11, 2018 20:52

Keybase proof

I hereby claim:

  • I am uthark on github.
  • I am uthark (https://keybase.io/uthark) on keybase.
  • I have a public key ASBjN8HJHpHxBGk5mz_ARsWNvX9yePyRMQ_RchuBzVzcbwo

To claim this, I am signing this object: