Skip to content

Instantly share code, notes, and snippets.

Avatar

Pavlos Ratis dastergon

View GitHub Profile
@dastergon
dastergon / jessfraz.md
Created Apr 18, 2018 — forked from acolyer/jessfraz.md
Containers, operating systems and other fun things from The Morning Paper
View find_max_object.py
In [1]: class One:
...: def __init__(self):
...: self.bw_rate = 1
...:
In [2]: class Two:
...: def __init__(self):
...: self.bw_rate = 0
...:
@dastergon
dastergon / The Technical Interview Cheat Sheet.md
Last active Apr 21, 2019 — forked from TSiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat Sheet.md

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

Array

Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
  • They are one of the oldest, most commonly used data structures.
View microsoft-azure-service-roast-sample.md

SREcon16 Europe - Microsoft Azure SRE - Service Roast Sample

Topics
Service Overview What is it, who uses it, where does it fit in overall
Technical Architecture Overview, upstream dependencies, sub-components
Development Process Source control, external dependencies, build, test, tools
Change Management / Deployment Process, technology, cadence, gates, rollback
Configuration Management Process, technology, source control
Demand Forecasting, Capacity Management How do you shift load, or scale? How do you load test? Can you shed load?
View availability-cheatsheet.md

Availability Table - Cheat sheet

Availability level Downtime per year Downtime per quarter Downtime per month Downtime per week Downtime per day Downtime per hour
90% ("one nine") 36.5 days 9 days 3 days 16.8 hours 2.4 hours 6 minutes
95% 18.25 days 4.5 days 1.5 days 8.4 hours 1.2 hours 3 minutes
99% ("two-nines") 3.65 days 21.6 hours 7.2 hours 1.68 hours 14.4 minutes 36 seconds
99.50% 1.83 days 10.8 hours 3.6 hours 50.4 minutes 7.20 minutes 18 seconds
99.9%("three nines") 8.76 hours 2.16 hours 43.2 minutes 10.1
@dastergon
dastergon / service-checklist.md
Created Sep 29, 2016 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist
View service-checklist.md

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?
View keybase.md

Keybase proof

I hereby claim:

  • I am dastergon on github.
  • I am dastergon (https://keybase.io/dastergon) on keybase.
  • I have a public key ASCWcL_1JH05ltGCQ6HWe-ZJvFnUN0PwfIz1W-Hm857bEQo

To claim this, I am signing this object:

@dastergon
dastergon / dbsnap.py
Last active Mar 2, 2021
dbsnap is a DB snapshot management tool for Amazon RDS.
View dbsnap.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""dbsnap is a DB snapshot management tool for Amazon RDS.
Demo tool used for educational purposes in http://blog.codebender.cc/2015/12/08/automating-db-snapshots-at-amazon-rds/
"""
from __future__ import print_function
import boto3
@dastergon
dastergon / HttpURLCon.java
Created Nov 9, 2015
HTTP GET request in Java
View HttpURLCon.java
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class HttpURLCon {
private final String USER_AGENT = "Mozilla/5.0";
public static void main(String[] args) throws Exception {
@dastergon
dastergon / ec2_info_retriever.py
Last active Apr 6, 2021
A basic boto3 based tool for retrieving information from running EC2 instances.
View ec2_info_retriever.py
from collections import defaultdict
import boto3
"""
A tool for retrieving basic information from the running EC2 instances.
"""
# Connect to EC2
ec2 = boto3.resource('ec2')