Skip to content

Instantly share code, notes, and snippets.

@fxchen
fxchen / succession.md
Last active April 23, 2023 00:14
WaystarRoyco Cap Table
@fxchen
fxchen / .gitconfig
Created November 4, 2018 21:51
Default gitconfig
[user]
name = Frank Chen
email = <REDACTED>
[color]
ui = true
branch = auto
diff = auto
interactive = auto
status = auto
[github]
@fxchen
fxchen / zshrc
Created September 24, 2018 22:19
Default zshrc config
# ~/zshrc
# 1. Run Install.sh (https://gist.github.com/fxchen/9c5c950b6c9117930fa2aff804e7856b)
# 2. Modify the bottom environment variables. Add a link to this zshrc from the profile
# 3. Set iTerm word jump https://coderwall.com/p/h6yfda/use-and-to-jump-forwards-backwards-words-in-iterm-2-on-os-x 5
# 4. Configure oh-my-zsh .zshrc: plugins=(git sublime osx git-flow git-extras npm node theme web-search battery)
# Inspiration: http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
####################################################################
# Shell aliases
@fxchen
fxchen / install.sh
Created September 24, 2018 22:12
New Mac Setup
# Typically I write this to an install.sh and let it run
# Accept XCode License / install dev tools
sudo xcode-select --install
sudo xcrun cc
sudo xcodebuild -license accept
# Install package manager
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@fxchen
fxchen / virtualenv_venv_quick_setup_macosx.sh
Created September 24, 2018 21:48 — forked from tamsanh/virtualenv_venv_quick_setup_macosx.sh
virtualenv venv Quick Setup MacOSX - Python 3
# Instructions for setting up a virtualenv venv
#########
# SETUP #
#########
## Make sure you have python3
python3 --version
@fxchen
fxchen / integrations.py
Created April 23, 2018 21:19
A legible timezone-friendly parser and foursquare / existio integrator for quantifying myself
# integrations.py
###################################################################################################
# usage: integrations.py [-h] [-s [n]] [-f] [-c] [-e] [-w]
# A legible timezone-friendly parser and foursquare / existio integrator for quantifying myself
# optional arguments:
# -h, --help show this help message and exit
# -s [n], --show [n] Shows formatted <n> days (default: 30 days)
# -f, --foursquare Grab checkins from Foursquare API
# -c, --calendar Shows events from Outlook Calendar
@fxchen
fxchen / foursquare.py
Last active September 9, 2017 19:29
A legible timezone friendly parser for Foursquare. Allows for fetching and showing with a date format
# From: https://gist.github.com/rootulp/8c57bffd539bf238f4c4812dcabc6677
# Before running this script execut the following command: <pip install requests>
import requests, json, datetime, operator, argparse, sys, os
# CONSTANTS
URL_TEMPLATE = 'https://api.foursquare.com/v2/users/self/checkins?limit=250&oauth_token={}&v=20131026&offset={}'
DEFAULT_DAYS = 30
JSON_FILE = 'foursquare.json'
@fxchen
fxchen / gist:4248443
Created December 10, 2012 04:53 — forked from ericwwsun/gist:2149064
Javascript: Validate Email(s)
// Filter function
function filterEmail(element, index,array){
return validateEmail(element);
}
// Clean array (empty / non-valid elements are removed)
function validEmails(emails){
var valid_emails = emails.filter(filterEmail);
return valid_emails;
}
@fxchen
fxchen / Google Contact Phone Number Cleaner.txt
Created November 30, 2012 00:43
This Excel Formula helps format phone numbers on Google Contacts. If your gmail contacts are unorganized mess like mine used to be.
How to Clean Up Google Contact Numbers
If your Gmail contact phone numbers are unorganized, this Excel formula can help you remove format the mobile phone numbers.
Note: I added a 1 for US numbers. I like my numbers formatted this way.
1. Export the numbers you want to clean to CSV (Use Google CSV)
2. Open in Excel. The U2 column was Mobile Phone column for the file I downloaded.
3. Place this formula starting in the V2 column (this will replace the Pager column, which I did not need) and copy downwards to do the same formula replacement.
=IF((LEFT(U2,0,1)="1"),SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(U2," ",""),".",""),")",""),"(",""),"-",""),CONCATENATE("1",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(U2," ",""),".",""),")",""),"(",""),"-",""))
4. Copy from V2 (downwards) and do a Paste Special starting on U2 with "Value". This will replace your previous values for mobile phone with the clean ones.
5. Save.