Skip to content

Instantly share code, notes, and snippets.

Romain Filirom1

Block or report user

Report or block Filirom1

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
@Filirom1
Filirom1 / divert.go
Last active Dec 2, 2018
divert windows in go
View divert.go
package main
import (
"encoding/binary"
"fmt"
"io"
"log"
"net"
"os"
"strconv"
View auto-codequality.sh
#!/usr/bin/env
docker run --interactive --tty --rm --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate engines:install
docker run --interactive --tty --rm --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze -f text
@Filirom1
Filirom1 / Test.class
Created Feb 20, 2018 — forked from evaryont/Test.java
A quick test to see if you have the JCE Unlimited Strength Jurisdiction Policy files installed. If you don't, in Java 6 you'll see 128. If you do, you'll see 2147483647. Thanks to http://stackoverflow.com/questions/11538746/check-for-jce-unlimited-strength-jurisdiction-policy-files
@Filirom1
Filirom1 / cri.md
Created Dec 5, 2017
CRI-O and CRI-Containerd
View cri.md

Install Golang

On a fresh CentOS 7.4, as root:

yum install -y golang git wget
@Filirom1
Filirom1 / portainer.sh
Created Feb 4, 2017
How to develop on portainer on centos 7
View portainer.sh
vagrant init centos/7
vagrant up && vagrant ssh
sudo yum install -y epel-release && sudo yum install -y docker npm git
git clone https://github.com/portainer/portainer.git && cd portainer
sudo ln -s /usr/bin/sha1sum /usr/bin/shasum
npm install && sudo npm i -g grunt
sudo systemctl start docker && sudo chmod o+rw /var/run/docker.sock && sudo setenforce 0
grunt build
grunt run-dev
@Filirom1
Filirom1 / big-rpm.sh
Created Jan 20, 2017
List rpm by size
View big-rpm.sh
rpm -qa --queryformat '%{size} %{name}\n' | sort -rn | more
@Filirom1
Filirom1 / custom-logger.rb
Created Jan 12, 2017
How to customize a logger in ruby
View custom-logger.rb
require 'logger'
module Dim
class Logger < ::Logger
def initialize(*)
super
@formatter = NoTimestampFormatter.new
end
end
@Filirom1
Filirom1 / unpackWAR
Created Nov 9, 2016
Script that unpack a WAR
View unpackWAR
#!/bin/bash
if [ "$#" -eq 0 ]; then
echo "Usage: unpackWAR war_file destination"
echo "Usage: curl -L war_url | unpackWAR destination"
elif [ "$#" -eq 1 ]; then
DEST=$1
mkdir -p $DEST
cat /dev/stdin | bsdtar -xvf - -C $DEST
elif [ "$#" -eq 2 ]; then
@Filirom1
Filirom1 / cluster.js
Created Oct 26, 2016
OpenTSDB proxy for debugging
View cluster.js
#!/usr/bin/env node
var clusterMaster = require("cluster-master")
clusterMaster({
exec: "proxy.js",
// exec: "proxy-simple.js",
size: 2,
silent: false,
signals: true,
repl: '/root/cluster-master.socket'
})
You can’t perform that action at this time.