Cloud-oriented Life

Cloud Native Technology Improves Lives

Terraform Aliyun Monitor Examples

Examples about using Terraform Alibaba Cloud Provider to manage alarm rules and monitor sites.

Github: https://github.com/CloudoLife/terraform-aliyun-monitor-examples

Read more »

asdf and Node.js Plugin

asdf is a single CLI tool for managing multiple runtime versions. It extend with a simple plugin system to install your favourite language: Dart, Elixir, Flutter, Golang (Go), Java, Node.js, Python, Ruby …

This article is about how to use asdf and Node.js plugin to install multiple Node.js versions on macOS with the Homebrew package manager.

Read more »

OSSImport is a free tool created by the Alibaba Cloud product team to assist with data backup and migration into the Alibaba Cloud Object Storage Service (OSS). Using OSSImport data can be migrated from either local storage or from third party cloud platforms. Currently supported data sources include Qiniu, Baidu BOS, AWS S3, Azure Blob, Youpai Cloud, Tencent Cloud COS, Kingsoft KS3, HTTP, and other OSS buckets.

Read more »

migration_comments

Using MigrationComments, you can simply add comments during your migrations. Or if you already have existing data structures, just add the comments afterwards in a separate migration. And of course you can always modify and delete these comments in later migrations.

So where are these comments used? Firstly, they will be included in your schema.rb dump which is where your IDE (e.g. RubyMine, VS Code) should be learning about your model structure. This means that they’ll be available at any point in your project. Additionally, if you are using the 'annotate’ gem, these comments will be added to the annotations that are generated within your model.rb file.

Read more »

Github or Gitlab use ~/.ssh/id_rsa as the default SSH private key. But sometimes you need more accounts than one for access to Github or Gitlab and similar tools. For example you can have one account for your projects at home and second account for your company.

There are three ways to Use multiple SSH private keys within git commands.

Read more »

rails_semantic_logger

Semantic Logger is a comprehensive Rails logging interface that enables human and machine readable logging outputs.

  • Colorful text log files for humans to read.

  • JSON log files containing all Semantic information that machines can easily comsume.

  • Write to multiple output destinations at the same time.

  • Forward logs to a centralized logging system, via JSON output or built-in appenders.

Read more »

FAQs about SCP

zsh report errors no matches found while zsh uses scp to transfer files with wildcards

1
2
$ scp [email protected]:/Users/cloudolife/.ssh/* ~/.ssh/
sh: no matches found: [email protected]:/Users/cloudolife/.ssh/*

The reason is because zsh tries to expand *. No matches error will be reported when the file cannot be found locally.

There are two approaches:

Option 1, Avoid zsh to expand *

  • Add a backslash() before * to prevent escaping

    1
    $ scp [email protected]:/Users/cloudolife/.ssh\* ~/.ssh/
  • Or, Enclose the path (or the path including the server) with single or double quotes

    1
    2
    3
    4
    # Single quotation mark, including server address
    scp '[email protected]:/Users/cloudolife/.ssh/*' ~/.ssh/
    # Double quotation mark, without server address
    scp [email protected]:"/Users/cloudolife/.ssh/*" ~/.ssh/

But sometimes the above two methods using wildcards for local paths are invalid, then refer to next:

Option 2, Switch to /bin/bash

/bin/bash does not have the problem of expanding *.

1
$ chsh -s /bin/bash

zsh 使用scp传输文件时使用通配符报错_SimonLiu的博客-CSDN博客

FAQs about using Vagrant for building and managing virtual machine environments

Vagrant is a tool for building and managing virtual machine environments in a single workflow. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases production parity, and makes the “works on my machine” excuse a relic of the past.

There are some FAQs about Vagrant.

Read more »
0%