Skip to content

Instantly share code, notes, and snippets.

View ChenTsungYu's full-sized avatar
🚀

TSUNG YU CHEN ChenTsungYu

🚀
View GitHub Profile

Intro

So your dashboard is slow? We are doing our best but maybe it's time to think if the issue isn't on your side.

Some of our dashboards looks like https://www.theworldsworstwebsiteever.com/. Are you sure you really need to see all the time all the data? Or do you really need to see data for last week or month all the time? How often do you use filtering by some of those variables in your dashboard?

Let's not end up as your mother saying:

But.. but.. I might need this in future so let's leave this icon on the Desktop.

@ChenTsungYu
ChenTsungYu / bash_strict_mode.md
Created November 5, 2024 15:47 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@ChenTsungYu
ChenTsungYu / GitCommitBestPractices.md
Created November 19, 2022 02:50 — forked from luismts/GitCommitBestPractices.md
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

-- PROJECT-DIRECTORY/
-- modules/
-- <service1-name>/
-- main.tf
-- variables.tf
-- outputs.tf
-- provider.tf
-- README
-- <service2-name>/
-- main.tf
@ChenTsungYu
ChenTsungYu / ghost-page-404.markdown
Created September 3, 2022 02:21
Ghost Page | 404
@ChenTsungYu
ChenTsungYu / tmux-cheatsheet.markdown
Created September 16, 2021 16:49 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ChenTsungYu
ChenTsungYu / aws-lambda-unzipper.py
Created May 12, 2021 10:56 — forked from msharp/aws-lambda-unzipper.py
unzip archive from S3 on AWS Lambda
import os
import sys
import re
import boto3
import zipfile
def parse_s3_uri(url):
match = re.search('^s3://([^/]+)/(.+)', url)
if match:
return match.group(1), match.group(2)
@ChenTsungYu
ChenTsungYu / ingest node example
Created April 21, 2021 13:38 — forked from spinscale/ingest node example
ingest node example
DELETE _all
PUT _ingest/pipeline/rename_hostname
{
"processors": [
{
"rename": {
"field": "hostname",
"target_field": "host",
"ignore_missing": true
@ChenTsungYu
ChenTsungYu / runtime-fields.json
Created April 21, 2021 13:38 — forked from spinscale/runtime-fields.json
Elastic Bytes - Runtime fields
##################
# Runtime fields #
##################
GET /
DELETE orders
PUT orders
{
@ChenTsungYu
ChenTsungYu / elk.sh
Created April 14, 2021 07:26 — forked from mingderwang/elk.sh
Bash Script to Install Elastic Search, Logstash and Kibana
#!/bin/bash
# your have to add hostname after script command, ether "elk1", "elk2", or "elk3"
if [ $# -eq 1 ]
then
echo "my hostname: $1"
MY_HOSTNAME=$1
else
echo "Usage: ./elk.sh HOSTNAME, where HOSTNAME is an argument as a unique hostname for the elasticsearch cluaster, ether "elk1", "elk2", or "elk3" "
exit
fi