Skip to content

Instantly share code, notes, and snippets.

View mlafeldt's full-sized avatar

Mathias Lafeldt mlafeldt

View GitHub Profile
package main
import "fmt"
func main() {
c := make(chan int)
quit := make(chan int)
go func() {
for i := 0; i < 10; i++ {
@mlafeldt
mlafeldt / README.md
Last active April 19, 2019 11:21
AWS Resources recommend by https://acloud.guru/
  • AWS Documentation
  • AWS Service FAQs
  • AWS Whitepapers
    • Read early and study later
      • Architecting for the Cloud: AWS Best Practices
      • AWS Security Best Practices
    • Read before exam
      • Overview of Amazon Web Services
      • Overview of Security Processes
  • AWS Storage Services Overview
package main
import (
"encoding/json"
"log"
"github.com/apex/go-apex"
"github.com/apex/go-apex/sns"
)
@mlafeldt
mlafeldt / main.rb
Created February 14, 2017 15:28
Scientist example
require "scientist"
class MyExperiment
include Scientist::Experiment
attr_accessor :name
def initialize(name)
@name = name
end
@mlafeldt
mlafeldt / Dockerfile
Last active January 25, 2017 13:10
Push freshness metric to Prometheus Pushgateway
FROM alpine
RUN apk add --update bash curl ca-certificates
ADD freshness.sh /usr/bin/freshness
ENTRYPOINT ["/usr/bin/freshness"]
@mlafeldt
mlafeldt / byword.md
Created January 16, 2017 11:02
Byword Dropbox conflicts

Hi,

For a couple of months, I've been observing the following strange behavior in Byword:

I'm storing my documents to a folder that is backed by Dropbox. When saving a Markdown file with Cmd+S, I often get the following error:

The document “example.md” could not be saved. The file has been changed by another application.

This happens almost every time I have Dropbox enabled. In addition to this annoying message, my documents folder will contain lots of "conflicted copy" files, which I have to remove manually on a regular basis.

@mlafeldt
mlafeldt / postmortem.md
Created October 12, 2016 18:25
Deployer API Outage Postmortem

Deployer API Outage Postmortem

Date

2016-09-05

Authors

@mlafeldt
mlafeldt / all-requests.txt
Last active October 5, 2016 15:46
Slow Nomad requests
Oct 05 17:43:14 ip-10-8-4-91.eu-west-1.compute.internal nomad-server: 2016/10/05 15:43:13.940219 [DEBUG] http: Request /v1/job/wlc-wonderland-cluster-autoscaler/periodic-1475661600/summary (831.064µs)
Oct 05 17:43:14 ip-10-8-3-88.eu-west-1.compute.internal nomad-server: 2016/10/05 15:43:13.880426 [DEBUG] http: Request /v1/job/wlc-wonderland-cluster-autoscaler (752.494µs)
Oct 05 17:43:14 ip-10-8-3-88.eu-west-1.compute.internal nomad-server: 2016/10/05 15:43:13.934781 [DEBUG] http: Request /v1/job/wlc-wonderland-cluster-autoscaler/periodic-1475661900/summary (562.904µs)
Oct 05 17:43:14 ip-10-8-3-88.eu-west-1.compute.internal nomad-server: 2016/10/05 15:43:13.935924 [DEBUG] http: Request /v1/job/wlc-wonderland-cluster-autoscaler/periodic-1475662140/summary (402.74µs)
Oct 05 17:43:14 ip-10-8-3-88.eu-west-1.compute.internal nomad-server: 2016/10/05 15:43:13.949470 [DEBUG] http: Request /v1/job/wlc-wonderland-cluster-autoscaler/periodic-1475662500/summary (360.612µs)
Oct 05 17:43:14 ip-10-8
@mlafeldt
mlafeldt / postmortem.md
Last active March 27, 2024 09:23
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
@mlafeldt
mlafeldt / x.md
Last active July 4, 2016 09:05
How to sign Git commits using GPG under OSX