Skip to content

Instantly share code, notes, and snippets.

View srm's full-sized avatar

Sam McLaughlin srm

View GitHub Profile
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active June 12, 2024 02:57 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@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

anonymous
anonymous / config.json
Created March 9, 2015 19:50
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#479FCA",
"@brand-success": "#8fc754",

There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.

All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@boneskull
boneskull / gist:6011707
Created July 16, 2013 19:13
Example of service inheritance
var myApp = angular.module('myApp', []);
var baseService = function () {
this._state = {};
};
baseService.prototype.getState = function () {
return this._state;
};
baseService.prototype.setState = function (state) {
this._state = state;
anonymous
anonymous / index.html
Created August 17, 2012 06:35
This is just an experiment! There are certainly better ways to show an image of a MacBook, but none as fun as this :)
<i class="macbook"></i>
@vicnorton
vicnorton / fltk_install_error
Created April 15, 2012 17:49
fltk install problem
Desktop$ brew install -v fltk
Warning: Formula will not build with Clang, trying LLVM
==> Downloading http://ftp2.easysw.com/pub/fltk/1.3.0/fltk-1.3.0-source.tar.gz
/usr/bin/curl -qf#LA Homebrew 0.9 (Ruby 1.8.7-249; Mac OS X 10.7.3) http://ftp2.easysw.com/pub/fltk/1.3.0/fltk-1.3.0-source.tar.gz -o /Library/Caches/Homebrew/fltk-1.3.0.tar.gz
curl: (22) The requested URL returned error: 404
Error: Download failed: http://ftp2.easysw.com/pub/fltk/1.3.0/fltk-1.3.0-source.tar.gz
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@mrflip
mrflip / maximum_battery_life.md
Created March 19, 2012 08:32
maximum battery life checklist -- use before a long plane flight

Max Battery Life Checklist

Here is a checklist to follow if you want maximum battery life -- for instance if you're about to get on a long plane flight.

10 hour battery life on a non-SSD Macbook Pro 17"

Low power use checklist

With power connected: