Skip to content

Instantly share code, notes, and snippets.

@calvinalvin
calvinalvin / Back-end-for-frontend (BFF) Architecture - Notes
Last active January 14, 2022 21:10
Notes on back end for front end architecture
First described and popularized by Sam Newman.
https://samnewman.io/patterns/architectural/bff/
TLDR
You can think of a BFF as a an API specifically tailored to a certain user experience. It acts as an aggregation layer
which sits in front of many microservices and is consumed by a specific client with varying needs, such as an iOS app,
Android app and traditional web app. Each of these different user experiences may have different BFF APIs.
Why?
@calvinalvin
calvinalvin / keybase.md
Created September 16, 2019 19:54
keybase.md

Keybase proof

I hereby claim:

  • I am calvinalvin on github.
  • I am cohsox (https://keybase.io/cohsox) on keybase.
  • I have a public key ASCStUdyauA8fI_eXpjfuoCGB_lZMN8c35JDbct1WCiblAo

To claim this, I am signing this object:

" for fzf search
set rtp+=/usr/local/opt/fzf
" Make vim copy-pastable outside of vim environment
" on Mac you must brew install reattach-to-user-namespace
set clipboard=unnamed
" ignore case for search
set ignorecase
@calvinalvin
calvinalvin / vim.md
Last active March 9, 2022 00:14
Vim development environment setup

Vim Upgrade to 8

  • brew install vim then update .zshrc to point to new vim with alias vim="/usr/local/bin/vim"

Instructions on setting up vim env for development

echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}

@calvinalvin
calvinalvin / export_repo_issues_to_csv.py
Created May 25, 2017 17:28 — forked from unbracketed/export_repo_issues_to_csv.py
Export Issues from Github repo to CSV (API v3)
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests
@calvinalvin
calvinalvin / README.markdown
Created February 19, 2017 21:28 — forked from marijn/README.markdown
List of nationalities in YAML, CSV and TXT format

List of nationalities

It's time someone compiled a list of nationalities to use within a web application. This gist attempts to make a first move at that.

##List of countries

I've also compiled a list of countries

@calvinalvin
calvinalvin / git+clone+ssh+agent+forward+sudo
Created February 18, 2017 05:38 — forked from scottjacobsen/git+clone+ssh+agent+forward+sudo
Git clone using ssh agent forwarding and sudo
SSH agent forwarding is great. It allows you to ssh from one server to
another all the while using the ssh-agent running on your local
workstation. The benefit is you don't need to generate ssh key pairs
on the servers you are connecting to in order to hop around.
When you ssh to a remote machine the remote machine talks to your
local ssh-agent through the socket referenced by the SSH_AUTH_SOCK
environment variable.
So you the remote server you can do something like: