Skip to content

Instantly share code, notes, and snippets.

View killmenot's full-sized avatar

Alexey Kucherenko killmenot

  • Taganrog, Russian Federation
  • 01:03 (UTC +03:00)
View GitHub Profile
@killmenot
killmenot / page-info.ts
Created August 7, 2023 07:20 — forked from tumainimosha/page-info.ts
NestJS Graphql Cursor Based pagination
import { ObjectType, Field } from "@nestjs/graphql";
@ObjectType()
export class PageInfo {
@Field({ nullable: true })
startCursor: string;
@Field({ nullable: true })
endCursor: string;
@killmenot
killmenot / tokens.md
Created April 1, 2021 14:56 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
'use strict';
const path = require('path');
module.exports = {
context: path.resolve(__dirname, 'src'),
entry: {
bundle: './app.js',
},
output: {
@killmenot
killmenot / PostgreSQL_index_naming.rst
Created April 26, 2020 19:36 — forked from popravich/PostgreSQL_index_naming.rst
PostgreSQL index naming convention to remember

The standard names for indexes in PostgreSQL are:

{tablename}_{columnname(s)}_{suffix}

where the suffix is one of the following:

  • pkey for a Primary Key constraint;
  • key for a Unique constraint;
  • excl for an Exclusion constraint;
  • idx for any other kind of index;
@killmenot
killmenot / Dockerfile
Created March 5, 2020 17:07
Dockerfile for readk.it
FROM node:13-alpine
RUN mkdir -p /readk.it
WORKDIR /readk.it
COPY package.json .
RUN apk update \
&& apk add --no-cache \
python \
python-dev \
ruby \
@killmenot
killmenot / npm-using-https-for-git.sh
Created February 20, 2020 10:34 — forked from taoyuan/npm-using-https-for-git.sh
Force git to use https:// instead of git://
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf git://
@killmenot
killmenot / update-images.sh
Created February 7, 2020 09:32 — forked from ColinLeverger/update-images.sh
Update all Docker images
docker images | grep -v REPOSITORY | awk '{print $1}' | xargs -L1 docker pull
@killmenot
killmenot / aws.js
Created January 16, 2020 22:00 — forked from mihaiserban/aws.js
AWS SNS handle SES bounce/complaints
const express = require("express");
const router = express.Router();
const User = require("../models/user");
const AWS = require("aws-sdk");
AWS.config.update({
accessKeyId: process.env.accessKeyId,
secretAccessKey: process.env.secretAccessKey,
region: "us-east-1"
});

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals

Set up git editor

The main command is:

git config --global core.editor "path to your editor with params"

Set up an editor and check it by making a commit: