Skip to content

Instantly share code, notes, and snippets.

View nhancv's full-sized avatar
🏠
Working from home

Nhan Cao nhancv

🏠
Working from home
View GitHub Profile

setup adb

Add platform-tools to your path

echo 'export ANDROID_HOME=/Users/$USER/Library/Android/sdk' >> ~/.bash_profile
echo 'export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools' >> ~/.bash_profile

Refresh your bash profile (or restart your terminal app)

source ~/.bash_profile
@nhancv
nhancv / video-station-language-injection.js
Created October 14, 2022 07:31 — forked from the-unsoul/video-station-language-injection.js
Inject a subtitle language into Synology - Video Station
(function() {
var synoLang;
var isSynoReady;
var additional = {
code : 'vie', // <== uses reference language list at the bottom and set the 'code' to the language you wanted
label: 'Tiếng Việt' // <== 'label' can be anything you wanted. i.e. if set to 'New lang 123' you will see 'New lang 123' in the list
}
@nhancv
nhancv / guide.md
Created June 3, 2020 05:04 — forked from mindlapse/guide.md
A guide on how to use PaymentIntents with tipsi-stripe

Introduction

Card payments with Stripe should be performed with PaymentIntents.

This API was created to handle modern payments, where the cardholder's bank may require the user to authenticate themselves with the bank before a payment can be authorized.

Authentication requirements first started to appear with European banks regulated by PSD2 which introduced [Strong Customer Authentication

@nhancv
nhancv / next_nginx.md
Created June 15, 2019 18:03 — forked from kocisov/next_nginx.md
How to setup next.js app on nginx with letsencrypt

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
# Unzip
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/