Skip to content

Instantly share code, notes, and snippets.

View pedrozok's full-sized avatar

Pedro Landeiroto pedrozok

View GitHub Profile
@pedrozok
pedrozok / db-client.ts
Created January 28, 2025 19:18 — forked from ikupenov/db-client.ts
Intercepting Drizzle db calls
import { and, type DBQueryConfig, eq, type SQLWrapper } from "drizzle-orm";
import { drizzle } from "drizzle-orm/postgres-js";
import postgres, { type Sql } from "postgres";
import { type AnyArgs } from "@/common";
import {
type DbClient,
type DbTable,
type DeleteArgs,
[
{
"name": "Hydrogen",
"appearance": "colorless gas",
"atomic_mass": 1.008,
"boil": 20.271,
"category": "diatomic nonmetal",
"density": 0.08988,
"discovered_by": "Henry Cavendish",
"melt": 13.99,
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
plugins=(git)
source $ZSH/oh-my-zsh.sh
export pyenv_root="$home/.pyenv"
[[ -d $pyenv_root/bin ]] && export path="$pyenv_root/bin:$path"
call plug#begin('~/.vim/plugged')
" Defaults
Plug 'tpope/vim-sensible'
" Themes
Plug 'joshdick/onedark.vim'
Plug 'morhetz/gruvbox'
Plug 'nanotech/jellybeans.vim'
Plug 'overcache/NeoSolarized'
" Fuzzy file search
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
@pedrozok
pedrozok / clojure-learning-list.md
Created March 23, 2024 18:41 — forked from ssrihari/clojure-learning-list.md
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
@pedrozok
pedrozok / init.vim
Created December 8, 2020 15:00 — forked from celso/init.vim
Neovim setup for OSX users
syntax on
set ruler " Show the line and column numbers of the cursor.
set formatoptions+=o " Continue comment marker in new lines.
set textwidth=0 " Hard-wrap long lines as you type them.
set modeline " Enable modeline.
set esckeys " Cursor keys in insert mode.
set linespace=0 " Set line-spacing to minimum.
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J)
" More natural splits
set splitbelow " Horizontal split below current.
.art
.r2
.structure
.head
.circle
.line-1
.line-2
.body
.armpit
$stroke : #1F3969
$bg : white
$main : #F6F9FD
.art
max-width: 600px
max-height: 600px
background: $bg
box-shadow: 0px 3px 20px rgba(0,0,0,0.2)
border-radius: 3px
.art
.r2
.structure
.head
.circle
.line-1
.line-2
.body
.armpit