Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Mike Fiedler miketheman

🏠
Working from home
View GitHub Profile
@miketheman
miketheman / chefdiff.sh
Last active May 24, 2016
Bash function to diff most recent Chef backup. Place in `/etc/profile.d/chefdiff.sh`
View chefdiff.sh
# Usage: `chefdiff <filename>`
chefdiff() {
p=`readlink -f $1`
f=`ls /var/chef/backup$p* | sort | tail -n 1`
diff -u $f $1
}
@miketheman
miketheman / datadog-role-delegation.json
Created May 18, 2016
Datadog AWS Integration Automated Setup - CloudFormation
View datadog-role-delegation.json
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"SharedSecret": {
"Default": "SOOPASEKRET",
"Description": "Shared Secret, aka External ID",
"Type": "String",
"NoEcho": "true"
}
},
@miketheman
miketheman / datadog-role-delegation.tf
Last active Aug 12, 2019
Datadog AWS Integration Automated Setup
View datadog-role-delegation.tf
# Read more about variables and how to override them here:
# https://www.terraform.io/docs/configuration/variables.html
variable "aws_region" {
type = "string"
default = "us-east-1"
}
variable "shared_secret" {
type = "string"
default = "SOOPERSEKRET"
View keybase.md

Keybase proof

I hereby claim:

  • I am miketheman on github.
  • I am miketheman (https://keybase.io/miketheman) on keybase.
  • I have a public key ASAvv9Z5J9DxlPsLOBx0QCKOAY42qSJvMNxWzR6t2tRLLQo

To claim this, I am signing this object:

View runner.log-shellsession
$ crystal build --release try_to_fail.cr
$ for i in `seq 10` ; do ./try_to_fail ; done
"first before"
Error writing datagram: Connection refused (Errno)
[4318973645] *Errno::new<String>:Errno +541
[4319016353] *UDPSocket#send<UDPSocket, String, Socket::IPAddress>:Int64 +593
[4319008402] main +10322
"first before"
Error writing datagram: Connection refused (Errno)
[4415098573] *Errno::new<String>:Errno +541
View gist:bee9a466051a02543a14
Error writing file: Connection refused (Errno)
[4422141682] *CallStack::unwind:Array(Pointer(Void)) +82
[4422141585] *CallStack#initialize<CallStack>:Array(Pointer(Void)) +17
[4422141544] *CallStack::new:CallStack +40
[4422213281] *Exception@Exception#initialize<Errno, String>:CallStack +33
[4422213203] *Errno#initialize<Errno, String>:CallStack +115
[4422213060] *Errno::new<String>:Errno +100
[4422250063] *UDPSocket@IO::FileDescriptor#unbuffered_write<UDPSocket, Slice(UInt8)>:Int32 +399
[4422253517] *UDPSocket@IO::Buffered#write<UDPSocket, Slice(UInt8)>:(Nil | Int32) +109
[4422253371] *UDPSocket@IO#write_utf8<UDPSocket, Slice(UInt8)>:Nil +59
@miketheman
miketheman / 1_command.log
Last active Feb 6, 2016
otto dev failure for vmware_fusion project
View 1_command.log
$ otto dev
==> Verifying created layer: consul
==> Verifying created layer: python2.7
==> Creating local development environment with Vagrant if it doesn't exist...
Bringing machine 'default' up with 'virtualbox' provider...
The clone environment hasn't been created yet. To clone from
another Vagrantfile, it must already be created with `vagrant up`.
It doesn't need to be running.
Additionally, the created environment must be started with a provider
@miketheman
miketheman / init_nginx.conf
Created Jan 21, 2016
default nginx configs
View init_nginx.conf
description "nginx - small, powerful, scalable web/proxy server"
start on filesystem and static-network-up
stop on runlevel [016]
expect fork
respawn
pre-start script
[ -x /usr/sbin/nginx ] || { stop; exit 0; }
@miketheman
miketheman / console.log
Created Jan 14, 2016
Crystal TravisCI build Stacktrace
View console.log
Using worker: worker-linux-docker-623b439b.prod.travis-ci.org:travis-linux-4
Build system information
Build language: crystal
Build group: stable
Build dist: precise
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
@miketheman
miketheman / linux_entropy.py
Created Dec 31, 2015
Datadog Agent Linux Entropy Available
View linux_entropy.py
from checks import AgentCheck
class LinuxEntropyCheck(AgentCheck):
def check(self, instance):
with open('/proc/sys/kernel/random/entropy_avail', 'r') as procfile:
data = procfile.read().strip()
self.gauge('system.kernel.entropy_available', int(data))