Skip to content

Instantly share code, notes, and snippets.

View yesnault's full-sized avatar

Yvonnick Esnault yesnault

View GitHub Profile
@yesnault
yesnault / gist:c9cfac2d9d040fe43f72
Created December 16, 2014 21:18
Vagrantfile with docker and fig
# -*- mode: ruby -*-
# vi: set ft=ruby :
BOX_NAME = ENV['BOX_NAME'] || "ubuntu"
BOX_URI = ENV['BOX_URI'] || "http://files.vagrantup.com/precise64.box"
VF_BOX_URI = ENV['BOX_URI'] || "http://files.vagrantup.com/precise64_vmware_fusion.box"
AWS_BOX_URI = ENV['BOX_URI'] || "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"
AWS_REGION = ENV['AWS_REGION'] || "us-east-1"
AWS_AMI = ENV['AWS_AMI'] || "ami-69f5a900"
AWS_INSTANCE_TYPE = ENV['AWS_INSTANCE_TYPE'] || 't1.micro'
@yesnault
yesnault / gist:b9912f681dd1b7ddc803
Created August 21, 2014 12:53
Soapower - useful query
// Count request per environment
db.requestData.aggregate( [ { $group : { _id : "$environmentName", count: { $sum: 1 } } } ] );
// Count all services
db.environments.aggregate(
[
{ $unwind : "$services" },
{ $group : { _id : null, number : { $sum : 1 } } }
]
);
@yesnault
yesnault / utilSinceDB.sh
Created January 26, 2014 16:18
Logstash - Query Sincedb for Processed Files
#!/bin/bash
#
#
# Usage
# This script do nothing, it juste show files that are scanned or not by
# Logstash and plugin File. 3 outputs
#
# ./utilSinceDB.sh
# ./utilSinceDB.sh | grep "not found in sincedb"
# ./utilSinceDB.sh | grep "to delete"
@yesnault
yesnault / createUserAndImportDumpMysql.sh
Created July 23, 2013 19:49
Usage : createUserAndImportDumpMysql.sh ./dumpToImport.sql
#!/bin/bash
###############
# use this script at your own risk (usefull for developpers only)
# usage : createUserAndImportDumpMysql.sh ./dumpToImport.sql
#
# drop the user IDBASE
# drop the database IDBASE
# create the user IDBASE with password IDBASE and all rights on IDBASE database
# create database IDBASE