Skip to content

Instantly share code, notes, and snippets.

View omarismail's full-sized avatar

Omar Ismail omarismail

  • HashiCorp
View GitHub Profile
@omarismail
omarismail / main.tf
Created October 16, 2021 19:36
local backend
terraform {
backend "local" {
}
}
output "env" {
value = "${terraform.workspace}"
}
@omarismail
omarismail / main.tf
Created October 16, 2021 19:33
cloud backend, tags
terraform {
cloud {
hostname = "app.terraform.io"
organization = "omar-test"
workspaces {
tags = ["app"]
}
}
}
@omarismail
omarismail / main.tf
Created October 16, 2021 19:33
cloud backend, name
terraform {
cloud {
hostname = "app.terraform.io"
organization = "omar-test"
workspaces {
name = "app"
}
}
}
@omarismail
omarismail / tf
Created May 11, 2021 21:59
tf config
terraform {
required_providers {
tfe = {
version = "~> 0.24.0"
}
}
}
provider "tfe" {
hostname = "tfe-zone-4c292d5b.ngrok.io"
package e2etfcapi
import (
"context"
"testing"
tfe "github.com/hashicorp/go-tfe"
"github.com/hashicorp/go-uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@omarismail
omarismail / business-models.md
Created March 6, 2020 17:19 — forked from ndarville/business-models.md
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google

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

@omarismail
omarismail / service-checklist.md
Created September 17, 2016 11:45 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@omarismail
omarismail / hanoi.rb
Created April 23, 2016 15:41
Towers of Hanoi
def move(num_disks, start, mid, last)
if num_disks == 1
@towers[last] << @towers[start].pop
puts "Move disks from #{start} to #{last} : #{@towers}"
else
move(num_disks-1, start, last, mid)
move(1, start, mid, last)
move(num_disks-1, mid, start, last)
end
end
@omarismail
omarismail / latency.txt
Created November 2, 2015 14:44 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms