Skip to content

Instantly share code, notes, and snippets.

View taynguyen's full-sized avatar

Tay Nguyen taynguyen

  • Dwarves Foundation
  • Ho Chi Minh city
View GitHub Profile
https://www.simplilearn.com/tutorials/docker-tutorial/how-to-install-docker-on-ubuntu#steps_for_installing_docker_on_ubuntu
@taynguyen
taynguyen / Include-jquery-to-devtool.md
Last active June 24, 2023 05:45
Include jquery to devtool
var jqry = document.createElement('script');
jqry.src = "https://code.jquery.com/jquery-3.7.0.min.js";
document.getElementsByTagName('head')[0].appendChild(jqry);
// jQuery.noConflict();
@taynguyen
taynguyen / launch.json
Created December 20, 2022 13:14
VSCode debug typescript with ts-node launch configuration
{
"version": "0.2.0",
"configurations": [
{
"name": "Ts-Node Debug",
"type": "node",
"request": "launch",
"runtimeExecutable": "node",
"runtimeArgs": ["-r", "ts-node/register"],
@taynguyen
taynguyen / add-linux-user.md
Last active October 25, 2021 07:49
Add linux user

We can now add a user to handle the exporting of our metrics.

  • -r This user will be a system user (-r)
  • -s /bin/false who will be unable to get a shell (-s /bin/false)
sudo useradd -rs /bin/false node_exporter
@taynguyen
taynguyen / Polygon-mumbai-faucet.md
Last active September 6, 2021 10:07
Get some token from Polygon mumbai

create user dbuser with encrypted password '<your_pwd>';

grant all privileges on database yourdb to dbuser;

@taynguyen
taynguyen / gist:9e46f21ffaeee79d21d0d38f5d85efc9
Created January 22, 2021 04:20
How I cleanup about 150 Gb storage of my macbook
How I cleanup about 150 Gb storage of my macbook.
- Currently, I used mac book that have 256Gb SSD. On an beautiful day, I opened the Storage check, and see that I only have 30Gb left. That's quite shocking. This is my working laptop, shouldn't have any thing that too heavily effect on volumn.
After some check I found that 2 big monster that eaten my volume:
- Docker: When you used docker, after a while, you would have tons of images, containers, volume, those things are very big on size. So, I use `prune` to clean up all my obsoleted images, containers, volumes.
- The Cache: The mother of monster is here: `/Users/<your_username>/Library/Caches/`. So, I run: `rm -rf /Users/taynguyen/Library/Caches/`, it takes about 15mins to completed.
Boom, I recovered about 140Gb of my SSD.
What's fun thing. :D
@taynguyen
taynguyen / gist:1758bd193d9c3462a21ae961c23c5c91
Created December 23, 2020 11:27
Mount your ebs volumn ec2
https://devopscube.com/mount-ebs-volume-ec2-instance/
```
server {
server_name taynguyen.dev;
location / {
proxy_pass http://127.0.0.1:8080;
}
}