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
Last active November 3, 2024 22:17
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 3, 2024 22:48
My .vimrc
set nocompatible " required
filetype off " required
syntax on
set background=dark
set backspace=indent,eol,start
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()