Skip to content

Instantly share code, notes, and snippets.

View sergeysova's full-sized avatar
👋
Open to network

Sova sergeysova

👋
Open to network
View GitHub Profile
@sergeysova
sergeysova / nginx-tls.conf
Created April 3, 2020 07:05 — forked from gavinhungry/nginx-tls.conf
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# 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
#
@sergeysova
sergeysova / 1_triggers.sql
Last active March 23, 2020 10:56 — forked from fritzy/1_triggers.sql
Get table change notifications from Postgres as JSON
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);

asdasd

interface Props {
variant?: "default" | "primary" | "secondary";
size?: "small" | "medium" | "large";
content?: Function;
click?: EventHandler;
}
export function Button(text: StoreOrData<string>, { variant, size, content, click }: Props) {
h('button', () => {
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', () => {
// 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,
const d = createDomain();
d.onCreateStore((store) => {
store.updates.watch((value) => {
console.log(`STORE ${store.shortName} UPDATED`, value);
});
});
d.onCreateEvent((event) => {
event.watch((parameters) => {
const routes = [
{
name: "auth.login",
path: "/login",
component: LoginPage,
guards: [checkAuthn({ auth: false, redirectTo: "home" })],
},
{
name: "transactions.list",
path: "/transactions",
[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]
#!/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