Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am juniorz on github.
  • I am kingnaldo (https://keybase.io/kingnaldo) on keybase.
  • I have a public key whose fingerprint is 9A86 612D A8F1 B09F CA17 3B07 0854 23D8 A9D5 A4A8

To claim this, I am signing this object:

@juniorz
juniorz / results.txt
Last active August 29, 2015 14:00
Stringify hash keys
% ruby -v
ruby 1.8.6 (2010-09-02 patchlevel 420) [i686-darwin13.1.0]
% ruby ./stringify_keys.rb
Rehearsal ------------------------------------------------
slow random: 1.750000 0.000000 1.750000 ( 1.763713)
slow worst: 2.730000 0.040000 2.770000 ( 2.768919)
fast random: 1.350000 0.000000 1.350000 ( 1.355698)
fast worst: 2.520000 0.010000 2.530000 ( 2.525618)
--------------------------------------- total: 8.400000sec
@juniorz
juniorz / README.md
Last active September 23, 2023 12:54
sysdig sample capture file

Test file generated for sysdig homebrew formula

This is how it was generated

$ mkdir -p /tmp/sysdig && cd /tmp/sysdig
$ sudo sysdig -w sample.scap evt.type=open and fd.name contains /tmp/sysdig

The test performed should be

$ sudo sysdig -r sample.scap evt.type=open fd.name contains /tmp/sysdig/sample.scap

@juniorz
juniorz / Dockerfile
Last active December 30, 2015 19:09
Erlang
FROM garage/base
MAINTAINER Reinaldo Junior <[email protected]>
RUN apt-get update && apt-get upgrade -y
## Installs Erlang from Erlang Solutions
RUN /var/garage/install curl &&\
curl -q http://packages.erlang-solutions.com/debian/erlang_solutions.asc | apt-key add - &&\
echo "deb http://packages.erlang-solutions.com/debian $(/var/garage/base-release) contrib" > /etc/apt/sources.list.d/erlang-solutions.list &&\
@juniorz
juniorz / Dockerfile
Last active December 30, 2015 18:18
Ruby IRB 2.0
# -------------------------------------------------------------------
# $ docker build -t garage-env/irb20 git://gist.github.com/7866196.git
# -------------------------------------------------------------------
# $ docker run -i -v `pwd`:/garage -t garage-env/irb20
# -------------------------------------------------------------------
FROM garage-env/ruby20-base
MAINTAINER Reinaldo Junior <[email protected]>
@juniorz
juniorz / Dockerfile
Last active December 30, 2015 18:18
Ruby 2.0
# -------------------------------------------------------------------
# $ docker build -t garage-env/ruby20 git://gist.github.com/7866174.git
# -------------------------------------------------------------------
# $ echo 'puts "Hello"' > hello.rb
# $ docker run -v `pwd`:/garage -t garage-env/ruby20 foo.rb
# Heloo
# -------------------------------------------------------------------
FROM garage-env/ruby20-base
@juniorz
juniorz / Dockerfile
Last active December 30, 2015 18:09
Ruby 2.0 (base)
# -------------------------------------------------------------------
# $ docker build -t garage-env/ruby20-base git://gist.github.com/7865680.git
# -------------------------------------------------------------------
FROM garage-env/base
MAINTAINER Reinaldo Junior <[email protected]>
## Installs Ruby 2.0.0 from Brightbox PPA
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6 &&\
@juniorz
juniorz / Dockerfile
Last active December 30, 2015 17:59
Base docker image
# garage-env/base
# volumes?
# env variables?
# -------------------------------------------------------------------
# $ docker build -t garage-env/base git://gist.github.com/7865019.git
# -------------------------------------------------------------------
#
# -------------------------------------------------------------------
@juniorz
juniorz / Dockerfile
Last active December 28, 2015 17:19
ThoughtWorks Go Agent
# -------------------------------------------------------------------
# $ docker build -t juniorz/go-agent git://gist.github.com/7534920.git
# -------------------------------------------------------------------
# 1. $ docker run -d -l go-server:go_server -p 8080:8153 juniorz/go-agent
# 2. Go to http://localhost:8080/go/
# -------------------------------------------------------------------
FROM phusion/baseimage:0.9.1
MAINTAINER Reinaldo Junior <[email protected]>
@juniorz
juniorz / Dockerfile
Last active December 28, 2015 16:19
ThoughtWorks Go Server
# -------------------------------------------------------------------
# $ docker build -t juniorz/go-server git://gist.github.com/7528566.git
# -------------------------------------------------------------------
# 1. $ docker run -d -p 8080:8153 juniorz/go-server
# 2. Go to http://localhost:8080/go/
# -------------------------------------------------------------------
FROM phusion/baseimage:0.9.1
MAINTAINER Reinaldo Junior <[email protected]>