As configured in my dotfiles.
start new:
tmux
start new with session name:
{ | |
"scripts": { | |
// ... | |
"db:migrate:up": "bun run -r dotenv/config ./src/lib/db/migrate latest", | |
"db:migrate:down": "bun run -r dotenv/config ./src/lib/db/migrate down", | |
"db:migrate:create": "bun run -r dotenv/config ./src/lib/db/migrate create initial", | |
"db:generate:types": "bunx kysely-codegen --out-file=src/lib/db/schema/Database.ts", | |
}, | |
"dependencies": { | |
"kysely": "^0.27.3", |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/bin/bash | |
# bash script that can setup environment with common linting and testing tools | |
yes="${@}" | |
function yes_or_no { | |
if [[ $yes == "-y" ]]; then | |
echo "🛑👍🛑 !!! skipping question !!! 🛑👍🛑" | |
else |
import Head from 'next/head' | |
import { useState } from 'react'; | |
const Home = (props) => { | |
let [email, setEmail] = useState(''); | |
const handleChange = (event, set) => set(event.value) | |
const addSubscribe = async () => { | |
#!/bin/bash | |
unsplash_user=$1 | |
if ! [ -x "$(command -v feh)" ]; then | |
echo 'Error: feh is not installed.' >&2 | |
exit 1 | |
fi | |
if ! [ -x "$(command -v wget)" ]; then | |
echo 'Error: wget is not installed.' >&2 |
#!/usr/bin/env bash | |
# screenshots stuff | |
# TODO: docs | |
function help_and_exit { | |
if [ -n "${1}" ]; then | |
echo "${1}" | |
fi | |
cat <<-EOF |
const handleOpenPdf = url => { | |
const link = document.createElement('a') | |
link.href = url | |
link.target = '_blank' | |
document.body.appendChild(link) | |
link.click() | |
document.body.removeChild(link) | |
} |
" vim-bootstrap | |
"***************************************************************************** | |
"" Vim-PLug core | |
"***************************************************************************** | |
let vimplug_exists=expand('~/.vim/autoload/plug.vim') | |
let g:vim_bootstrap_langs = "html,javascript,python" | |
let g:vim_bootstrap_editor = "vim" " nvim or vim |
call plug#begin("~/.vim/plugged") | |
" Theme | |
Plug 'mhartington/oceanic-next' | |
" Language Client | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
let g:coc_global_extensions = ['coc-emmet', 'coc-css', 'coc-html', 'coc-json', 'coc-prettier'] | |
" File Explorer with Icons | |
Plug 'scrooloose/nerdtree' | |
Plug 'ryanoasis/vim-devicons' |