Skip to content

Instantly share code, notes, and snippets.

View karlkori's full-sized avatar
:octocat:

Serhii Drahunov karlkori

:octocat:
View GitHub Profile
Please listen up!
I need assistance with preparation for coding session
The CodeSignal screen is meant to test general coding ability.
I’ll be asked to implement a simple coding project from a spec and develop it to the point that it passes some tests.
I should prioritize
a) writing code that passes as many tests as possible and
b) progressing through all four levels quickly.
It'll essentially be a toy simulation of an app that won't require anything except the standard library of chosen programming language.
Note there's no framework/UI or anything similar — basically, it's like the core business logic of an app, but nothing else.
It won’t test detailed knowledge of algorithms, compute systems, or machine learning.
@khalidx
khalidx / node-typescript-esm.md
Last active May 2, 2026 04:25
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@santiq
santiq / config.yml
Created March 5, 2019 06:33
Automate generation Ionic App APK with CircleCI.
version: 2
jobs:
build:
docker:
- image: circleci/android:api-28-node
working_directory: ~/repo
environment:
JVM_OPTS: -Xmx3200m
steps:
- checkout
@fgilio
fgilio / axios-catch-error.js
Last active February 11, 2026 16:18
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@zmts
zmts / tokens.md
Last active June 24, 2026 09:23
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

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

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@pcan
pcan / README.md
Last active April 3, 2025 02:58
Node.js plain TLS Client & Server, 2-way Cert Auth

Node.js TLS plain TLS sockets

This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.

Newer versions of openssl are stricter about certificate purposes. Use extensions accordingly.

Prepare certificates

Generate a Certificate Authority:

@mkoistinen
mkoistinen / gist:2d8509b0b0be45ed76fed95f89b8596d
Created November 29, 2016 22:46
How to use allow subdomains with CORS
# Basically, since we can't use '*' as a wildcard according to the CORS spec, we need to use
# Nginx to conditionally apply it to the "right" subdomains. This should allow all subdomains
# of `yourtld.tld`.
location ~* ^.+\.(ttf|oft|eot|woff|svg)$ {
#
# NOTE: CORS standards allow a specific protocol/host combination,
# 'null', or '*' only. So, wildcard subdomains won't work.
#
# Have a look here:
@andriisoldatenko
andriisoldatenko / latency.txt
Last active February 18, 2018 07:16 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@smelukov
smelukov / mvvm.html
Last active May 27, 2023 10:58
Very simple MVVM (dynamic data binding) on JS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<h1>MVVM</h1>
@vasanthk
vasanthk / System Design.md
Last active June 26, 2026 10:22
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?