Skip to content

Instantly share code, notes, and snippets.

View aseemk's full-sized avatar

Aseem Kishore aseemk

View GitHub Profile
@miraculixx
miraculixx / .gistignore
Last active March 3, 2020 18:17
Makefile for multi-file gists using https://github.com/defunkt/gist
# no blank lines!
.gist
.gistignore
.git/*
.idea/*
__pycache_/*
// JSON.stringify({ date: new Date() }) --> '{"date":"2019-06-20T12:29:43.288Z"}'
// JSON.parse('{"date":"2019-06-20T12:29:43.288Z"}') --> { date: "2019-06-20T12:29:43.288Z" }
// hmm..
// let's use the following function to revive our Date objects!
function jsonDateReviver(key, value) {
// plug this regex into regex101.com to understand how it works
// matches 2019-06-20T12:29:43.288Z (with milliseconds) and 2019-06-20T12:29:43Z (without milliseconds)
var dateFormat = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,}|)Z$/;
if (typeof value === "string" && dateFormat.test(value)) {
@pmkay
pmkay / top-brew-packages.txt
Last active April 18, 2024 19:54 — forked from r5v9/top-brew-packages.txt
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
coreutils: GNU File, Shell, and Text utilities
pkg-config: Manage compile and link flags for libraries
chromedriver: Tool for automated testing of webapps across many browsers
awscli: Official Amazon AWS command-line interface
automake: Tool for generating GNU Standards-compliant Makefiles
@aseemk
aseemk / 1-trello-sum-bookmarklet.md
Last active November 15, 2017 19:36
Trello bookmarklet to (re-)calculate sums of "points" from cards.

Trello bookmarklet to (re-)calculate sums of "points" from cards.

"Points" can be anything numeric (no units). Just prefix each card you want to count with the points in parentheses. E.g. (3) Investigate options.

It's okay for cards to not have points. They just won't be included in the sums.

The sum of points for each list will get added to the list title in the same way as cards. E.g. (17) To Do. Any existing sum will get updated.

The list's actual title (e.g. if you refresh) will not be updated; only the "display" title at that moment will be.

@aseemk
aseemk / 1-instructions.md
Last active November 5, 2021 06:08
Bookmarklet template!

TODO: Add description of your bookmarklet here.

To add this bookmarklet to your browser, instructions for Chrome:

  1. Right-click your Bookmarks Bar.
  2. Click "Add Page..."
  3. For "Name", type "TODO: Title here".
  4. For "URL", copy-paste the below:
@jdmaturen
jdmaturen / company-ownership.md
Last active July 29, 2023 22:39
Who pays when startup employees keep their equity?

Who pays when startup employees keep their equity?

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

@pbojinov
pbojinov / App.js
Created May 3, 2016 00:25
React Native App with Deep Link Support
import React, { View, Text, Linking } from 'react-native';
import urlParse from 'url-parse';
class App extends Component {
componentDidMount() {
// Handling Deep Linking
const deepLinkUrl = Linking.getInitialURL().then((url) => {
console.log(`Deep Link URL: ${url}`);
if (url) {
const parsedUrl = urlParse(url, true);
@maxcnunes
maxcnunes / alias-docker-compose.sh
Last active August 27, 2023 15:11
Aliases for docker-compose
alias c='docker-compose'
alias cb='docker-compose build'
alias cup='docker-compose up'
alias cr='docker-compose run --service-ports --rm'
alias crl='docker-compose run --service-ports --rm local'
alias crd='docker-compose run --service-ports --rm develop'
alias crt='docker-compose run --rm test'
alias crp='docker-compose run --rm provision'
alias crci='docker-compose run --rm ci'
alias crwt='docker-compose run --rm watchtest'
@vkostyukov
vkostyukov / statuses.md
Last active February 13, 2024 21:39
HTTP status codes used by world-famous APIs
API Status Codes
[Twitter][tw] 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504
[Stripe][stripe] 200, 400, 401, 402, 404, 429, 500, 502, 503, 504
[Github][gh] 200, 400, 422, 301, 302, 304, 307, 401, 403
[Pagerduty][pd] 200, 201, 204, 400, 401, 403, 404, 408, 500
[NewRelic Plugins][nr] 200, 400, 403, 404, 405, 413, 500, 502, 503, 503
[Etsy][etsy] 200, 201, 400, 403, 404, 500, 503
[Dropbox][db] 200, 400, 401, 403, 404, 405, 429, 503, 507
@gtallen1187
gtallen1187 / slope_vs_starting.md
Created November 2, 2015 00:02
A little bit of slope makes up for a lot of y-intercept

"A little bit of slope makes up for a lot of y-intercept"

01/13/2012. From a lecture by Professor John Ousterhout at Stanford, class CS140

Here's today's thought for the weekend. A little bit of slope makes up for a lot of Y-intercept.

[Laughter]