Have to create placeholder images in Go project?

Overview of the "Sticket" - a Golang library, that generate placehold images with text 
07 August 2017   1511
Go

Open source project developed by a team at Google and many contributors from the open source community.

All web developers one way or another have to deal with the layout. The task is to harmoniously arrange the content on the page (text, images, video, etc.), make it flexible, responsive, beautiful and appropriate design idea.

Placeholder images help all web developers to make their products pretty and suitable for any screensize. Let's learn how to generate placeholder images in Go project easily.

Sticker is a Go library, that  generate placeholder images with text.

Installation

Make sure you have a working Go environment.

To install sticker, simply run:

go get github.com/muesli/sticker

To execute it from source:

cd $GOPATH/src/github.com/muesli/sticker
go get -u -v
go build && go test -v

Example

gen, err := sticker.NewImageGenerator(sticker.Options{
    TTFPath:         "/usr/share/fonts/TTF/Roboto-Bold.ttf",
    MarginRatio:     0.2,
    Foreground:      color.RGBA{0x96, 0x96, 0x96, 0xff},
    Background:      color.RGBA{0xcc, 0xcc, 0xcc, 0xff},
    BackgroundImage: img,
})
img, err := gen.NewPlaceholder("Lorem ipsum!", 400, 200)
...
 

Sticker will automatically pick a suitable font size, so the text will always fit neatly inside the image.

If you supply a background image, it will automatically be cropped and scaled (while maintaining its original aspect ratio) to the desired output size.

Learn more and download Sticker from GitHub.

CockroachDB to Change License Type

The only restriction in new bundle of licenses is the ban on selling commercial versions of CockroachDB, made in the form of cloud services
05 June 2019   371

The developers of the distributed DBMS CockroachDB have announced the migration of the project source code into a bundle from the Business Source License (BSL) and Cockroach Community License (CCL), which is not free due to the discrimination of certain categories of users. The BSL license was proposed by MySQL co-founders three years ago as an alternative to the Open Core model. The essence of BSL is that the extended functionality code is initially available for making changes, but for a certain period of time it can be used for free only if the additional conditions are met that require a commercial license to be circumvented.

The new license allows the use of CockroachDB on any number of nodes in the cluster and embedding in applications, including those that are sold to customers or run as services. The only restriction that prevents the license from being considered free and open is the ban on selling commercial versions of CockroachDB, made in the form of cloud services. To issue a CockroachDB in the form of paid cloud services now requires the purchase of a commercial license.

As in the case of the re-licensing of MongoDB, Redis and TimescaleDB modules, the reason for the transition to a non-free license is the fight against the parasitization of cloud service providers who create derivative commercial products and resell open DBMS as cloud services but do not participate in the community and do not help in developing. It happens when the cloud providers, who are not related to the project, resell ready-made open solutions and benefit, but the developers are left with nothing.