Skip to content

Instantly share code, notes, and snippets.

Mathias Lafeldt mlafeldt

Block or report user

Report or block mlafeldt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mlafeldt / nginx.yaml
Created Apr 12, 2019
HPA based on CPU
View nginx.yaml
apiVersion: apps/v1
kind: Deployment
name: nginx
namespace: ae-ops-testing
app: nginx
# replicas: 1
mlafeldt / main.go
Created Mar 1, 2019
Lambda handlertrace example
View main.go
func main() {
type handlerFunc func(ctx context.Context, payload []byte) ([]byte, error)
func (h handlerFunc) Invoke(ctx context.Context, input []byte) ([]byte, error) {
log.Printf("[DEBUG] input = %s", string(input))
output, err := h(ctx, input)
log.Printf("[DEBUG] output = %s", string(output))
mlafeldt / spec.yaml
Created Oct 26, 2018
K8s JSON Logger Container
View spec.yaml
apiVersion: extensions/v1beta1
kind: Deployment
creationTimestamp: null
run: test
name: test
replicas: 1
mlafeldt / epsagon.yaml
Created Oct 8, 2018
CloudFormation stack for Epsagon to provide monitoring
View epsagon.yaml
Description: CloudFormation stack for Epsagon to provide monitoring.
Type: 'AWS::IAM::Role'
Version: 2012-10-17
- Effect: Allow
View fibonacci.go
package main
import "fmt"
func main() {
c := make(chan int)
quit := make(chan int)
go func() {
for i := 0; i < 10; i++ {
mlafeldt /
Last active Apr 19, 2019
AWS Resources recommend by
  • 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
View sns.go
package main
import (
mlafeldt / main.rb
Created Feb 14, 2017
Scientist example
View main.rb
require "scientist"
class MyExperiment
include Scientist::Experiment
attr_accessor :name
def initialize(name)
@name = name
mlafeldt / Dockerfile
Last active Jan 25, 2017
Push freshness metric to Prometheus Pushgateway
View Dockerfile
FROM alpine
RUN apk add --update bash curl ca-certificates
ADD /usr/bin/freshness
ENTRYPOINT ["/usr/bin/freshness"]
mlafeldt /
Created Jan 16, 2017
Byword Dropbox conflicts


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 “” 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.

You can’t perform that action at this time.