Skip to content

Instantly share code, notes, and snippets.

View verfriemelt-dot-org's full-sized avatar
💭
🐘

ಠ_ಠ verfriemelt-dot-org

💭
🐘
View GitHub Profile
@verfriemelt-dot-org
verfriemelt-dot-org / fzf-gitbranch.sh
Last active July 9, 2022 17:08
fzf-gitbranch.sh
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
# set -o xtrace
trim_origin=false
include_local_branches=true
refs=()

psqlrc:

  • some infos at initial connect
  • predefined queries in ~/.psqlrc-include/ compiled by the _update.sh script into ~/.psqlrc-commands.sql which will be included within .psqlrc

image

typical worksetup:

  • portforwarding from remote to local host via ssh user@host -L 5432:127.0.0.1:5432
DROP TABLE IF EXISTS test CASCADE;
DROP FUNCTION IF EXISTS test2;
CREATE TABLE test (
a INTEGER NOT NULL,
b INTEGER NOT NULL
);
CREATE OR REPLACE FUNCTION test2() RETURNS TRIGGER AS $$
[
{ "keys": ["ctrl+shift+t"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["alt+shift+up"], "command": "swap_line_up" },
{ "keys": ["alt+shift+down"], "command": "swap_line_down" },
{ "keys": ["ctrl+shift+down"], "command": "duplicate_line" },
]