added memo

This commit is contained in:
Nik Afiq 2025-08-23 01:07:13 +09:00
parent 48e1760230
commit 6d8ecb3368
4 changed files with 54 additions and 2 deletions

3
memo/ffmpeg-command.md Normal file
View File

@ -0,0 +1,3 @@
```bash
ffmpeg -ss 00:01:00 -to 00:02:30 -i input.mp4 -c copy output.mp4
```

43
memo/spanner-setting.md Normal file
View File

@ -0,0 +1,43 @@
## Install gcloud cli
https://cloud.google.com/sdk/docs/install
## Run spanner docker
https://cloud.google.com/spanner/docs/emulator#start-emulator-gcloud
### Set gcloud cli to point to local
```
export SPANNER_EMULATOR_HOST=localhost:9010
```
### Run spanner code on terminal
```
# Create instances
gcloud spanner instances create testinstance \
--config=emulator-config \
--description="Test Instance" \
--nodes=1
# Create database
gcloud spanner databases create testdb --instance=testinstance
# Create table
gcloud spanner databases ddl update testdb --instance=testinstance \
--ddl="CREATE TABLE Singers (
SingerId INT64 NOT NULL,
FirstName STRING(1024),
LastName STRING(1024),
SingerInfo BYTES(MAX)
) PRIMARY KEY (SingerId)"
```
### Connect to spanner through dbeaver
1. Install DBeaver CE (free) on Mac.
2. Install the Spanner JDBC driver.
3. Create a new connection → Google Cloud Spanner.
• Project ID: test-project
• Instance: testinstance
• Database: testdb
• set autoConfigEmulator to true

View File

@ -1,3 +1,8 @@
```
```bash
sudo ufw allow from 192.168.70.0/24 to any port 33060
```
```bash
sudo ufw status numbered
sudo ufw delete [number]
```

View File

@ -6,7 +6,8 @@ source <env-name>/bin/activate
deactivate
```
```
# Freeze requirement
```bash
pip freeze > requirements.txt
pip install -r requirements.txt
```