This file contains hidden or 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
syntax enable | |
set number | |
set mouse=a | |
set title | |
set numberwidth=4 | |
set clipboard=unnamed | |
set showcmd | |
set ruler | |
set encoding=utf-8 | |
set showmatch |
This file contains hidden or 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
/* Firefox Only */ | |
@supports (-moz-appearance: none) {} | |
/* Chromium Only */ | |
@supports (contain: paint) and (not (-moz-appearance: none)) {} | |
/* Chromium + Firefox */ | |
@supports (contain: paint) {} | |
/* Chromium + Safari */ |
This file contains hidden or 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 toVal(mix) { | |
var k, y, str=''; | |
if (typeof mix === 'string' || typeof mix === 'number') { | |
str += mix; | |
} else if (typeof mix === 'object') { | |
if (Array.isArray(mix)) { | |
for (k=0; k < mix.length; k++) { | |
if (mix[k]) { | |
if (y = toVal(mix[k])) { | |
str && (str += ' '); |
This file contains hidden or 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
const MS = { | |
SECOND: 1000, | |
MINUTE: 1000 * 60, | |
HOUR: 1000 * 60 * 60, | |
DAY: 1000 * 60 * 60 * 24, | |
} as const | |
function getTimeSinceTweet(tweetDate: Date): string { | |
const currentDate = new Date() | |
const diff = currentDate.getTime() - tweetDate.getTime() |
This file contains hidden or 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
CREATE SCHEMA snowflake; | |
CREATE DOMAIN snowflake.id AS bigint; | |
CREATE SEQUENCE snowflake.table_id_seq; | |
CREATE OR REPLACE FUNCTION snowflake.next_id(shard_id smallint default 1) | |
RETURNS snowflake.id | |
AS $$ | |
DECLARE |