Skip to content

Instantly share code, notes, and snippets.

@namp10010
namp10010 / rdb_design.md
Created November 28, 2023 21:12
relational database design resources
@namp10010
namp10010 / go_cmd_globbing.md
Created November 28, 2023 20:20
go cmd matching globbing pattern
@namp10010
namp10010 / postgres.yaml
Created November 13, 2023 23:05
postgres docker-compose with init scripts and health check.
postgres_db:
image: postgres
deploy:
resources:
limits:
memory: 125M
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
healthcheck:
@namp10010
namp10010 / global-gitignore.md
Created September 29, 2022 05:36 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

@namp10010
namp10010 / docker_healthcheck.sh
Created September 20, 2022 06:46
check docker compose healthcheck status and output
#!/bin/bash
# checking docker healthcheck status and output
docker inspect --format "{{json .State.Health }}" your_container_name
@namp10010
namp10010 / curl_statuscode.sh
Created September 7, 2022 22:53
curl check status code
#!/bin/bash
curl -X GET -s -o /dev/null -w '%{http_code}' http://localhost:8080/healthz` -eq 200 || exit 1
@namp10010
namp10010 / go_ldflags.md
Created August 9, 2022 07:42
go build ldflags

Go ldflags

The ldflags is actually used for the link tool.

Flags as of v1.19

-B note
	Add an ELF_NT_GNU_BUILD_ID note when using ELF.
	The value should start with 0x and be an even number of hex digits.
@namp10010
namp10010 / GitCommitEmoji.md
Created August 4, 2022 05:48 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@namp10010
namp10010 / README.md
Created August 4, 2022 05:47 — 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.


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?