Cloud-oriented Life

Cloud Native Technology Improves Lives

MetalLB

MetalLB is an open source, rock solid LoadBalancer. It handles the ServiceType: Loadbalancer for bare metal Kubernetes clusters, using standard routing protocols.

This article is about how to use Pulumi, kubernetes (K8S) provider, Helm Chart and TypeScript SDK to deploy MetalLB within Kubernetes (K8S).

Read more »

PlantUML

PlantUML is an open-source tool allowing users to create diagrams from a plain text language that allows to quickly write :

  • Sequence diagram

  • Usecase diagram

  • Class diagram

  • Activity diagram (here is the legacy syntax)

  • Component diagram

  • State diagram

  • Object diagram

  • Deployment diagram

  • Timing diagram

PlantUML Server is a web application to generate UML diagrams on-the-fly.

This article is about how to use Helm to deploy PlantUML Server on Kubernetes (K8S).

Read more »

hexo-generator-baidu-sitemap

Hexo is a fast, simple & powerful blog framework. It use plugins to provide features powerful APIs for limitless extensibility. Various plugins are available to support most template engines (EJS, Pug, Nunjucks, and many others). Easily integrate with existing NPM packages (Babel, PostCSS, Less/Sass, etc).

hexo-generator-baidu-sitemap plugin will generate Baidu sitemap.xml files for Hexo pages, posts, categories, tags.

Installation

Use npm to install hexo-generator-baidu-sitemap package.

1
2
3
$ npm install hexo-generator-baidu-sitemap --save

$ hexo clean

Configuration

It will generate baidusitemap.xml in the public folder by default after hexo-generator-baidu-sitemap installation.

You can configure this plugin in ./_config.yml.

1
2
baidusitemap:
path: baidusitemap.xml

The follow is the options:

  • path - Sitemap path. (Default: baidusitemap.xml)

Finally, you can visit <Your Site Url>/baidusitemap.xml in the browser, and check whether the baidusitemap.xml works correctly after Hexo restarted or regenerated.

References

[1] coneycode/hexo-generator-baidu-sitemap: Baidu Sitemap generator plugin for Hexo - https://github.com/coneycode/hexo-generator-baidu-sitemap

[2] Build and submit a sitemap  |  Google Search Central  |  Google Developers - https://developers.google.com/search/docs/advanced/sitemaps/build-sitemap

[3] Hexo - https://hexo.io/

goworker

goworker is a Resque-compatible, Go-based background worker that runs 10 to 100,000* times faster than Ruby-based workers. It allows you to push jobs into a queue using an expressive language like Ruby while harnessing the efficiency and concurrency of Go to minimize job latency and cost.

goworker workers can run alongside Ruby Resque clients so that you can keep all but your most resource-intensive jobs in Ruby.

goworker - https://www.goworker.org/

Read more »

scenic

Scenic adds methods to ActiveRecord::Migration to create and manage database views in Rails.

Using Scenic, you can bring the power of SQL views to your Rails application without having to switch your schema format to SQL. Scenic provides a convention for versioning views that keeps your migration history consistent and reversible and avoids having to duplicate SQL strings across migrations. As an added bonus, you define the structure of your view in a SQL file, meaning you get full SQL syntax highlighting in the editor of your choice and can easily test your SQL in the database console during development.

Read more »

helm-alidns-webhook-cert-manager-example

Alidns-webhook-cert-manager is a cert-manager plugin to manage SSL certificates on Kubernetes.

Along with Nginx Ingress, you can configure HTTPS access to the website. With Let’s Encrypt provide free SSL certificates, all the free packs of cert-manager + Nginx Ingress + Let’s Encrypt are automatic generated. But cert-manager does not support Alidns(Alibaba Cloud’s DNS) by default.

You can modify it and use Alidns-webhook-cert-manager. There is some examplesabout installing it with Helm in the article.

Read more »

helm-cert-manager-example

cert-manager is a native Kubernetes certificate management controller. It can help with issuing certificates from a variety of sources, such as Let’s Encrypt, HashiCorp Vault, Venafi, a simple signing key pair, or self signed.

You can modify it and use cert-manager. There is some examplesabout installing it with Helm in the article.

Read more »

hexo-word-counter

Hexo is a fast, simple & powerful blog framework. It use plugins to provide features powerful APIs for limitless extensibility. Various plugins are available to support most template engines (EJS, Pug, Nunjucks, and many others). Easily integrate with existing NPM packages (Babel, PostCSS, Less/Sass, etc).

hexo-word-counter plugin will count symbols and time to read for Hexo articles.

Installation

Use npm to install hexo-word-counter package.

1
2
3
$ npm install hexo-word-counter --save

$ hexo clean

Configuration

You can set options of hexo-word-counter in the Hexo’s _config.yml (which locates in the root dir of your blog):

1
2
3
4
5
6
7
8
9
10
# _config.yml
symbols_count_time:
symbols: true
time: true
total_symbols: true
total_time: true
exclude_codeblock: false
awl: 4
wpm: 275
suffix: "mins."

If symbols_count_time option is not specified, the default parameters will be used.

Parameters

  • awl – Average Word Length (chars count in word). Default: 4. You can check this here.

    • CN ≈ 2

    • EN ≈ 5

    • RU ≈ 6

  • wpm – Words Per Minute. Default: 275. You can check this here.

    • Slow ≈ 200

    • Normal ≈ 275

    • Fast ≈ 350

  • suffix – If time to read less then 60 minutes, added suffix as string parameter.

    If not defined, mins. will be used as default.

  • exclude_codeblock – Allow to exclude all content inside code blocks for more accurate words counting.

    If not defined, false will be used as default.


Note for Chinese users: because in Chinese language average word length about ~1.5 and if you at most cases write posts in Chinese (without mixed English), recommended to set awl to 2 and wpm to 300.
But if you usualy mix your posts with English, awl to 4 and wpm to 275 will be nice.


NexT theme

This plugin integrated in «NexT» and after plugin enabled in main Hexo config, you may adjust options in NexT config:

1
2
3
4
5
6
7
# _config.next.yml

# Post wordcount display settings
# Dependencies: https://github.com/next-theme/hexo-word-counter
symbols_count_time:
separated_meta: true
item_text_total: false

Finally, you can visit your site in the browser, and check whether the site works correctly after Hexo restarted or regenerated.

References

[1] GitHub - next-theme/hexo-word-counter: ⏰ Symbols count and time to read of articles for Hexo. - https://github.com/next-theme/hexo-word-counter

[2] Hexo - https://hexo.io/

You can apply for the free JetBrains Products(IntelliJ IDEA, Clion, PyCharm, RubyMine, etc) License with your Open Source projects.

JetBrains will check the history of recent commits in your Open Source project. To approve the request, they need to see that regular commits have been made for the past 3 months or more. For an Open Source license renewal, they need to see how the granted licenses have been used throughout the past year.

Read more »

Configration

Hexo is a fast, simple & powerful blog framework. It use plugins to provide features powerful APIs for limitless extensibility. Various plugins are available to support most template engines (EJS, Pug, Nunjucks, and many others). Easily integrate with existing NPM packages (Babel, PostCSS, Less/Sass, etc).

By default, there are the following configuration(YAML or JSON) files in Hexo:

  • _config.yml

  • config[theme].yml

  • themes/[theme]/_config.yml

We can directly modify the above configuration file, but this is a litter intrusive for Hexo.

Recommend to use alternate site or theme configuration to minimal invasive site and theme configuration in Hexo.

Read more »
0%