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 …

It's Flying!

Here is how I learned to fly a quadcopter:

 

Good to know it actually can fly :) Up until now I was not sure about it.

This is the second version of the quadcopter. The first one didn't work because I had chosen components that were not supposed to work together …

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 …

It Seems That My First Quadcopter Is Ready

OK, it looks like I've finished assembling and configuring my first quadcopter. At least, it takes off the floor and seems to do it smoothly (finally!). Here is a short video:

Now I only have to wait for appropriate weather. Currently in Moscow it's about -2 C (29 F) and …

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 …