ftmesh

The ftmesh project is used to read a font and transform it in a list of triangles (i.e. ft → font; list of triangles → mesh).

The handling and math are based on the ftgles project.

The library loads FreeType fonts or any other font supported by the FreeType library and which supports vectors. It then transforms the polygons in meshes. A single character may be represented by multiple meshes; for example, the character "i" has a dot which has to be a separate mesh to work as expected.

The advance in a string takes the kerning in account if present.

Note: the library ...

In the last few days, I worked with, let's call him John, who read my post on my DNS issues in Aug 15, 2020 (I was spammed pretty bad by an amplification DNS attack). John wanted to run iplock on his system because it's much more flexible than directly using iptables with fail2ban. So I made sure that it would compile on Ubuntu 20.04 and he made it work on his system by also copying the dependencies (i.e. the shared libraries).

Here we present John's log on how to install iplock on a computer from a compiled version, opposed to directly from a package. The problem is that I ...

Prinbee

Prinbee

Snap! Database — a diverse database system for the Snap! CMSThe Snap! C++ Content Management System makes use of a distributed database system called Prinbee.

The Prinbee system automatically duplicates the data saved in it, allowing for distribution of the data as well as automatic backup. It works within one data center, separate clusters, and large computers for backing up the data.

The database supports a JavaScript like language (see the as2js project) used for two main purposes:

  1. Verify that the data is valid for the column
  2. Generate a key used by indexes to sort rows as required by your application

Tunneling with SSH

Today I had a need to connect my local VPS at my office to a VPS at DigitalOcean. Not only that, the DigitalOcean runs the service I wanted to connect to on a separate network. Here is an example of the network (the IPs are fake, of course):

Creating an SSH Tunnel between a VPS and Local Service on a Remote Computer

Snap! Release 1.8

Today I created a new release, version 1.8. You can find it on github.

This includes a ton of bug fixes that 1.7 was plagued with. It also includes new code (thread pool/thread worker) and especially, a break up of several objects from the libsnapwebsites to their own contrib projects.

This includes:

  • snapdev (18 header only functions from the libsnapwebsites)
  • addgetopt (snap_config.cpp/.h)
  • cppthread (snap_thread.cpp/h)
  • snaplogger (log.cpp/h)
  • eventdispatcher (snap_communicator.cpp/h)
  • snapcatch2 (our own catch project compatible with our projects)
  • ...

Shredded leaves — we can also shred your files!

Introduction to Shred

In the last two days, I worked on a Jira task I had assigned to me in link with shredding files. Whenever you purge our project, it deletes a lot of files, including all the logs, configuration files, etc. By default, though, the purge command will just do:

rm -rf <path> ...

This generally works, only it is much better if you can also make sure that the content of the file is not recoverable. Under Unix systems, it often has been close to impossible to recover files because the OS was very quick at over reusing the just released blocks for new data. Not ...

When I first start of Snap!, I had one project, the snapwebsites folder.

As I started growing the project, I wanted to have some features that required other modules such as the log4cplus library to handle logging.

The fact is that as a result the library (read: common code to all the Snap! Website services) as grown to be a really large one! Difficult to manage and each time a small change is made, we incur a long wait for rebuilding everything.

So we started working on breaking up the library in smaller parts. We already have some functional projects which now encompass some of the low ...

Event Dispatcher

The Event Dispatcher LogoIntroduction

The Event Dispatcher library is a low level C++ library used to communicate between local and remote services.

For communication, the library supports TCP, UDP (direct and broadcast), Unix pipes.

The event part also supports events from Unix signals and the File System.

Each one of these objects can also be given a timeout date or an elapse time to generate ticks.

Most of the components of the Event Dispatcher library were developed in the libsnapwebsites library. It was detached from that library so we could make use of its powerful features in other projects.

C++ Thread

Introduction

The C++ Thread project is the snap_thread.cpp/.h moved in its own project.

We also will include any multi-thread related code to this project as we find it in our other libraries.

The project allows for easy thread manipulation and communication which makes it really easy to add multitasking to your projects. It also includes a thread pool with workers which we want to ameliorate to allow for concurrent programming rather than parallel programming, very much based on the Go environment.

Snap Logger

The Snap! Logger Project

Snap Logger LogoOriginally, this project was a break up of the log.cpp and log.h from the libsnapwebsites to its own project. However, that implementation had a dependency on log4cplus which has all sorts of drawbacks for our Snap! environment. Don't get me wrong, up to here, it served us well and log4cplus version 1.2.x works very well.

That being said, our way of handling configuration files, the fact that we like to use fork() and a few other things, made us think that having our own implementation of a logger would improve our general environment quite a bit. This newer version of the logger is the result.

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly