asdasd
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
# | |
# Name: nginx-tls.conf | |
# Auth: Gavin Lloyd <[email protected]> | |
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating | |
# | |
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related | |
# to SSL/TLS are omitted here. | |
# | |
# Example: https://www.ssllabs.com/ssltest/analyze.html?d=gavinhungry.io | |
# |
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 OR REPLACE FUNCTION table_update_notify() RETURNS trigger AS $$ | |
DECLARE | |
id UUID; | |
BEGIN | |
IF TG_OP = 'INSERT' OR TG_OP = 'UPDATE' THEN | |
id = NEW.id; | |
ELSE | |
id = OLD.id; | |
END IF; | |
PERFORM pg_notify('table_update', json_build_object('table', TG_TABLE_NAME, 'type', TG_OP, 'record', NEW, 'prev', OLD)::text); |
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
import {using, list, h, spec, handler} from 'effector-dom' | |
const noop = () => {} | |
function JustList($list, {title = noop, content = noop, item = noop}) { | |
h('div', () => { | |
h('h3', () => { | |
title() | |
}) | |
h('ul', () => { |
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
// eslint-disable-next-line no-magic-numbers | |
const TOKEN_UPDATE_TIME_MS = 5 * 60 * 1e3; | |
const abortTimerToRefreshToken = createEvent(); | |
const timerToRefreshToken = createEffect(); | |
const $canRequestToken = combine( | |
refreshToken.pending, |
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 d = createDomain(); | |
d.onCreateStore((store) => { | |
store.updates.watch((value) => { | |
console.log(`STORE ${store.shortName} UPDATED`, value); | |
}); | |
}); | |
d.onCreateEvent((event) => { | |
event.watch((parameters) => { |
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 routes = [ | |
{ | |
name: "auth.login", | |
path: "/login", | |
component: LoginPage, | |
guards: [checkAuthn({ auth: false, redirectTo: "home" })], | |
}, | |
{ | |
name: "transactions.list", | |
path: "/transactions", |
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
[Unit] | |
Description=Verdaccio lightweight npm proxy registry | |
[Service] | |
Type=simple | |
Restart=on-failure | |
User=verdaccio | |
ExecStart=/home/frontend/.nvm/versions/node/v10.16.3/bin/node /home/frontend/.yarn/bin/verdaccio --config /home/frontend/.config/verdaccio/config.yaml | |
[Install] |
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
#!/usr/bin/env bash | |
# Use this script to test if a given TCP host/port are available | |
WAITFORIT_cmdname=${0##*/} | |
echoerr() { if [[ $WAITFORIT_QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } | |
usage() | |
{ | |
cat << USAGE >&2 |