Skip to content

Instantly share code, notes, and snippets.

View ian-whitestone's full-sized avatar
🐍
Exit code 143

Ian Whitestone ian-whitestone

🐍
Exit code 143
View GitHub Profile
@kislayverma
kislayverma / steve-yegge-platform-rant-follow-up.md
Created December 26, 2019 07:14
The one after platforms where Steve Yegge shares Amazon war stories

By Steve Yegge

Last week I accidentally posted an internal rant about service platforms to my public Google+ account (i.e. this one). It somehow went viral, which is nothing short of stupefying given that it was a massive Wall of Text. The whole thing still feels surreal.

Amazingly, nothing bad happened to me at Google. Everyone just laughed at me a lot, all the way up to the top, for having committed what must be the great-granddaddy of all Reply-All screwups in tech history.

But they also listened, which is super cool. I probably shouldn’t talk much about it, but they’re already figuring out how to deal with some of the issues I raised. I guess I shouldn’t be surprised, though. When I claimed in my internal post that “Google does everything right”, I meant it. When they’re faced with any problem at all, whether it’s technical or organizational or cultural, they set out to solve it in a first-class way.

Anyway, whenever something goes viral, skeptics start wondering if it was faked or staged. My accident

@drdee
drdee / sql_style_guide.md
Last active January 19, 2019 20:32 — forked from fredbenenson/kickstarter_sql_style_guide.md
SQL Style Guide
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose

@gaearon
gaearon / modern_js.md
Last active April 18, 2024 15:01
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav
import pandas as pd
def parse(line):
words = line.split()
time = words[0]
protocol = words[1]
if protocol == 'IP':
src_ip, src_port = words[2].rsplit('.', 1)
dst_ip, dst_port = words[4].strip(':').rsplit('.', 1)
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@rmax
rmax / dask_avro.py
Last active September 17, 2018 19:28
An Avro reader for Dask (with fastavro)
"""A fastavro-based avro reader for Dask.
Disclaimer: This code was recovered from dask's distributed project.
"""
import io
import fastavro
import json
from dask import delayed
@syafiqfaiz
syafiqfaiz / how-to-copy-aws-rds-to-local.md
Last active February 21, 2024 06:00
How to copy production database on AWS RDS(postgresql) to local development database.
  1. Change your database RDS instance security group to allow your machine to access it.
    • Add your ip to the security group to acces the instance via Postgres.
  2. Make a copy of the database using pg_dump
    • $ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>
    • you will be asked for postgressql password.
    • a dump file(.sql) will be created
  3. Restore that dump file to your local database.
    • but you might need to drop the database and create it first
    • $ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>
  • the database is restored
@meatcar
meatcar / avro+ga4gh.md
Last active January 27, 2023 15:33
These notes should help you undestand Avro, and give you an entrypoint to start understanding the ga4gh API.

What is Avro?

Parsing the ga4gh API requires you first to understand what is Avro.

Avro is a project that allows you to

  • formaly declare and define data structures (schemas in Avro) to be later used in different languages.
  • store data in a file
  • fetch data from a file
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active April 19, 2024 18:25
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k