Home avatar

Deokgon Kim

Compare Cloud Storage

My journey to cloud storage.
I have used ownCloud for decades. It was running on AWS EC2 Ubuntu 16.04 for years.
But I recently upgraded my EC2 to Ubuntu 24.04 and then ownCloud stopped working.

So I need to change my cloud storage service.

There are big major players like Google Drive, Apple iCloud and etc.

These two has critical problems for me.

  • Google Drive: When using on Linux, It is slow, and mount is not completely implemented in shell environment(showing arbitrary alphanumeric names not actual filename)
  • Apple iCloud: I use Mac, but I use Linux 95% of my life. I don’t think iCloud client works perfectly on linux.

I have installed and testing S3Drive and it disappointed me.
So, I want another solution. The software list below is provided by ChatGPT
I thoroughly visited the web site, and checked for my requirements.

Configuring Postfix to use with AWS SES

I use AWS SES to send email to internet from home network.
So, here is brief configuration note.

# AWS SES SMTP endpoint
relayhost = [email-smtp.ap-northeast-2.amazonaws.com]:587

# enable SASL authentication
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

# enable TLS
smtp_use_tls = yes

create /etc/postfix/sasl_passwd

Make Ollama to Listen Any

Make ollama to listen on 0.0.0.0 instead of 127.0.0.1(default)

So that other hosts can talk to ollama

I installed ollama on lxc container, so I need to make my host machine or other container can use ollama running on the other container.

Firefox Smart Bookmark

์˜ˆ์ „ ๋ฒ„์ „์— Firefox์—์„œ๋Š”, Smart Bookmark๋ผ๊ณ , ์ตœ๊ทผ ๋ถ๋งˆํฌํ•œ ํ•ญ๋ชฉ ๊ฐ€์žฅ ๋งŽ์ด ๋ฐฉ๋ฌธํ•œ ํŽ˜์ด์ง€ ๋“ฑ์ด ๊ธฐ๋Šฅ์œผ๋กœ ์ œ๊ณต๋˜์—ˆ์œผ๋‚˜, ์ตœ์‹ ๋ฒ„์ „์—๋Š” UX ๋‹จ์ˆœํ™”๋ฅผ ์œ„ํ•ด ํ•ด๋‹น ํด๋”๊ฐ€ ์—†์–ด์ง„ ๊ฑธ๋กœ ๋ณด์ž…๋‹ˆ๋‹ค.

๊ทธ๋ž˜์„œ, ์ „์— ์ž์ฃผ ์‚ฌ์šฉ๋˜๋˜ Smart Bookmark ์ฃผ์†Œ ํ˜•์‹์„ ์ผ๋ถ€ ๋ฉ”๋ชจํ•ด ๋‘ก๋‹ˆ๋‹ค. (๊ณต์‹ ๋„ํ๋ฉ˜ํ…Œ์ด์…˜์€ ์ œ๋Œ€๋กœ ์ฐพ์„ ์ˆ˜๊ฐ€ ์—†๋Š” ๋“ฏํ•ฉ๋‹ˆ๋‹ค.)

# Recently Bookmarked
place:queryType=1&sort=12&maxResults=10

# Most Visited
place:queryType=0&sort=8&maxResults=10

# Recent History
place:queryType=0&sort=4&maxResults=15

# Recently Visited Pages
place:queryType=0&sort=5&maxResults=10
# All bookmarks
place:queryType=1

# ์ตœ๊ทผ ์ˆ˜์ •ํ•œ ๋ถ๋งˆํฌ
place:queryType=1&sort=13&maxResults=10

# ์ด๋ฆ„์ˆœ ๋ถ๋งˆํฌ ์ •๋ ฌ
place:queryType=1&sort=1

# ํƒœ๊ทธ๋œ ๋ถ๋งˆํฌ๋งŒ
place:queryType=1&terms=&excludeQueries=1
# ์˜ค๋Š˜ ๋ฐฉ๋ฌธํ•œ ํŽ˜์ด์ง€
place:queryType=0&beginTimeRef=1&sort=4

# ์ตœ๊ทผ 7์ผ ๋ฐฉ๋ฌธ๊ธฐ๋ก
place:queryType=0&beginTimeRef=1&beginTime=-7&sort=4

# ๋ฐฉ๋ฌธ ํšŸ์ˆ˜ ๋งŽ์€ ์ˆœ
place:queryType=0&sort=8
# ๋ชจ๋“  ํƒœ๊ทธ ๋ชฉ๋ก
place:type=7&sort=1

# ํŠน์ • ํƒœ๊ทธ๊ฐ€ ๋ถ™์€ ๋ถ๋งˆํฌ
place:queryType=1&tag=ํƒœ๊ทธ์ด๋ฆ„

๊ฐ’ ์˜๋ฏธ 1 ์ œ๋ชฉ์ˆœ 4 ์ตœ๊ทผ ๋ฐฉ๋ฌธ์ˆœ 5 ๋ฐฉ๋ฌธ ๋‚ ์งœ์ˆœ 8 ๋ฐฉ๋ฌธ ํšŸ์ˆ˜์ˆœ 12 ์ตœ๊ทผ ๋ถ๋งˆํฌ ์ถ”๊ฐ€์ˆœ 13 ์ตœ๊ทผ ์ˆ˜์ •์ˆœ

Debugging `serverless-offline` with vscode debugger

When using vscode as a IDE and the framework is serverless-offline.
If you try to debug typescript code with breakpoint, it may not work properly.

Set up serverless-esbuild configuration in serverless.yml

custom:
  esbuild:
    bundle: true
    platform: node
    target: node18
    sourcemap: true          # THIS WILL MAKE THE BREAKPOINTS ON TS FILE WORK
    sourcesContent: true
    keepNames: true
  • IDE: vscode
  • Framework: serverless
  • Local runtime: serverless-offline
    • Run local debug server with
      sls offline
  • Development language: typescript
  • Build with: serverless-esbuild

In normal case, any node process can be debugged with vscode with JavaScript Debug Terminal. but, when running sls offline, it seems the debugger session is attached to the process but the breakpoints are not working. After several googling, there were try launch.json configuration, use SLS_DEBUG and etc.

2024 Nov Cloud Project

  • What I first wanted : I want to use Telegram and WhatsApp as order notification channel
  • Originally, I used to use plain Lambda function. This time I will try express(https://expressjs.com/) + serverless lambda

    • serverless yaml : I uses httpApi integration
      functions:
        api:
          handler: src/index.handler
          events:
            - httpApi: '*'
    • index.ts snippet
      const express = require("express");
      const serverless = require("serverless-http");
      
      const app = express();
      
      app.use(express.json());
      app.use(express.urlencoded({ extended: true }));
      
      app.use('/telegram', require('./telegram/route')); // Use the routes
      app.use('/twilio', require('./twilio/route')); // Use the routes
      
      // module.exports.handler = serverless(app);
      module.exports = {
        handler: serverless(app),
        app,
      }
  • Set up the React frontend