Skip to content

Instantly share code, notes, and snippets.

View lesterchan's full-sized avatar
🥞
Full Stack Engineer

Lester Chan lesterchan

🥞
Full Stack Engineer
View GitHub Profile
@fnky
fnky / stripe-keys-and-ids.tsv
Last active March 29, 2024 22:52
Stripe keys and IDs
Prefix Description Notes
ac_ Platform Client ID Identifier for an auth code/client id.
acct_ Account ID Identifier for an Account object.
aliacc_ Alipay Account ID Identifier for an Alipay account.
ba_ Bank Account ID Identifier for a Bank Account object.
btok_ Bank Token ID Identifier for a Bank Token object.
card_ Card ID Identifier for a Card object.
cbtxn_ Customer Balance Transaction ID Identifier for a Customer Balance Transaction object.
ch_ Charge ID Identifier for a Charge object.
cn_ Credit Note ID Identifier for a Credit Note object.
@stidges
stidges / tailwind.itermcolors
Last active November 30, 2023 21:00
An iTerm2 color scheme based on the Tailwind CSS color scheme (https://tailwindcss.com/docs/colors)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.17254902422428131</real>
@augbog
augbog / .Frontend Technical Interview Prep.md
Last active March 4, 2024 16:25
Frontend Technical Interview Prep: A study guide of things I constantly re-review when interviewing for frontend.

Frontend Technical Interview Prep

EDIT: Well this has been linked now so just an FYI this is still TBD. Feel free to comment if you have suggestions for improvements. Also here is an unrolled Twitter thread of a lot of the tips I talk about on here.

I've been doing frontend for a while now and one thing that really gripes me is the interview. I think the breadth of knowledge of a "Frontend Engineer" has been so poorly defined that people really just expected you to know everything. Many companies have made this a hybrid role. The Web is massive and there are many MANY things to know. Some of these things are just facts that you learn and others are things you really have to understand.

Every time I interview, I go over the same stuff. I wanted to create a gist of the TL;DR things that would jog my memory and hopefully yours too.

Lots of these things are real things I've been asked that caught me off guard. It's nice to have something you ca

@joseluisq
joseluisq / stash_dropped.md
Last active March 28, 2024 11:59
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active April 23, 2024 13:36 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@bmhatfield
bmhatfield / .profile
Last active March 18, 2024 07:43
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@Restuta
Restuta / framework-sizes.md
Last active March 7, 2024 00:01
Sizes of JS frameworks, just minified + minified and gzipped, (React, Angular 2, Vue, Ember)

Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.

All files were downloaded from https://cdnjs.com and named accordingly. Output from ls command is stripped out (irrelevant stuff)

As-is (minified)

$ ls -lhS
566K Jan 4 22:03 angular2.min.js
@ryanray
ryanray / aws-api-gateway-form-to-json.ftl
Created October 4, 2015 01:24
API Gateway application/www-form-urlencoded to application/json based on https://forums.aws.amazon.com/thread.jspa?messageID=673012&tstart=0#673012
## convert HTML POST data or HTTP GET query string to JSON
## get the raw post data from the AWS built-in variable and give it a nicer name
#if ($context.httpMethod == "POST")
#set($rawAPIData = $input.path('$'))
#elseif ($context.httpMethod == "GET")
#set($rawAPIData = $input.params().querystring)
#set($rawAPIData = $rawAPIData.toString())
#set($rawAPIDataLength = $rawAPIData.length() - 1)
#set($rawAPIData = $rawAPIData.substring(1, $rawAPIDataLength))
@JeffBelback
JeffBelback / docker-destroy-all.sh
Last active December 12, 2023 17:47
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
if [ -n "$containers" ]; then
docker rm -f -v $containers
@FrostyX
FrostyX / FacebookDebugger.php
Last active February 9, 2022 11:15
Facebook API - Force facebook to reload cache from your website
<?php
class FacebookDebugger
{
/*
* https://developers.facebook.com/docs/opengraph/using-objects
*
* Updating Objects
*
* When an action is published, or a Like button pointing to the object clicked,
* Facebook will 'scrape' the HTML page of the object and read the meta tags.