Skip to content

Instantly share code, notes, and snippets.

View hiepndd's full-sized avatar
🖖
I work on stuff in Go

hiepndd

🖖
I work on stuff in Go
View GitHub Profile
@huytd
huytd / webuild-til.txt
Created December 3, 2020 00:20
Every #til entries of WeBuild since 2016
This file has been truncated, but you can view the full file.
[5/5/2016, 1:52:07 AM] [alias Trung.Le, as tle]: #elixirlang <http://kipalog.com/posts/Chen-doi-tuong-vao-mot-List-theo-chieu-nguoc-voi-ham-List-insert_at-va-index-am>
[5/15/2016, 4:51:25 AM] []: #til: Maybe Just Nothing
[5/15/2016, 4:20:09 PM] [alias Trung.Le, as tle]: *TIL* technology does not only solve biz problems but also social and political problems too. Use it wisely for the good
[5/17/2016, 8:25:18 PM] [alias Trung.Le, as tle]: *TIL* JSON Octet là gì - <http://stackoverflow.com/questions/7200554/what-is-a-json-octet-and-why-are-two-required>
[5/17/2016, 8:31:39 PM] []: #til - Bỏ bữa khiến bạn béo bụng, ăn đủ bữa bằng các loại thức ăn có lợi cho sức khỏe là con đường đúng đắn nhất giúp bạn giảm cân thành công. :parrot:
[5/17/2016, 8:34:01 PM] []: #til Muốn hiểu vì sao, hãy tự đi tìm câu trả lời bằng cái mình tự khám phá là chính xác nhất. Chỉ nghe là không đủ.
[5/17/2016, 11:52:54 PM] [alias Trung.Le, as tle]: *TIL* sprocket trong Rails 3 khi khai báo manifest thì bạn không cần phải khai báo đầy đủ
@Phate6660
Phate6660 / rust recommendations and alternatives.md
Last active May 29, 2024 12:35
My growing list of Rust programs to use.
@max-rocket-internet
max-rocket-internet / prom-k8s-request-limits.md
Last active June 5, 2024 02:27
How to display Kubernetes request and limit in Grafana / Prometheus properly

CPU: percentage of limit

A lot of people land when trying to find out how to calculate CPU usage metric correctly in prometheus, myself included! So I'll post what I eventually ended up using as I think it's still a little difficult trying to tie together all the snippets of info here and elsewhere.

This is specific to k8s and containers that have CPU limits set.

To show CPU usage as a percentage of the limit given to the container, this is the Prometheus query we used to create nice graphs in Grafana:

sum(rate(container_cpu_usage_seconds_total{name!~".*prometheus.*", image!="", container_name!="POD"}[5m])) by (pod_name, container_name) /
@jimangel
jimangel / readme.md
Last active April 17, 2021 14:47
Examples of how to test the impact of the v1.16 API deprecations

Kubernetes v1.16 API deprecation testing

Examples of how to test the impact of the v1.16 API deprecations and ways to debug early!

If this is the first time you're hearing of these deprecations STOP and read this blog post (thanks @vllry!).

Common misunderstandings

  1. The exact apiVersion: value that I use in my manifest is stored on disk (etcd).

I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

@florentchauveau
florentchauveau / .gitlab-ci.yml
Last active March 30, 2024 05:21
GitLab CI yaml file for building docker images
# This is a GitLab CI configuration to build the project as a docker image
# The file is generic enough to be dropped in a project containing a working Dockerfile
# Author: Florent CHAUVEAU <florent.chauveau@gmail.com>
# Mentioned here: https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/
# do not use "latest" here, if you want this to work in the future
image: docker:20
stages:
- build
@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active June 25, 2024 13:22
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple:
@pantsel
pantsel / docker-compose.yml
Last active May 13, 2024 14:29
example docker-compose.yml for kong, postgres and konga
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@ibraheem4
ibraheem4 / postgres-brew.md
Last active June 28, 2024 18:57 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update