Skip to content

Instantly share code, notes, and snippets.

View anfleene's full-sized avatar
🤖
I am a robot. Beep Boop.

Andy Fleener anfleene

🤖
I am a robot. Beep Boop.
View GitHub Profile
@anfleene
anfleene / NewManagerTips.md
Last active September 2, 2020 20:38
List of posts and books and podcasts for New Engineering Managers
@anfleene
anfleene / Distributed-Systems-Resources
Last active August 20, 2019 21:12
A list of resources to help you learn about Distributed Systems, how they work, how they fail, why they're great and terrible at the same time
Good Intro to explain the landscape by Stanislav Kozlovski
https://www.freecodecamp.org/news/a-thorough-introduction-to-distributed-systems-3b91562c9b3c/
How to get started with Distributed Systems by Caitie McCaffrey
https://caitiem.com/2017/09/07/getting-started-with-distributed-systems/
Interactive Visual Representation of how Raft(a distributed system consenses algorithmn works)
http://thesecretlivesofdata.com/raft/
Sidney Dekker
The Field Guide to Human Error - https://amzn.to/2O30hAI
Just Culture - https://amzn.to/2XSsIpD
RULE- AND ROLE-RETREAT: AN EMPIRICALSTUDY OF PROCEDURES AND RESILIENCE - https://bit.ly/2F9is5e
Erik Hollnagel
From Safety-I to Safety-II: A White Paper - https://www.skybrary.aero/bookshelf/books/2437.pdf
Joint Cognitive Systems: Patterns in Cognitive Systems Engineering - https://amzn.to/2u8jhVE
Resilience engineering – Building a Culture of Resilience - https://bit.ly/2J8Calz
#!/bin/bash
# This script assumes you have an app running on 2 ports 4040 and 4041
# and that you can restart your app with a single command
APP_RESTART_COMMAND="/your/app/control restart"
# Find out if the app is running
function app_up {
port=$1
@anfleene
anfleene / .slate
Last active December 21, 2015 13:18
A basic slate config
#TAKEN FROM http://mauriciogardini.com/post/43348489262/slate-a-mac-os-x-window-manager-for-power-users
# Config's directive: config name value
# Default to the current screen if the screen the reference does not exist.
config defaultToCurrentScreen true
# The base value for nudge percent calculation
config nudgePercentOf screenSize
# The base value for resize percent calculation
config resizePercentOf screenSize
@anfleene
anfleene / gist:5355071
Created April 10, 2013 14:23
Strip trailing whitespace before every buffer write
" Strip trailing whitespace
function! <SID>StripTrailingWhitespaces()
" Preparation: save last search, and cursor position.
let _s=@/
let l = line(".")
let c = col(".")
" Do the business:
%s/\s\+$//e
" Clean up: restore previous search history, and cursor position
let @/=_s
@anfleene
anfleene / ruby_debug_pow.markdown
Created June 8, 2012 16:33 — forked from alexagui/ruby_debug_pow.markdown
How to Ruby Debug with Pow

How to Ruby Debug with Pow

Below are steps I followed to get ruby debugger ruby-debug running with Pow. Based on info from this thread basecamp/pow#43 and this blog post http://flochip.com/2011/04/13/running-pow-with-rdebug/

1) Update your Gemfile

Assuming you're writing your app in Ruby 1.9 and using Bundler, just add the dependency to your development gems:

@anfleene
anfleene / gist:1730482
Created February 3, 2012 14:42
If you do this STOP JUST STOP!!!
begin
#dangerous API Call that fails a ton
rescue Exception => e
puts e.message
end
#result that sort of looks like a success
@anfleene
anfleene / haml_filename_comment.rb
Created May 26, 2011 20:48
A monkey patch to include an html comment where a template starts and stops in development mode for rails
Haml::Engine.class_eval do
alias_method :initialize_without_file_comments, :initialize
def initialize(template, options ={})
template = template.dup
template.insert(0,"/ BEGIN #{options[:filename]}\n")
template.insert(-1,"\n/ END #{options[:filename]}")
template.freeze
initialize_without_file_comments(template, options)
end