Skip to content

Instantly share code, notes, and snippets.


Petar Bojinov pbojinov

View GitHub Profile

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

pbojinov / memorySizeOfObject.js
Created Mar 25, 2019 — forked from zensh/memorySizeOfObject.js
calculate memory size of javascript object, it is not a accurate value!
View memorySizeOfObject.js
function memorySizeOf(obj) {
var bytes = 0;
function sizeOf(obj) {
if(obj !== null && obj !== undefined) {
switch(typeof obj) {
case 'number':
bytes += 8;
case 'string':
View Serverless_deploy.json
"Version": "2012-10-17",
"Statement": [
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
View tmux_cheatsheet.markdown

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name:

pbojinov / 00-node6.config
Created Mar 6, 2018 — forked from Nainterceptor/00-node6.config
Quick & dirty hack to get NodeJS 6 on AWS Elastic BeanStalk
View 00-node6.config
- namespace: aws:elasticbeanstalk:container:nodejs
option_name: NodeCommand
value: "npm start"
- namespace: aws:elasticbeanstalk:container:nodejs
option_name: NodeVersion
value: "4.4.3"
pbojinov /
Last active Jun 11, 2018 — forked from brentajones/
A weather status script for the Raspberry Pi and Blinkt module -
import json, time, os.path
import blinkt, requests
status_colors = {'current':[1,1,1],'high':[1,0,0],'low':[0,0,1],'precip':[0,1,0]}
def getForecast(key,lat,lng):
url = '' + key + '/' + str(lat) + ',' + str(lng)
pbojinov / es_proxy.js
Created Feb 9, 2018 — forked from rveitch/es_proxy.js
Example Elasticsearch Proxy for Node.js
View es_proxy.js
var express = require('express');
var request = require('request');
var app = express();
var port = Number(process.env.PORT || 3000);
var apiServerHost = (process.env.ELASTIC_URL || '')
// Listen for requests on all endpoints
app.use('/', function(req, res, body) {
// short-circuit favicon requests for easier debugging
pbojinov / US Zip Codes from 2013 Government Data
Created May 22, 2017 — forked from erichurst/US Zip Codes from 2013 Government Data
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source:
View US Zip Codes from 2013 Government Data
This file has been truncated, but you can view the full file.
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
pbojinov / canada_states_titlecase.json
Last active Jan 19, 2022 — forked from mshafrir/states_hash.json
US states & Canadian Provinces in JSON form
View canada_states_titlecase.json
"name": "Alberta",
"abbreviation": "AB"
"name": "British Columbia",
"abbreviation": "BC"