I hereby claim:
- I am ziyunli on github.
- I am ziyunli (https://keybase.io/ziyunli) on keybase.
- I have a public key ASC45PrZAO0zlgn9CASDEl8c6UzW5p3TQzhEvbtH_z0Mcwo
To claim this, I am signing this object:
# use reinstall if ffmpeg has already been installed via homebrew | |
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265 | |
# export the movie to frames using ffmpeg then make the GIF with convert from ImageMagick | |
# from http://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality# | |
mkdir frames | |
ffmpeg -i input -vf scale=320:-1:flags=lanczos,fps=10 frames/ffout%03d.png # export frames | |
convert -loop 0 frames/ffout*.png output.gif | |
# Add an empty audio track to video |
#! /usr/bin/python | |
# | |
# Church numerals in Python. | |
# See http://en.wikipedia.org/wiki/Church_encoding | |
# | |
# Vivek Haldar <vh@vivekhaldar.com> | |
# | |
# https://gist.github.com/2438498 | |
zero = lambda f: lambda x: x |
I hereby claim:
To claim this, I am signing this object:
#System Design Cheatsheet
Picking the right architecture = Picking the right battles + Managing trade-offs
##Basic Steps
Visit my blog or connect with me on Twitter
git init
or
# /etc/nginx/sites-available/default | |
server { | |
listen 80; | |
server_name <domain name>; | |
return 301 https://<domain name>$request_uri; | |
} | |
server { | |
listen 80; | |
server_name www.<domain name>; |
There are two modes when you don't want Certbot to edit your configuration:
Webroot is better because it doesn't need to replace Nginx (to bind to port 80) to renew certificates.
In the following, we're setting up mydomain.com
to be served from /var/www/mydomain
, and challenges will be served from /var/www/letsencrypt
.
JD Maturen, 2016/07/05, San Francisco, CA
As has been much discussed, stock options as used today are not a practical or reliable way of compensating employees of fast growing startups. With an often high strike price, a large tax burden on execution due to AMT, and a 90 day execution window after leaving the company many share options are left unexecuted.
There have been a variety of proposed modifications to how equity is distributed to address these issues for individual employees. However, there hasn't been much discussion of how these modifications will change overall ownership dynamics of startups. In this post we'll dive into the situation as it stands today where there is very near 100% equity loss when employees leave companies pre-exit and then we'll look at what would happen if there were instead a 0% loss rate.
What we'll see is that employees gain nearly 3-fold, while both founders and investors – particularly early investors – get dilute
Service Worker - offline support for the web
Progressive apps - high-res icon, splash screen, no URL bar, etc.
def longest_exp_inc_seq(a): | |
""" | |
>>> longest_exp_inc_seq([0, 4, 8, 2, 1, 3, 7, 15, 2, 9, 7]) | |
[0, 1, 3, 7, 15] | |
""" | |
if len(a) == 0: | |
return a | |
s = [1] * len(a) # the longest subsequence that ends at i | |
p = [-1] * len(a) # the index of the previous element in the longest subsequence at i |