Skip to content

Instantly share code, notes, and snippets.

View tinovyatkin's full-sized avatar
💭
I may be slow to respond.

Konstantin Vyatkin tinovyatkin

💭
I may be slow to respond.
View GitHub Profile
@tinovyatkin
tinovyatkin / amz_linux_git.md
Created November 13, 2023 16:54 — forked from rjhintz/amz_linux_git.md
AWS Linux: Git Install From Source

AWS Linux: Installing Git from Source

Method

Method:

  1. sudo yum update
  2. sudo yum install curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel
  3. sudo yum install asciidoc xmlto docbook2X
  4. sudo yum install gcc autoconf
  5. sudo ln -s /usr/bin/db2x_docbook2texi /usr/bin/docbook2x-texi
  6. wget https://github.com/git/git/archive/v2.8.4.zip
"""
Reorder site-packages ahead of Extras and lib-dynload.
Two implementations:
1. puts site-packages ahead of stdlib (technically hazardous,
but not really an issue).
2. is more conservative, only demoting Extras below site-packages.
Add this to ~/Library/Python/2.7/lib/python/site-packages/sitecustomize.py
"""
#!/bin/bash
sudo yum install gcc -y
sudo yum install openssl-devel -y
sudo yum install zlib-devel -y
sudo yum install mlocate -y
sudo yum install autoconf -y
wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.1p1.tar.gz
tar zxvf openssh-9.1p1.tar.gz
cd openssh-9.1p1
./configure --prefix=/usr
@tinovyatkin
tinovyatkin / webpack-https-mkcert.md
Last active August 17, 2023 11:42 — forked from Grawl/webpack-https-mkcert.md
Running Webpack Dev Server with HTTPS on developer machine using MKCERT
  1. Add local domain to /etc/hosts:

    127.0.0.1 my-project.dev

  2. Install mkcert

  3. Create certificate for this domain:

    ➜ mkcert my-project.dev
@tinovyatkin
tinovyatkin / lambda.ts
Last active July 27, 2023 11:13 — forked from streamich/lambda.js
using node-postgres (`pg`) in AWS Lambda
import type { Handler } from "aws-lambda";
import { Pool } from "pg";
// connection details inherited from environment
const pool = new Pool({
max: 1,
min: 0,
idleTimeoutMillis: 120000,
connectionTimeoutMillis: 10000
});
{
"type": "object",
"required": ["Statement"],
"additionalProperties": false,
"properties": {
"Version": {
"type": "string",
"enum": ["2008-10-17", "2012-10-17"]
},
"Id": {
@tinovyatkin
tinovyatkin / fibonacci-generator.js
Created June 26, 2020 02:13 — forked from jfairbank/fibonacci-generator.js
Fibonacci ES6 Generator
function *fibonacci(n) {
const infinite = !n && n !== 0;
let current = 0;
let next = 1;
while (infinite || n--) {
yield current;
[current, next] = [next, current + next];
}
}
@tinovyatkin
tinovyatkin / passkit-webservice-swagger.json
Created December 9, 2019 12:40 — forked from ckrack/passkit-webservice-swagger.json
Passkit Webservice Swagger for Apple Wallet Webservice
{
"swagger": "2.0",
"info": {
"title": "Passkit Web Service",
"contact": {
"name": "Clemens Krack",
"email": "info@clemenskrack.com"
},
"version": "1.0.0"
},
@tinovyatkin
tinovyatkin / rx-server.js
Created September 21, 2019 16:42 — forked from Gooseus/rx-server.js
RxJS HTTP Server
// Rx HTTP Server
// first attempt at creating a minimal reactive nodejs HTTP server
//
// has:
// * url/querystring parsing
// * body parsing
// * some kind of routing
// * some kind of error handling
// * minimalist request logging
//