Skip to content

Instantly share code, notes, and snippets.

View joshrendek's full-sized avatar

Josh Rendek joshrendek

View GitHub Profile
## Default values for Traefik
image: traefik
imageTag: 1.7.0
## can switch the service type to NodePort if required
serviceType: NodePort
# loadBalancerIP: ""
# loadBalancerSourceRanges: []
whiteListSourceRange: []
externalTrafficPolicy: Cluster
replicas: 1
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller
namespace: kube-system
---
kind: DaemonSet
apiVersion: extensions/v1beta1
metadata:
@joshrendek
joshrendek / kube-registry.yaml
Created June 6, 2018 14:24 — forked from coco98/kube-registry.yaml
Docker registry on minikube
apiVersion: v1
kind: ReplicationController
metadata:
name: kube-registry-v0
namespace: kube-system
labels:
k8s-app: kube-registry
version: v0
spec:
replicas: 1
** (SyntaxError) web/controllers/streamer_controller.ex:11: unexpected comma. Parentheses are required to solve ambiguity in nested calls.
name := "ifcfg-api"
version := "1.0-SNAPSHOT"
resolvers += "wasted.io/repo" at "http://repo.wasted.io/mvn"
resolvers += "Big Bee Consultants" at "http://repo.bigbeeconsultants.co.uk/"
resolvers += "Big Bee Consultants 2" at "http://dl.bintray.com/rick-beton/maven/"
2016/09/06 16:41:12 [DEBUG] plugin: terraform: fatal error: concurrent map read and map write
2016/09/06 16:41:12 [DEBUG] plugin: terraform:
2016/09/06 16:41:12 [DEBUG] plugin: terraform: goroutine 48 [running]:
2016/09/06 16:41:12 [DEBUG] plugin: terraform: runtime.throw(0x2e7fd6a, 0x21)
2016/09/06 16:41:12 [DEBUG] plugin: terraform: /opt/go/src/runtime/panic.go:566 +0x95 fp=0xc4205b81a8 sp=0xc4205b8188
2016/09/06 16:41:12 [DEBUG] plugin: terraform: runtime.mapaccess1_faststr(0x2b0d6a0, 0xc4202000f0, 0x2e09072, 0x7, 0xc420134c00)
2016/09/06 16:41:12 [DEBUG] plugin: terraform: /opt/go/src/runtime/hashmap_fast.go:201 +0x4f3 fp=0xc4205b8208 sp=0xc4205b81a8
2016/09/06 16:41:12 [DEBUG] plugin: terraform: net/textproto.MIMEHeader.Get(0xc4202000f0, 0x2e09072, 0x7, 0xc42058ab00, 0xc4205b8310)
2016/09/06 16:41:12 [DEBUG] plugin: terraform: /opt/go/src/net/textproto/header.go:33 +0x75 fp=0xc4205b8240 sp=0xc4205b8208
2016/09/06 16:41:12 [DEBUG] plugin: terraform: net/http.Header.Get(0xc4202000f0, 0x2e09072, 0x7, 0x0

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@joshrendek
joshrendek / 2013-01-07-profiling-memory-leaky-sidekiq-applications-with-ruby-2.1.md
Created March 22, 2016 19:01
Profiling memory leaky Sidekiq applications with Ruby 2.1

My largest Sidekiq application had a memory leak and I was able to find and fix it in just few hours spent on analyzing Ruby's heap. In this post I'll show my profiling setup.

As you might know Ruby 2.1 introduced a few great changes to ObjectSpace, so now it's much easier to find a line of code that is allocating too many objects. Here is great post explaining how it's working.

I was too lazy to set up some seeding and run it locally, so I checked that test suite passes when profiling is enabled and pushed debugging to production. Production environment also suited me better since my jobs data can't be fully random generated.

So, in order to profile your worker, add this to your Sidekiq configuration:

if ENV["PROFILE"]
package main
import (
"fmt"
)
type ServiceResponse struct {
Foobar string
SomethingElse bool
}
package main
import (
"fmt"
"github.com/satori/go.uuid"
"os"
//"crypto/tls"
"bytes"
"encoding/json"
"github.com/Sirupsen/logrus"