Skip to content

Instantly share code, notes, and snippets.

View robsonpeixoto's full-sized avatar

Robson Roberto Souza Peixoto robsonpeixoto

View GitHub Profile
@robsonpeixoto
robsonpeixoto / marathonlb-kill-old-process.py
Created March 31, 2017 02:51
Kill old haproxy process Raw
#!/usr/bin/env python2
# pip install pid, psutil, raven
import argparse
import datetime
import logging
import logging.handlers
import sys
import time
@robsonpeixoto
robsonpeixoto / keybase.md
Created September 1, 2016 16:27
keybase

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@robsonpeixoto
robsonpeixoto / FakeHostnameVerifier.java
Last active April 8, 2016 20:21
Http Client Trust All
import javax.net.ssl.HostnameVerifier;
/**
* This class implements a fake hostname verificator, trusting any host
* name.
*
* @author Francis Labrie
*/
public class FakeHostnameVerifier implements HostnameVerifier {
import com.twitter.finagle.Http
import com.twitter.finagle.param.Stats
import com.twitter.finagle.stats.Counter
import com.twitter.server.TwitterServer
import com.twitter.util.Await
import io.finch._
import io.finch.circe._
import io.circe.generic.auto._
object Main extends TwitterServer {
/**
* b-bit Minwise hashing の Java 実装です。
* <p>
* 参考文献 : <a href="http://research.microsoft.com/pubs/120078/wfc0398-lips.pdf">b-Bit Minwise Hashing</a>
* </p>
*
* @author KOMIYA Atsushi
*/
public class MinHash {
private final int numBits;
#
# This script is a tool that helps you calculate the benefits in occupied size on disk
# of the ext4 inlinedata new feature of the Linux kernel 3.8.0 see http://www.h-online.com/open/features/What-s-new-in-Linux-3-8-1804240.html
#
# Just run it on your ext4 mountpoints and it will tell give you the trade off for all your files depending on the inode size you # choose.
#
# To get you current inode size you can do :
# $ tune2fs -l /dev/mapper/isw_ddbeejgcgd_Volume03 | grep Inode
# Inode count: 15040512
# Inodes per group: 8192