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
@hiepndd
hiepndd / cheatsheet-elasticsearch.md
Created June 23, 2021 08:41 — forked from ruanbekker/cheatsheet-elasticsearch.md
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
# https://github.com/rama-nallamilli/kafka-prometheus-monitoring
# https://github.com/Yolean/kubernetes-kafka/blob/master/prometheus/10-metrics-config.yml
lowercaseOutputName: true
rules:
- pattern : kafka.network<type=Processor, name=IdlePercent, networkProcessor=(.+)><>Value
- pattern : kafka.network<type=RequestMetrics, name=RequestsPerSec, request=(.+)><>OneMinuteRate
- pattern : kafka.network<type=SocketServer, name=NetworkProcessorAvgIdlePercent><>Value
- pattern : kafka.server<type=ReplicaFetcherManager, name=MaxLag, clientId=(.+)><>Value
- pattern : kafka.server<type=BrokerTopicMetrics, name=(.+), topic=(.+)><>OneMinuteRate

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

@hiepndd
hiepndd / nginx-tuning.md
Created January 6, 2021 04:22 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@hiepndd
hiepndd / rust recommendations and alternatives.md
Created November 4, 2020 07:14 — forked from Phate6660/rust recommendations and alternatives.md
My growing list of Rust programs to use.
@hiepndd
hiepndd / timeZone.sql
Created July 14, 2020 09:05 — forked from Hazem-Ben-Khalfallah/timeZone.sql
[Timezone in postgresql] get and set timezone in #postgresql #sql
-- timezone abrev list
select * from pg_timezone_names ;
-- set timezone TO 'pg_timezone_names.name'
set timezone TO 'posix/Africa/Tunis'; --(GMT+01)
set timezone TO 'GMT'; --(UTC/GMT)
-- read current timezone:
SELECT current_setting('TIMEZONE')
@hiepndd
hiepndd / prometheus.yml
Created May 7, 2020 02:58 — forked from reachlin/prometheus.yml
sample prometheus configuration explained
// For all the confusing Prometheus configuration and
// regular expressions,
// explained in examples.
// Remember, there are default values for each item if it's missing.
// regex is (.*),
// replacement is $1,
// separator is ;
// ,and action is replace
@hiepndd
hiepndd / README.md
Created March 16, 2020 08:54 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


git tag -am "annotation goes here" tagname_goes_here # cut a tag
git tag -d tagname_goes_here # burn it
git tag -am "annotation goes here" tagname_goes_here # cut another tag
git push --tags # push tags to remote
git push origin :refs/tags/tagname_goes_here # delete tag from remote
@hiepndd
hiepndd / helm-cheatsheet.md
Created February 26, 2020 10:56 — forked from tuannvm/cka.md
#Helm #Kubernetes #cheatsheet, happy helming!