avatar

Andres Jaimes

Creating a simple static library

This article describes how to create a simple static library using C++. A static library is a collection of object files that are linked with and copied into a target application at compile time. The resulting executable contains all the object code …

Creating a simple dynamic library

This article describes how to create a simple shared library using C++. A shared library is a collection of object files that are linked with and loaded into a target application at runtime. The resulting executable contains only the object code that …

Common git commands

Imagine you’re working on a project that’s stored in a remote Git repository. Your first step is to clone the repository using the command git clone git@github.com:some-account/some-project.git.

Once you’ve cloned the repository, …

Generate a random string using the console

Generate a random string using the command line:

1cat /dev/urandom | tr -cd [:graph:] | head -c 32

On OSX, the previous command might return a tr: Illegal byte sequence error, so try:

1export LC_ALL=C; cat /dev/urandom | tr -cd [:graph:] | head -c 32 …

Undoing the Last Git Commit

A command so important, it deserves its own page:

1git reset --soft HEAD~1

The previous command undoes the last commit to git. I think this is one of those commands that I have typed many times during the last year. It’s very important to know …

Installing Rancher on Ubuntu/Docker

On this article we are going to install a rancher server on Ubuntu. Let’s start by getting the rancher image from docker hub:

1sudo docker run -d --restart=always -p 8080:8080 --name=rancher-server rancher/server

Go to http://ip-address:8080 …