Skip to content

Instantly share code, notes, and snippets.

View vboykox's full-sized avatar

Volodymyr Boiko vboykox

  • Львів, Україна
View GitHub Profile
@vboykox
vboykox / self-signed-certificate-with-custom-ca.md
Created January 14, 2022 20:10 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096

Basic

  • Don't try "unprivileged" build from start.
    • First do cross-dirs/cross-tools/cross-distrib as root (sudo).
    • Then change owner/mode of obj directories. This will make development easier.
  • Always use cross build (for development).
    • Otherwise you'll overwrite your /usr/include during build.
    • Cross build can't make release on OpenBSD, unfortunately (because of gnu/, where Makefile.bsd-wrapper is used). So cross build is only for development.
@vboykox
vboykox / vim-gitblame
Last active December 10, 2021 13:33
while in the blame window, CTRL+] shortcut will show git show for commit the cursor is on. Then CTRL+O will get back to the git blame. Note lcd on start - command will work even when you are not in the git dir.
fun! GbSyncLines(is_ow2bw)
let l:ow = getbufvar(+expand('<abuf>'), 'origWindow')
let l:bw = getbufvar(+expand('<abuf>'), 'blameWindow')
let l:origLine=line('.', win_getid(l:ow))
let l:blameLine=line('.', win_getid(l:bw))
if a:is_ow2bw == 1
eval win_execute(win_getid(l:bw), "windo call cursor(" . l:origLine . ", 0)")
else
eval win_execute(win_getid(l:ow), "windo call cursor(" . l:blameLine . ", 0)")
endif