Skip to content

Instantly share code, notes, and snippets.

View mpokryva's full-sized avatar
🥷

Miki Pokryvailo mpokryva

🥷
View GitHub Profile
CREATE
TABLE
users(
id SERIAL PRIMARY KEY,
is_admin BOOLEAN
);
ALTER TABLE
users ENABLE ROW LEVEL SECURITY;
/*
** ---- Without RLS ---- **
1. Check if user is a member of the org
a. If so, execute the update query
b. Else, return a 404
*/
Org update(userId, orgId, updatePayload) {
if (dao.isOrgMember(userId, orgId)) {
CREATE
TABLE
users(
id SERIAL PRIMARY KEY
);
CREATE
TABLE
orgs(
id SERIAL PRIMARY KEY
@mpokryva
mpokryva / Default.json
Created November 26, 2020 19:53
iTerm 2 Profile
{
"Ansi 4 Color" : {
"Red Component" : 0.50980395078659058,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 1,
"Green Component" : 0.66666668653488159
},
"Tags" : [
@mpokryva
mpokryva / .zshrc
Last active November 26, 2020 19:52
zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@mpokryva
mpokryva / .vimrc
Last active November 5, 2020 18:38
My .vimrc
set nocompatible
filetype off
set number
filetype plugin indent on
syntax on
set backspace=indent,eol,start
" Keymappings
:imap <C-d> <C-[>diwi
" Plugins