Skip to content

Instantly share code, notes, and snippets.

View eddiecorrigall's full-sized avatar

Eddie Corrigall eddiecorrigall

View GitHub Profile
@eddiecorrigall
eddiecorrigall / git_notes.md
Last active July 25, 2017 18:12
Git commands
@eddiecorrigall
eddiecorrigall / software_eng_tools.md
Last active November 14, 2017 21:51
Software Engineering Tools
@eddiecorrigall
eddiecorrigall / training.md
Last active April 12, 2018 14:34
Training guide template

Schedule

Day 1: Unix 101

  • Homebrew, Coreutils
  • Tools: ssh, nc, awk, grep, vim, cut, sort, tmux, less, tail, cut, ssh, htop, psql
  • Dotfiles: Configs: ~/.bashrc, ~/.pgpass, ~/.s3cfg, ~/.psqlrc, ~/ssh/config
  • What is
    • source /data/virtualenv/default/bin/activate
    • ssh deploy@::1
  • SSH tunnels
  • Reverse tunnel

Blogs

  • highscalability.com
  • softwareengineeringdaily.com
  • news.ycombinator.com
  • martinfowler.com
  • jacquesmattheij.com
  • kitchensoap.com
  • scotch.io
  • techspot.zzzeek.org
@eddiecorrigall
eddiecorrigall / unit_tests.md
Last active July 31, 2017 15:26
Unit Test Ideas

Unit test ideas

Deterministic VS Stocastic

Unit tests should always be deterministic / reproducable. It is hard to debug when tests might fail randomly.

  • Assign a seed to the RNG

Avoid conditional-statements

Unit tests should always follow the same execution path, and hit all asserts regardless of the global or local state. This ensures consistent behaviour and that there is no assumptions on whether conditional control flows have been accurately written.

Create fixtures from database not datasets

@eddiecorrigall
eddiecorrigall / java.md
Last active May 6, 2024 01:43
Java and the Garbage Collector

Java

  • Polymorphism
    • the ability of a variable, function, or object to take multiple forms
    • to define one interface with multiple implementations
    • compile-time: - using the same method name, but different signature
    • run-time: - using a reference type to control which method is called
  • @Override Annodation
    • Runtime polymorphism
  • Java determins which version super/sub class method to execute based on reference type of call
@eddiecorrigall
eddiecorrigall / python_socket_timeout.md
Last active November 3, 2017 15:32
A general solution to python socket library lacking a default timeout.

Python Socket Timeout

The Problem

It is well known that the standard python socket library has no default timeout (returns None).

[ec2-user@worker-node ~]$ python
>>> import socket
>>> socket.getdefaulttimeout()
AWSTemplateFormatVersion: 2010-09-09
Resources:
VPC:
Type: 'AWS::EC2::VPC'
Properties:
CidrBlock: 10.0.0.0/16
InternetGateway:
Type: 'AWS::EC2::InternetGateway'
GatewayToInternet:
Type: 'AWS::EC2::VPCGatewayAttachment'
@eddiecorrigall
eddiecorrigall / aws_mysql_debugging.md
Last active March 13, 2018 19:08
A tutorial on how to enable debugging on mysql

AWS MySQL Debugging

This tutorial provides a means to enable slow query logs on MySQL.

Setting Up Parameters

Enable these on AWS RDS Parameter Groups.

slow_query_log: 1
long_query_time: 10