Skip to content

Instantly share code, notes, and snippets.

View hamann's full-sized avatar

Holger Amann hamann

  • nextjournal GmbH
View GitHub Profile
@dsouzajude
dsouzajude / postgres-dump-and-import-schema-without-indexes.sh
Last active October 17, 2024 13:06
Dump and import schema without indexes
# Read more about pg_dump, pre-data, post-data sections and the Fc flags at:
# https://www.postgresql.org/docs/13/app-pgdump.html
# -- Dump operations from Source Database --------------------------------------------
# Dumps the schema but excludes all the constraints and indexes (i.e pre-data section)
pg_dump -h $SOURCE_ENDPOINT --section=pre-data -U postgres -d $DB_NAME --file=schema-pre-data.dump.sql
# Dump the schema for the indices and constraints as well as we will need it later
# to apply it to the tables after the destination database is in sync.
@nblumoe
nblumoe / vim_fireplace_paredit_cheat_sheet.md
Created April 24, 2013 06:41
Simple cheat sheet for vim fireplace and paredit

fireplace

  • cpr => (require ... :reload)
  • cpR => (require ... :reload-all)

Evaluation

  • :Eval (clojure code) => runs (clojure code) in repl
  • cpp => evaluate inn-most expessions under cursor
  • cp<movement> => evaluate text described by <movement>
  • cqp => opens quasi-repl
  • cqc => quasi-repl command line window