Skip to content

Instantly share code, notes, and snippets.

View ngtrieuvi92's full-sized avatar
🎯
Focusing

Vi Nguyen ngtrieuvi92

🎯
Focusing
View GitHub Profile
@ngtrieuvi92
ngtrieuvi92 / README-Template.md
Created September 20, 2023 16:28 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@ngtrieuvi92
ngtrieuvi92 / update-git.sh
Created August 7, 2021 08:10 — forked from YuMS/update-git.sh
Update git to latest version on Ubuntu
#!/bin/bash
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y
@ngtrieuvi92
ngtrieuvi92 / configuring_cors_s3.md
Created June 29, 2021 08:03 — forked from simonw/configuring_cors_s3.md
Configuring CORS on Amazon S3 for direct image upload from JavaScript
@ngtrieuvi92
ngtrieuvi92 / mysql-docker.sh
Created June 1, 2020 07:24 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@ngtrieuvi92
ngtrieuvi92 / redis-clear
Created December 26, 2019 07:55 — forked from dimasch/redis-clear
Clear a redis cache in Docker
docker exec -it container-name redis-cli FLUSHALL
@ngtrieuvi92
ngtrieuvi92 / curl.sh
Created December 13, 2019 06:47 — forked from exAspArk/curl.sh
Test CORS with cURL
curl -I -X OPTIONS \
-H "Origin: http://EXAMPLE.COM" \
-H 'Access-Control-Request-Method: GET' \
http://EXAMPLE.COM/SOMETHING 2>&1 | grep 'Access-Control-Allow-Origin'
@ngtrieuvi92
ngtrieuvi92 / cloudSettings
Created November 8, 2019 01:08 — forked from augustine-tran/cloudSettings
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-07-17T14:10:31.682Z","extensionVersion":"v3.4.0"}
@ngtrieuvi92
ngtrieuvi92 / README.md
Created September 22, 2019 01:50 — forked from simov/README.md
Run `node` scripts using `nvm` and `crontab` without hardcoding the node version

Run node scripts using nvm and crontab without hardcoding the node version

cronjob.env.sh

#!/bin/bash

# NVM needs the ability to modify your current shell session's env vars,
# which is why it's a sourced function
@ngtrieuvi92
ngtrieuvi92 / .htaccess
Created October 24, 2018 08:47 — forked from alexsasharegan/.htaccess
Apache Config for React Router
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]