Skip to content

Instantly share code, notes, and snippets.

View snikulov's full-sized avatar
💭
I may be slow to respond.

Sergei Nikulov snikulov

💭
I may be slow to respond.
View GitHub Profile

Bitbake Cheatsheet

Verbose as possible

bitbake -vDDD your-recipe

List recipes

bitbake -s
@snikulov
snikulov / renew-gpgkey.md
Created May 18, 2023 20:24 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

Linux - Systemd cheatsheet

systemctl

Activates a service immediately:

systemctl start foo.service

Deactivates a service immediately:

@snikulov
snikulov / conan-CMakeList.txt-template-cmake-generator
Created May 29, 2020 21:42
Typical CMakeLists.txt file for conan package manager with CMake generator
cmake_minimum_required(VERSION 3.10)
project(ProjectUsingConan)
#
# Don't forget to use libstdc++11 in profile by issuing
# $ conan profile update settings.compiler.libcxx=libstdc++11 default
#
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
snikulov@snikulov-lin:~/work/check$ uname -a
Linux snikulov-lin 4.15.0-50-generic #54~16.04.1-Ubuntu SMP Wed May 8 15:55:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
snikulov@snikulov-lin:~$ cd work/
snikulov@snikulov-lin:~/work$ mkdir check
snikulov@snikulov-lin:~/work$ cd check
snikulov@snikulov-lin:~/work/check$ vim main.cpp
snikulov@snikulov-lin:~/work/check$ vim CMakeLists.txt
snikulov@snikulov-lin:~/work/check$ ls
CMakeLists.txt main.cpp
snikulov@snikulov-lin:~/work/check$ scan-build cmake .
CC=clang CXX=clang++ conan install .. \
-s compiler=clang -s compiler.version=< 5.0| your version number here> \
-s compiler.libcxx=<libstdc++ | libc++> --build=missing
@snikulov
snikulov / tree.md
Created October 11, 2017 14:17 — forked from hrldcpr/tree.md
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@snikulov
snikulov / dbm.c
Created September 27, 2017 14:26 — forked from athurg/dbm.c
a example code for gdbm using
/* db_add.c: storing
written by rock <shirock@residence.educities.edu.tw>, 1999.11.29
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <gdbm.h>
#define datum_set(um, buf) { um.dptr = buf; um.dsize = strlen(buf); }
@snikulov
snikulov / dbm.c
Created September 27, 2017 14:26 — forked from athurg/dbm.c
a example code for gdbm using
/* db_add.c: storing
written by rock <shirock@residence.educities.edu.tw>, 1999.11.29
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <gdbm.h>
#define datum_set(um, buf) { um.dptr = buf; um.dsize = strlen(buf); }
@snikulov
snikulov / GCC Include search paths
Created July 11, 2017 12:01
GCC Include search paths
GCC Include search paths
For C:
gcc -xc -E -v -
For C++:
gcc -xc++ -E -v -
shorter variant:
gcc -Wp,-v -x c++ - -fsyntax-only