Skip to content

Instantly share code, notes, and snippets.

View hjr3's full-sized avatar

Herman J. Radtke III hjr3

View GitHub Profile
@hjr3
hjr3 / managers.md
Last active October 9, 2024 09:44
My research on managers in Technology

Managers in Technology

CTO vs VP of Engineering

CTO is responsible for the technology "vision" (future)

  • should report to the CEO
  • understands how technology fits into the larger, real world
  • responsible for the culture
  • head architect is the CTO in training
  • must be excellent at communication
@hjr3
hjr3 / fpm-netstat.sh
Last active January 18, 2018 15:41
Handy script to get strace to attach to all php-fpm workers
netstat -apn | grep $outgoing_ip_address
@hjr3
hjr3 / bdd.md
Last active December 14, 2015 03:38
Notes from LA Ruby Conf 2013 - BDD: It's not your test framework, it's you

BDD: It's not your test framework, it's you

  • @robb1e
  • @moonmaster9000

Notes

  • brittle tests do not reveal intent. they explain how, not what.
  • create your own DSL about the important things your domain
@hjr3
hjr3 / refactoring-models-with-patterns.md
Last active December 14, 2015 03:28
Notes from LA Ruby Conf 2013 talks - Refactoring Fat Models with Patterns
@hjr3
hjr3 / pennies.php
Last active December 13, 2015 23:09
Integer precision loss when converting float to integer.
<?php
$outstandingBalance = -34.05;
$pennies = abs($outstandingBalance) * 100;
var_dump((int) $pennies); // => int(3404)
@hjr3
hjr3 / rlimit.c
Last active December 12, 2015 07:58
How does setrlimit work when the value is 0?
/*
*
* gcc -o rlimit rlimit.c
*/
#include <sys/resource.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
@hjr3
hjr3 / datetime-scrum.md
Last active December 11, 2015 08:08
What do MySQL datetime types and scrum have in common?
def cardinal_define(name, &proc_over_proc)
self.class.send(:define_method, name) do |a_value, &a_proc|
proc_over_proc.call(a_proc).call(a_value)
end
end
cardinal_define(:maybe) do |a_proc|
lambda { |a_value|
a_proc.call(a_value) unless a_value.nil?
}
@hjr3
hjr3 / thrush.rb
Created January 8, 2013 07:36
A basic way to formulate a Thrush
class Kernel
def let it
yield it
end
end
@hjr3
hjr3 / do-not-be-afraid-of-new-technology.md
Last active December 10, 2015 09:28
Do Not Be Afraid Of New Technology