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 / gt-engine-n8n-workflow.json
Last active May 22, 2024 09:54
Pet Project: GT News - a simple tool broadcast news use N8N & Raindrop
{
"name": "GT-Engine-Workflow",
"nodes": [
{
"parameters": {},
"id": "a668af24-5543-4f2a-808e-bf69b81667b5",
"name": "When clicking \"Execute Workflow\"",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
@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 / mysst-enable-node-service.sh
Last active July 1, 2021 13:47
Mysterium network enable node #myst
sudo apt update; sudo apt install myst
sudo systemctl stop mysterium-consumer.service # stop current consumer service
sudo systemctl disable mysterium-consumer.service # disable consumer service so it doesn't start again automatically
sudo systemctl enable mysterium-node.service # enable node service
sudo systemctl start mysterium-node.service # start node service
@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 / remove-tracking-branches-no-longer-on-remote.sh
Created November 30, 2020 03:13
Remove tracking branches no longer on remote #git #shel
git fetch -p && for branch in $(git branch -vv | grep ': gone]' | awk '{print $1}'); do git branch -D $branch; done
@ngtrieuvi92
ngtrieuvi92 / curl-response-time.sh
Created July 9, 2020 07:32
curl response time
curl -o /dev/null -s -w %{time_total}\\n https://google.com
@ngtrieuvi92
ngtrieuvi92 / update-email-from-user-name.sql
Created June 9, 2020 10:27
sql-update-witth-concat-string #sql #masking
update user set email = IFNULL (CONCAT( username , "@geekup.io" ), "[email protected]")
@ngtrieuvi92
ngtrieuvi92 / autorestart-nginx.sh
Created June 2, 2020 11:21
[watch and reboot nginx] #nginx #autorestart
STATUS="$(systemctl is-active nginx)"
if [ "${STATUS}" = "active" ]; then
echo "Execute your tasks ....."
curl --retry 3 https://hc-ping.com/<>
else
echo " Service not running.... so exiting "
systemctl start nginx
curl --retry 3 https://hc-ping.com/<>
fi
@ngtrieuvi92
ngtrieuvi92 / letencrypt.sh
Created June 2, 2020 11:15
[Let's Encrypt for Nginx on Ubuntu 16.04 - SSL Config] #ssl #https #letencrypt
# Install certbot
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-nginx
# Setting up Nginx
# Set server_name for your site
sudo nano /etc/nginx/sites-available/default
. . .
server_name example.com www.example.com;