Skip to content

Instantly share code, notes, and snippets.

View evert0n's full-sized avatar
:octocat:

Everton Yoshitani evert0n

:octocat:
View GitHub Profile
@evert0n
evert0n / latency.txt
Created January 24, 2024 23:00 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
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

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

@evert0n
evert0n / translation.md
Created June 8, 2023 00:54 — forked from lleyton/translation.md
(ENG) Open Source Business Challenges and Reality, Rui Ueyama

Open Source Business Challenges and Reality

Original Japanese note here.

Original Author: Rui Ueyama (creator of the mold linker)

Translated by @windowsboy111

Minimally edited by @lleyton

@evert0n
evert0n / README.md
Last active January 25, 2023 02:24
Eligible Annual Leave Challenge

Annual Paid Leave Allowance

  1. Paid leave shall be granted after 3 months have elapsed from the date of hire.

  2. Employees and full-time workers shall be granted paid leave as outlined in the table below, beginning after 3 months have elapsed since their hire date.

Month of Hire Month when leave is granted Number of days granted
January April 10
February May 10
@evert0n
evert0n / install_mysql_client.sh
Created August 29, 2022 03:09 — forked from sshymko/install_mysql_client.sh
Install MySQL 5.7 client on Amazon Linux 2
#!/bin/sh
sudo yum install -y https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
sudo yum install -y mysql-community-client
@evert0n
evert0n / example-api-gateway.yaml
Created March 1, 2022 18:07 — forked from elerch/example-api-gateway.yaml
YAML version of tmaslen's API Gateway cloudformation template - useful when you don't want to use SAM
---
AWSTemplateFormatVersion: '2010-09-09'
Description: Sample template that contains a Lambda function behind an API GW
Resources:
# BEGIN: Should only need this in an empty API Gateway situation
ApiGatewayCloudWatchLogsRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'

Node.js offers a great environment for building ETL scripts. This is because Node is very easy to program and work with, AND has interface libraries for almost everything under the sun.

We need a framework that makes writing ETL scripts easy:

  • Supports creation and re-use of components
  • Cleanly divides input/output concerns from transformation concerns
  • Works identically in both event-driven and batch scenarios
  • Supports an easy development/testing mode
  • Provides good visibility when running in production
  • Has a simple DSL for expressing transformation logic
@evert0n
evert0n / a_G_for_FastAPI.md
Created February 9, 2021 15:31 — forked from glenfant/a_G_for_FastAPI.md
A simple POC that mimics in FastAPI the "g" request lifecycle pseudo global

Like Flask "g". Good news you can do the same with FastAPI

"g" is a threadlocal magic object that lets developer add / change / remove attributes during the request lifecycle. Learn more about this "g" here.

There is no OTB equivalent in FastAPI, but thanks to the new contextvars Python 3.7+ module, I made this simple demo.

Any comment or help to improve yhis recipe is welcome.

@evert0n
evert0n / web-servers.md
Created February 3, 2021 17:44 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
Rank Type Prefix/Suffix
1. Prefix my+
2. Suffix +online
3. Prefix the+
4. Suffix +web
5. Suffix +media
6. Prefix web+
7. Suffix +world
8. Suffix +net
9. Prefix go+