Cloud-oriented Life

Cloud Native Technology Improves Lives

Pallet

The Substrate Node Template provides a minimal working runtime which you can use to quickly get started building your own custom blockchain. The Node Template includes a number of components, including a runtime that is constructed using FRAME runtime development framework. However, in order to remain minimal, it does not include most of the modules (called “pallets”) from Substrate’s set of core FRAME pallets.

This guide will show you how you can add the Nicks pallet. You can follow similar patterns to add additional FRAME pallets to your runtime, however you should note that each pallet is a little different in terms of the specific configuration settings needed to use it correctly. This tutorial will help you understand what you’ll need to consider when adding a new pallet to your FRAME runtime.

Read more »

Install Substrate and run Substrate node on macOS

Substrate is an open source, modular, and extensible framework for building blockchains.

Substrate has been designed from the ground up to be flexible and allow innovators to design and build a blockchain network that meets their needs. It provides all the core components you need to build a customized blockchain node.

This page will guide you through the 2 steps needed to prepare a macOS for Substrate development.

Read more »

air

When I get started with developing websites in Go and Iris or Gin framework, it’s a pity that gin lacks live-reloading.

Air is yet another live-reloading command line utility for Go applications in development. Just air in your project root directory, leave it alone, and focus on your code.

Read more »

Redis client for Golang

go-redis is a Type-safe Redis client for Golang.

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs, geospatial indexes, and streams. Redis has built-in replication, Lua scripting, LRU eviction, transactions, and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.

Read more »

error

In error handling in the Go language, errors are an important part of the software package API and application user interface. Errors are returned as a normal return value.

In this article, we are going to explore error handling before Go 1.13.

Read more »

panic(v interface{}) and recover() interface{}

In the Go language, an error is considered an expected result, but an exception is an unexpected result. An exception may indicate that there is a Bug in the program or other uncontrollable problems have occurred.

If an error is encountered during internal recursive code, an exception will be thrown to quickly jump out of the deeply nested function call, and then the outermost interface will capture panic through recover, and then return the corresponding error message.

Read more »

rack-mini-profiler

rack-mini-profiler gem is a middleware that displays speed badge for every html page. Designed to work both in production and in development.

Features

  • Database profiling - Currently supports Mysql2, Postgres, Oracle (oracle_enhanced ~> 1.5.0) and Mongoid3 (with fallback support to ActiveRecord)

  • Call-stack profiling - Flame graphs showing time spent by gem

  • Memory profiling - Per-request memory usage, GC stats, and global allocation metrics

Read more »
0%