Skip to content

Instantly share code, notes, and snippets.

Hi ____,

I appreciate you reaching out. Unfortunately, I can't consider working at Uber because I believe that the company behaves unethically and has produced a culture that is harmful to its employees, to the software engineering profession, and indeed to the public at large. Specifically:

  • Numerous allegations of sexual harassment and mistreatment of women employees
  • Attempts to evade regulatory investigation and oversight via greyballing
  • Running an unpermitted self-driving car program in San Francisco in which vehicles ran red lights, lurched into intersections, and made illegal right turns, putting pedestrians, cyclists, and other drivers at risk, and then misleading the public about whether the incidents occurred while the vehicle was under autonomous control
  • Reports from former forensic investigator that lack of internal controls allowed employees to track high profile politicians, celebrities, personal acquaintances, and ex-partners
  • The participation of Travis Kalanick in Trump's business ad
@mislav
mislav / netflix.sh
Last active February 21, 2024 16:56
Watch Netflix as if you were in the US by proxying DNS through a DigitalOcean instance.
#!/bin/bash
set -e
droplet=netflix
interface=Wi-Fi
us_regions=( nyc1 nyc2 nyc3 )
random_region() {
echo ${us_regions[RANDOM % ${#us_regions[@]}]}
}
@paulirish
paulirish / what-forces-layout.md
Last active April 26, 2024 17:33
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@smarr
smarr / truffle-material.md
Last active March 16, 2023 14:06
Truffle: Languages and Material

Simple Security Guidelines

Using an iDevice? (Best option)

  • Use an iPod or an iPad without a SIM card
  • Use an iPhone
  • Do not jailbreak
  • Always upgrade to new iOS versions
  • Use Brave browser

Need Secure chat?

@JadenGeller
JadenGeller / Memoized.swift
Created July 11, 2015 08:08
Memoized in Swift
// Inspired by and basically implemnted by http://intersections.tumblr.com/post/99634084704/unobservable-effects-with-value-types
// Cleaned up for Swift 2.0 (multi-load enums, yay!) and added value as mutating get instead of a mutating fuc
enum Memoized<T> {
case Evaluated(T)
case Unevaluated(() -> T)
var value: T {
mutating get {
switch self {
@notozeki
notozeki / Makefile
Last active March 22, 2023 16:27
An example Ruby extension written in Crystal
CRYSTAL = crystal
UNAME = "$(shell uname -ms)"
LIBRARY_PATH = $(shell brew --prefix crystal-lang)/embedded/lib
LIBS = -levent -lpcl -lpcre -lgc -lpthread
LDFLAGS = -Wl,-undefined,dynamic_lookup
TARGET = crystal_example_ext.bundle
$(TARGET): crystal_example_ext.o
$(CC) -bundle -L$(LIBRARY_PATH) -o $@ $^ $(LIBS) $(LDFLAGS)
@pixeltrix
pixeltrix / time_vs_datatime.md
Last active February 18, 2024 19:20
When should you use DateTime and when should you use Time?

When should you use DateTime and when should you use Time?

It's a common misconception that [William Shakespeare][1] and [Miguel de Cervantes][2] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact][3]. However because England hadn't yet adopted [Gregorian Calendar Reform][4] (and wouldn't until [1752][5]) their deaths are actually 10 days apart. Since Ruby's Time class implements a [proleptic Gregorian calendar][6] and has no concept of calendar reform then there's no way to express this. This is where DateTime steps in:

>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND)
=> Tue, 23 Apr 1616 00:00:00 +0000
>> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY)
=> Sat, 23 Apr 1616 00:00:00 +0000
$ node examples/javascript.js

Canopy Lisp x 5,223 ops/sec ±1.01% (93 runs sampled)
PEG.js Lisp x 2,185 ops/sec ±2.94% (88 runs sampled)
Canopy PEG x 208 ops/sec ±4.48% (85 runs sampled)
PEG.js PEG x 122 ops/sec ±2.58% (72 runs sampled)
@gilesvangruisen
gilesvangruisen / LocalStore.swift
Last active August 29, 2015 14:17
StorableValue protocol for encoding/decoding a value type and StoredValue object for boxing up a StorableValue to be cached. (Value types can't conform to NSCoding because it's a class-protocol.)
//
// LocalStore.swift
// FPAPI
//
// Created by Giles Van Gruisen on 3/23/15.
// Copyright (c) 2015 Remarkable.io. All rights reserved.
//
import Foundation
import AwesomeCache