Skip to content

Instantly share code, notes, and snippets.


Julien Breux JulienBreux

View GitHub Profile
JulienBreux /
Last active Aug 14, 2021
Kubernetes term aliases
# Used to run minikube shortly
alias mk="minikube"
# Used to run kubectl shortly
alias k="kubectl"
# Used to get ...
alias kg="kubectl get"
# Used to get all pods

Keybase proof

I hereby claim:

  • I am julienbreux on github.
  • I am julienbreux ( on keybase.
  • I have a public key ASDX3SYzzRVnHSFo7v1PiM8YwElxqPLbTOlj0feEKRLmUgo

To claim this, I am signing this object:

JulienBreux / server.rb
Last active Aug 29, 2015
Micro-Server to validate oAuth2 roles :)
View server.rb
# How to use:
# $ruby server.rb
# $curl --header "X-Company-Roles: manager" --header "X-Company-Roles: admin" http://localhost:2345/
require 'socket'
require 'json'
server ='localhost', 2345)
JulienBreux /
Last active Aug 29, 2015
Specific Gem Version
gem rails _1.0.0_ --version
gem rails _2.0.0_ --version
View .zshrc
alias debian="docker run --rm -ti debian:jessie /bin/bash"
alias ubuntu="docker run --rm -ti ubuntu:jessie /bin/bash"
#!/usr/bin/env bash
# Simple move this file into your Rails `script` folder. Also make sure you `chmod +x`.
# Please modify the CONSTANT variables to fit your configurations.
# The script will start with config set by $PUMA_CONFIG_FILE by default
View app-model-document.rb
class Document < ActiveRecord::Base
belongs_to :parent, class_name: 'Document'
def self.get_ancestors(who)
@tree ||= []
# @tree is instance variable of Document class object not document instance object
# so: Document.get_instance_variable('@tree')
if who.parent.nil?
View client.js
var ioClient = require('')('');
ioClient.on('connect', function () {
ioClient.emit('broadcast', 'first-event', 'Hello');
ioClient.emit('broadcast', 'second-event', 'World');
View etc-network-interfaces
auto vmbr1
iface vmbr1 inet static
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '' -o vmbr0 -j MASQUERADE
JulienBreux / Dockerfile
Created Feb 10, 2015
Docker + Rails + Redis + Postgres
View Dockerfile
# base on latest ruby base image
FROM ruby:latest
# update and install dependencies
RUN apt-get update -qq
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential libpq-dev nodejs apt-utils postgresql-client
# setup app folders
RUN mkdir /sample
WORKDIR /sample