Skip to content

Instantly share code, notes, and snippets.

View stockmind's full-sized avatar

Simone Roberto Nunzi stockmind

View GitHub Profile
in cli for local db
-Install postgres (one time only for the psql cli tools)
-Install pg in the working folder of code(postgres for node) npm install pg
-createdb nameofdb
-Install knex in the working folder of code npm install knex (-g first time)
-knex init (gives you the knexfile -see below)
-knex migrate:make 'nameofmigrationsfile' <-- then edit
-knex migrate:latest
-optional for seeding- knex seed:make 'nameofseedfile' <--then edit
@stockmind
stockmind / git-sync-all-branches.sh
Created October 15, 2019 14:02 — forked from piaoger/git-sync-all-branches.sh
git-sync-all-branches
# fetch all branches
# From: http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches
#!/bin/bash
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do
git branch --track ${branch##*/} $branch
done
git fetch --all
# sxhkd config for Linux: Command+Arrow keys macOS style shortcut
super + @{Left,Right}
xte 'keyup Super_L' 'key {Home,End}'
super + shift + @{Left,Right}
xte 'keyup Super_L' 'key {Home,End}'