Skip to content

Instantly share code, notes, and snippets.

View ivarkol's full-sized avatar
🏠
Working from home

Ivan ivarkol

🏠
Working from home
  • Kazan
View GitHub Profile
@ivarkol
ivarkol / self-signed-certificate-with-custom-ca.md
Created September 9, 2021 14:29 — 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
@ivarkol
ivarkol / paste_excel.js
Last active July 29, 2020 16:19 — forked from torjusb/paste_excel.js
Handle pasted text from Excel, and split it into arrays of rows and columns
var clipboardData = window.clipboardData || event.clipboardData || event.originalEvent && event.originalEvent.clipboardData;
var pastedText = clipboardData.getData("Text") || clipboardData.getData("text/plain");
if (!pastedText && pastedText.length) {
return;
}
// Parse the pasted text from Excel into rows.
// Pasted text is usually separated by a new line for each row,
@ivarkol
ivarkol / reload-config-postgresql.md
Created April 22, 2019 08:41 — forked from tralston/reload-config-postgresql.md
[Reload PostgreSQL config] After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. #postgres

After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. The easiest way to do this is by restarting the postgres service:

service postgresql restart

When the service command is not available (no upstart on Synology NAS, for example), there are some more creative ways to reload the config. Note this first one needs to be done under the user that runs postgres (usually the user=postgres).

user#  sudo su postgres
postgres#  pg_ctl reload
@ivarkol
ivarkol / .vimrc
Created March 9, 2019 13:14 — forked from JeffreyWay/.vimrc
My .vimrc file
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
@ivarkol
ivarkol / linux commands
Created January 19, 2019 14:40 — forked from wpupru/linux commands
Linux commands
Файлы и директории
cd /home - перейти в директорию '/home'
cd .. - перейти в директорию уровнем выше
cd ../.. - перейти в директорию двумя уровнями выше
cd - перейти в домашнюю директорию
cd ~user - перейти в домашнюю директорию пользователя user
cd - перейти в директорию, в которой находились до перехода в текущую директорию
pwd - показать текущюю директорию
ls - отобразить содержимое текущей директории