Skip to content

Instantly share code, notes, and snippets.

View gbertb's full-sized avatar

Gilbert Bagaoisan gbertb

  • San Francisco, CA
View GitHub Profile
<script src="https://use.typekit.net/mtj0grj.js"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>
<script>
(function(d) {
loadFonts = 1;
if(window.sessionStorage){
if(sessionStorage.getItem('useTypekit')==='false'){
loadFonts = 0;
}

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@gbertb
gbertb / gist:9b35aa4d95ef9a961da10b89e05e64a8
Created August 19, 2017 22:59 — forked from coolaj86/gist:2332953
Dimensions for VistaPrint business cards
Standard
Bleed Margin: 90mm x 52mm
Content Ends: 87mm x 49mm
Imperial
Bleed Margin: 3.54in x 2.05in
Content Ends: 3.43in x 1.93in
@gbertb
gbertb / TooltipView.swift
Created June 10, 2017 19:57 — forked from simonwuyts/TooltipView.swift
Customizable Tooltips
//
// TooltipView.swift
// Customizable Tooltips
//
// Copyright © 2017 Simon Wuyts
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@gbertb
gbertb / convert id_rsa to pem
Created March 31, 2017 19:01 — forked from mingfang/convert id_rsa to pem
Convert id_rsa to pem file
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem
chmod 700 id_rsa.pem
(function() {
var libraryStorage = {};
function librarySystem(libraryName, dependency, callback) {
if (arguments.length > 1) {
// If library has no dependency
if (dependency.length === 0) {
libraryStorage[libraryName] = callback();
// has one or more dependencies
} else {
var degrees2meters = function(lon,lat) {
var x = lon * 20037508.34 / 180;
var y = Math.log(Math.tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
y = y * 20037508.34 / 180;
return [x, y]
}
lon= -77.035974
lat = 38.898717
@gbertb
gbertb / AutoDescribingObjects.swift
Created September 28, 2016 15:21 — forked from YogevSitton-zz/AutoDescribingObjects.swift
Use auto-describing objects with CustomStringConvertible
extension CustomStringConvertible {
var description : String {
var description: String = ""
if self is AnyObject {
description = "***** \(self.dynamicType) - <\(unsafeAddressOf((self as! AnyObject)))>***** \n"
} else {
description = "***** \(self.dynamicType) *****\n"
}
let selfMirror = Mirror(reflecting: self)
for child in selfMirror.children {
@gbertb
gbertb / gist:8e1d36af0076292050529f6729ba22ac
Created September 18, 2016 03:51 — forked from michaelteter/gist:442894d8ccdc9ada3cd2f2513dbf1849
Xcode 8, Swift 3, and Alamofire - getting it setup and building
Alamofire has recently been updated. Now it seems to support Swift 3 from its main (master) branch.
Below are instructions that should work :)
------------------------------------------------------------------------------------------------
CURRENT INSTRUCTIONS ---------------------------------------------------------------------------
1. Install cocoapods
$ sudo gem install cocoapods
2. create an xcode project
@gbertb
gbertb / Constants.swift
Created February 3, 2016 05:42
adding constants file in swift
//
// Constants.swift
//
// Created by Jarrod Parkes on 11/5/15.
// Copyright © 2015 Udacity. All rights reserved.
//
// MARK: - Constants
struct Constants {