Skip to content

Instantly share code, notes, and snippets.

@santarinto
santarinto / .dockershell.sh
Created May 6, 2022 06:17 — forked from arctic-hen7/.dockershell.sh
ZSH configuration for nice Docker shells in Alpine
# Note: for this to do anything, use my starter Dockerfile config (https://gist.github.com/arctic-hen7/10987790b86360820e2790650e289f0b)
# This file contains ZSH configuration for your shell when you interact with a container
# (we wouldn't want any boring `sh` now would we?)
# Please feel free to set up your own ZSH config in here!
# It gets mapped to your `.zshrc` for the root user in the container
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
@santarinto
santarinto / postgresql-13.md
Created June 10, 2021 13:41
PostgreSQL 13 Overview

PostgreSQL 13

Major features:

  • Оптимизация хранения и производительности за счет дедупликации в B-tree индексах.
  • Улучшение производительности запросов с использованием агрегатов или работающих с партицонированными таблицами.
  • Улучшенное планирование запросов с использованием расширенной статистики.
  • Параллельное вакуумирование индексов.
CREATE OR REPLACE FUNCTION test1(in_array jsonb)
RETURNS text[] AS $$
DECLARE
js jsonb := in_array;
i jsonb;
result_ids TEXT[];
uuid text;
state text;
version text;
@santarinto
santarinto / example.html
Created March 15, 2021 16:36 — forked from zserge/example.html
This is the smallest possible CSS-in-JS that supports all CSS rules, media queries, keyframes and generates unique class names for each CSS block. Can be used with React or with any other framework.
<body>
<script type="module">
import { css } from './zercss.js';
// Global styles
css`
&{} /* This would be a global CSS */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { max-width: 40rem; padding: 2rem; margin: auto; }
`;
@santarinto
santarinto / .gitconfig
Created February 24, 2021 16:35 — forked from XilefNori/.gitconfig
gitconfig
[user]
# name = yourname
# email = [email protected]
[merge]
tool = vimdiff
[mergetool]
keeptemporaries = false
keepbackups = false