Skip to content

Instantly share code, notes, and snippets.

View kirschem's full-sized avatar

Marcel Kirsche kirschem

  • Freiburg, Germany
View GitHub Profile
@popravich
popravich / PostgreSQL_index_naming.rst
Last active July 19, 2024 06:03
PostgreSQL index naming convention to remember

The standard names for indexes in PostgreSQL are:

{tablename}_{columnname(s)}_{suffix}

where the suffix is one of the following:

  • pkey for a Primary Key constraint;
  • key for a Unique constraint;
  • excl for an Exclusion constraint;
  • idx for any other kind of index;
@2xAA
2xAA / iterm-colors-to-vscode.js
Last active July 8, 2024 08:23
Convert iTerm2 "itermcolors" file to VSCode terminal color scheme
/* Generate colors using: `plutil -convert json` in your terminal */
const col = [] // run your .itermcolors file through the above parser and replace the array with the output
function componentToHex(c) {
const hex = c.toString(16)
return hex.length === 1 ? `0${hex}` : hex
}
const mapping = {
'terminal.background':'Background Color',