Skip to content

Instantly share code, notes, and snippets.

View ronanguilloux's full-sized avatar

Ronan Guilloux ronanguilloux

View GitHub Profile
#!/bin/bash
# disk-usage from docker-experiments
# https://github.com/rsp/docker-experiments
# by Rafał Pocztarski - https://github.com/rsp
if [ $# -ne 1 ]; then
echo "Usage: $0 \"image1 image2 ...\""
exit 1
fi
@ronanguilloux
ronanguilloux / disk-usage.sh
Created October 8, 2016 08:48
Docker images disk usage calculation
#!/bin/bash
# disk-usage from docker-experiments
# https://github.com/rsp/docker-experiments
# by Rafał Pocztarski - https://github.com/rsp
if [ $# -ne 1 ]; then
echo "Usage: $0 \"image1 image2 ...\""
exit 1
fi

Multiple MySQL Versions with Homebrew

For homebrew version 0.9.5.

brew -v # => Homebrew 0.9.5

Install the current version of mysql.

# Install current mysql version

brew install mysql

var express = require('express');
var fs = require('fs');
var request = require('request');
var cheerio = require('cheerio');
var SimpleJson2Csv = require('simple-json2csv');
/*
package.json:
@ronanguilloux
ronanguilloux / akeneo-pim-ce-install.sh
Last active June 26, 2017 19:55
Akeneo PIM CE install script
#! /bin/bash
#
# install.sh
# Distributed under terms of the MIT license.
# Usage: $ install.sh
# Need a github-oauth.github.com in your global composer conf
LAST_TAG_NAME=$(curl -s https://api.github.com/repos/akeneo/pim-community-standard/tags | python -c 'import sys, json; print json.load(sys.stdin)[0]["name"]')
LAST_TAG_URL=$(curl -s https://api.github.com/repos/akeneo/pim-community-standard/tags | python -c 'import sys, json; print json.load(sys.stdin)[0]["zipball_url"]')
CURL_URL=$LAST_TAG_URL?access_token=$GITHUB_TOKEN
@ronanguilloux
ronanguilloux / akeneo-pim-ee-install.sh
Last active October 6, 2016 06:55
Akeneo PIM EE install script
#! /bin/bash
#
# install.sh
# Distributed under terms of the MIT license.
# Usage: $ install.sh
# Need a github-oauth.github.com in your global composer conf
#
LAST_TAG_NAME=$(curl -s https://api.github.com/repos/akeneo/pim-enterprise-standard/tags\?access_token\=$GITHUB_TOKEN | python -c 'import sys, json; print json.load(sys.stdin)[0]["name"]')
LAST_TAG_URL=$(curl -s https://api.github.com/repos/akeneo/pim-enterprise-standard/tags\?access_token\=$GITHUB_TOKEN | python -c 'import sys, json; print json.load(sys.stdin)[0]["zipball_url"]')
@ronanguilloux
ronanguilloux / UUID.js
Created November 28, 2015 14:41
UUID.js
// Reminder: this is not crypto, just UUID
// Source & licence: https://littlemaninmyhead.wordpress.com/2015/11/22/cautionary-note-uuids-should-generally-not-be-used-for-authentication-tokens/
function randomUUID() {
var s = [], itoh = '0123456789ABCDEF';
// Make array of random hex digits. The UUID only has 32 digits in it, but we
// allocate an extra items to make room for the '-'s we'll be inserting.
for (var i = 0; i < 36; i++) s[i] = Math.floor(Math.random()*0x10);
// Conform to RFC-4122, section 4.4
@ronanguilloux
ronanguilloux / akeneo.batch.job.md
Created November 10, 2015 17:02
akeneo:batch:job
~/pim$ php app/console akeneo:batch:job --help
Usage:
  akeneo:batch:job [options] [--] <code> [<execution>]

Arguments:
  code                     Job instance code
  execution                Job execution id

Options:
@ronanguilloux
ronanguilloux / basex.sh
Created October 28, 2015 17:10
Brew-installed BaseXGUI launch script w/ better RAM allocation
#! /bin/bash
#
# basex.sh
# Copyright (C) 2015 ronan <ronan@cider>
#
# Distributed under terms of the MIT license.
#
#!/bin/bash
@ronanguilloux
ronanguilloux / test.js
Last active August 29, 2015 14:25
Mocha based URLs HTTP code checker
/**
* Created by ronan on 27/07/2015.
*
* Principe:
*
* 1 - Create an urls.json file as described below
* 2 - install npm deps
* 3 - run mocha tests, the regular way
*
* How-to: