關於網路那些事...

Marketing, SEO, Web trends, Programming tutorial, Web design, and Life event...

Golang: 解決 Go Websocket upgrade:websocket: request origin not allowed by Upgrader.CheckOrigin 跨域問題

Golang: 解決 Go Websocket upgrade:websocket: request origin not allowed by Upgrader.CheckOrigin 跨域問題 錯誤訊息: upgrade:websocket: request origin not allowed by Upgrader.CheckOrigin 原因: 如內文所述,在 Go Websocket 判別跨域來源不合法 解決方式: 需要在 websocket.Upgrader 設定 CheckOrigin 來源,例如下方允許所有來源

Continue Reading

使用 Aws Copilot CLI 部署 AWS ECS

AWS Copilot CLI 是一個開源的 CLI ,可以方便地用於管理 AWS App Runner, AWS ECS, AWS Farget. 只要透過簡單的指令就可搭建起 containerized application, 在本文會先介紹 ECS 以及如何透過 Copilot 來部署應用到 ECS 。 AWS ECS 簡介 AWS ECS(Elastic Container Service) 是一個簡單且高擴充的 container cluster 管理服務, 可以透過 task definnition 定義 container 並且直接運行在 serverless infrastructure (Fargate),或者可以選用 EC2 來做更多的調控。

Continue Reading

Elasticsearch Cluster shards and replicas 常見問題

這邊列出幾個常見的 shards & replicas 問題及流程機制:

Continue Reading

Linux 安裝及配置 Elasticsearch cluster

本文紀錄 Linux 安裝及配置 Elasticsearch 單節點以及 cluster 流程:

Continue Reading

Elasticsearch 常見索引操作彙整

這裡記錄一些 Elasticsearch 常用的索引操作方式,方便之後查詢參考

Continue Reading

Elasticsearch 核心概念及機制說明

這裡記錄一些 Elasticsearch 核心概念及機制說明:

Continue Reading

Getting Started With Tmux

Tmux install and quickly start

Tmux is a terminal multiplexer that can run multiple programs in one terminal. There is powerful to manage several programs in the remote server in one terminal, and using the session to attach or detach them. A prefix is an advanced tool that supports split windows and quick short keys.

That’s getting the start for how to using tmux. Here will showing common usage about tmux.

Continue Reading

What Is Sli Slo Sla and User Facing

A service provider probably has a technology-related service contract with the client to promise about the service level availability and usability.

Here we will discuss service level terminology about SLI/SLO/SLA and User-Facing:

Continue Reading

How to setting mysql long query log to recording slow query

How to setting mysql long query log to recording slow query

Database slow query is a normalized case in operation situation. For example, if a new feature in production has a long data loading time, we can check this situation in the application log or database slow query.

Here, is how to set MySql slow query log.

Continue Reading

Saltstack introduction - How to install salt master and salt minion

Saltstack is an automatic configuration management tool, easy extension infrastructure, and high performance.

Using Saltstack can easy to manage large-scale servers, include dynamic connections, can be used for remote/local execution, config management, etc.

Continue Reading

Flutter - How to solve VSCode not show iOS simulator device

When running Xcode and iOS simulator, open VSCode does not show the iOS device but has Android emulator options.

How to show iOS simulator in VSCode?

Continue Reading

Flutter - How to solve the error of Unable to load asset for local images

Why unable to load asset for local images and how to load local images

How to solve the problem of “another exception was thrown: Unable to load asset:” in flutter?

Here is the step for flutter how to load local images:

First, for use asset image in local, image location should be add in pubsec.yaml

Continue Reading

Getting start with Dart before Flutter

Flutter tutorial: Getting start with Dart

Dart is created by Google in 2011, and can be use for web, server, mobile, and IoT, also can be use to develop Flutter.

Here we will present a quickly short guid for let you understand what is Dart and how to use it. For more detail about Dart can reference tour of basic Dart program.

Continue Reading

Install flutter in mac and build first project

This tutorial will demonstrate how to install flutter in Mac and build the first app with Xcode.

To install flutter and develop the app, we need to check environment meet minimum requirements

  • Disk space: 2.8 G
  • macOS 64-bit
  • Xcode

Continue Reading

How to customerize the Live Sass Compiler settings for CSS output path and formats

In Visual Studio Code, I’m using the Live Sass Compiler and Live Server (both plugins are developed by Ritwick Dey) for the development HTML project.

After install Live Sass compiler and Liver Server, the quickly functional button “Watch Sass” and “Go Live” will show in the VSCode bottom status list.

Continue Reading

How download videos or live streaming from Azure Media Service content

Here is a tutorial for download video or streaming from Azure Media Service content.

Azure Media Player provides one player to support multiple devices and formate and integration content protection.

Azure media service is provided a stream solution with Azure Media Player, Azure media service is using manifest as streaming info contains the file.

When we need to download content from Azure media, first, we need to get the manifest URL,

Continue Reading

Golang - Using Cobra to build your CLI Application

Cobra is a golang library for creating CLI applications and is using by Kubernetes, Hugo, and Github CLI..

Here we will show how to use cobra to build a CLI app.

Continue Reading

Golang - Get Global Environment Variable From Bash Profile (~/.bash_profile)

In golang project, we may need to call os environment variable for security purposes in OSX or Linux.

Here will showing how to set global environment and get value in our golang project.

Continue Reading

Golang Tutorial : Introduction Gin HTML template and how integration with bootstrap

Introduction Gin HTML template and how integration with bootstrap

Gin is going web framework which include server-side render template, we can transfer variable into a template and render by double braces {{ … }}.

In this article, We will introduce how to use gin template, finally will include how to integrate bootstrap with gin HTML template.

Continue Reading

Github Action Auto Ssh to Host and Execute Script

Github action use SSH to access remote host and execute a script In this article, we will use 6 steps to illustrate how to use Github action to access a remote server and execute the shell script.

Continue Reading