This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// I'm tired of extensions that automatically: | |
// - show welcome pages / walkthroughs | |
// - show release notes | |
// - send telemetry | |
// - recommend things | |
// | |
// This disables all of that stuff. | |
// If you have more config, leave a comment so I can add it!! | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Based off IETF draft, https://datatracker.ietf.org/doc/draft-peabody-dispatch-new-uuid-format/ | |
create or replace function uuid_generate_v7() | |
returns uuid | |
as $$ | |
begin | |
-- use random v4 uuid as starting point (which has the same variant we need) | |
-- then overlay timestamp | |
-- then set version 7 by flipping the 2 and 1 bit in the version 4 string | |
return encode( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- Helper function to produce a diff of two jsonb values. | |
-- | |
-- Accepts: | |
-- val1: original jsonb value | |
-- val2: updated jsonb value | |
-- | |
-- Returns: | |
-- jsonb of changed values | |
-- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function range(start, finish, step = 1) { | |
if (step < 1) throw "Step must be ge 1" | |
return { | |
[Symbol.iterator]: function* () { | |
let count = 1; | |
yield start | |
if (start !== finish) { | |
let tmp = start; | |
if (start < finish) { | |
while (tmp < finish) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Alternatively don't use slog but something else. I just like that more. | |
[aliases] | |
slog = log --pretty=format:"%C(auto,yellow)%h%C(auto)%d\\ %C(auto,reset)%s\\ \\ [%C(auto,blue)%cn%C(auto,reset),\\ %C(auto,cyan)%ar%C(auto,reset)]" | |
addprx = "!f() { b=`git symbolic-ref -q --short HEAD` && \ | |
git fetch origin pull/$1/head:pr/$1 && \ | |
git fetch -f origin pull/$1/merge:PR_MERGE_HEAD && \ | |
git rebase --onto $b PR_MERGE_HEAD^ pr/$1 && \ | |
git branch -D PR_MERGE_HEAD && \ | |
git checkout $b && echo && \ | |
git diff --stat $b..pr/$1 && echo && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Alexey Kachayev, 2014 | |
## Link to slides: | |
## http://goo.gl/n4ylC4 | |
## Basic: | |
## type Parser = String -> Tree | |
## Composition | |
## type Parser = String -> (Tree, String) |
NewerOlder