Skip to content

Instantly share code, notes, and snippets.

View frbayart's full-sized avatar
🐼
it's a raining day !

Francois BAYART frbayart

🐼
it's a raining day !
View GitHub Profile
@frbayart
frbayart / handlers-main.yml
Created May 17, 2013 10:03
main handlers
---
# ZABBIX - FIXME
- name: zabbix log
action: command name=zabbix_send
- name: zabbix-agent start
action: service name=zabbix-agent state=started
- name: zabbix-agent restart
action: service name=zabbix-agent state=restarted
- name: zabbix-agent stop
action: service name=zabbix-agent state=stopped

Life and death of Unicorns

The introduction of our Unicorn management tool, Polycorn.

jump into our train!

Photo by Protohiro from Flickr

At Fotopedia, we use Unicorn to serve our main Rails application. Every day, we restart our application several times, spawning and killing hundred of Unicorns. Managing graceful restarts is a complex task, and requires careful monitoring and command. This article introduces our tool Polycorn, a Unicorn management program.

[[MORE]]

10:15 < A-Kaser> bonjour
10:16 < A-Kaser> j'ai un client qui vient d'ouvrir un compte en début de semaine (client belge paiement paypal)
10:16 < A-Kaser> et nous aurions voulu 2 serveurs (prod, staging)
10:16 < A-Kaser> mais ça semble pour le moment bloqué sur le premier serveur, est ce possible de débloquer cette limite ?
10:20 <@romaric> avec kbis oui
10:21 < A-Kaser> c'est possible, ça ne sera pas un kbis mais l'équivalent belge
10:23 <@romaric> avec en + photocopie de la cni et de la cb (avec 4 dernier chiffre offusqué)
10:23 <@romaric> la cb associé zau compte paypal
10:26 < A-Kaser> romaric: ok c'est un peu strict , je vais voir si c'est faisable
10:26 <@romaric> pas de bras ....
@frbayart
frbayart / NamedFacebookType
Created February 4, 2015 19:13
Comment faire cela en Scala ? (surtout le @facebook)
public class Music extends NamedFacebookType {
@Facebook("category")
private String category;
public Date getCategory() {
return category;
}
}
@frbayart
frbayart / FacebookApiMusic
Created February 15, 2015 18:25
FacebookApiMusic
case class FacebookData(category: String, name: String, created_time: String, id: String)
case class FacebookPaging(next: String)
case class FacebookApiMusic(data: Seq[FacebookData], paging: FacebookPaging)
implicit val facebookDataReads: Reads[FacebookData] = (
(JsPath \ "category").read[String] and
(JsPath \ "name").read[String] and
(JsPath \ "created_time").read[String] and
(JsPath \ "id").read[String]
)(FacebookData.apply _)
@frbayart
frbayart / gist:d9d5462514877a96676c
Created April 18, 2015 07:35
Résumé, Non aux "boîtes noires" dans nos réseaux !
Les médias n'ont fait que peu de cas de cette victoire, préférant comme toujours la polémique aux sujets de fond !
Il y a eut au moins 60 sociétés signataires (et une 20aines d'individuels qui ne lisent pas les consignes :)), ce qui est tout à fait significatif. Pour faire un rapprochement, une réunion FRnOG, c'est environ 240 sociétés différentes (60/240 => 25%).
Je viens de fermer la pétition en déclarant *Victoire!* et voici pourquoi :
Le but de la pétition a été atteint !
Le projet de loi n'instaure plus une vague idée de surveillance permanente en mode sniffer directement en coupure (passive (quoi que... la suite logique c'était la possibilité de modifier les paquets...)) sur vos réseaux. Un retour en arrière à l'époque de la Stasi ou encore actuelle du Patriot Act...
@frbayart
frbayart / build.sh
Created July 28, 2015 13:24
mvn install on rudder pugin itop
Francoiss-MacBook-Pro:rudder-plugin-itop frbayart$ mvn -Dmaven.test.skip=true install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building itop-connector 3.0.5-SNAPSHOT-1.0.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ itop-connector ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/frbayart/woc/Amoobi/dev/vendor/rudder/rudder-plugin-itop/src/main/resources
@frbayart
frbayart / build.sh
Created July 28, 2015 13:35
build rudder projects
#! /bin/bash
INSTALL_DIR=$(pwd)
export MAVEN_OPTS=-Xmx512m
for rudderProject in rudder-parent-pom rudder-commons scala-ldap ldap-inventory cf-clerk rudder rudder-plugin-itop; do
tput setaf 2
echo "Building ${rudderProject}."
tput sgr0
cd ${INSTALL_DIR}
@frbayart
frbayart / elk_remove-old-indexes.sh
Created September 8, 2015 08:18
script to delete old indexes in Elasticsearch
#! /bin/bash
# Francois Bayart - 04 Feb 2015
# script to delete old indexes in Elasticsearch
#
# To keep some specific date, it's possible to add it in DATE_TO_KEEP variable (one date per line, format YYYY.MM.DD)
# Take care about to always use 2 digits for days and months
#
HOW_MANY_DAYS_TO_KEEP=10
@frbayart
frbayart / a-guide-to-ncf-api.txt
Last active September 11, 2015 12:53 — forked from VinceMacBuche/a-guide-to-ncf-api.txt
Api ncf-builder
How to get techniques from a ncf api
You actually need the jsessionid cookie from your navigator (log in to Rudder and inspect your cookie), I will add authentication via rudder api token very soon
curl 'https://server.rudder/ncf/api/techniques?path=/var/rudder/configuration-repository/ncf' -k --cookie "JSESSIONID=Valueofyourcookie"
To send a technique to a server (see file api.json for exact content):
curl -X PUT 'https://server.rudder/ncf/api/techniques' -k --cookie "JSESSIONID=cookie" -d @api.json -v -H "Content-Type: application/json"