Posts categorized under: General

GCC: How To Suppress a Warning in a Single Line of Code

TIL that GCC allows to suppress a given type of warnings in a single line of code. Here is an example:

InMemoryStorage::InMemoryStorage() {
    if(pthread_rwlock_init(&_rwlock, NULL) != 0)
        throw std::runtime_error("pthread_rwlock_init() failed");
}

InMemoryStorage::~InMemoryStorage() {
    if(pthread_rwlock_destroy(&_rwlock) != 0) {
        // suppress 'throw will always call terminate() [-Wterminate]'
        #pragma GCC diagnostic push …

How To Uninstall Ubuntu Touch And Restore Android

Hi! Today I would like to share a small cheat sheet on how to uninstall Ubuntu Touch and restore Android on your smartphone.

Firstly, find and download a proper Android build from here. In my case it was occam-lmy48t-factory-c43c7cfd.zip since my smarphone is Nexus 4.

Secondly, make sure you …

TLS: Not Actually Secure?

Here is a little observation I would like to share.

Chromium says that TLS is secure

Chromium says that the connection to my blog is secure. However, what does "secure" mean? For instance, can someone conduct a MITM attack - intercept cookies or modify pages content? Well, TLS should guard against such attacks. In theory.

In practice …