Skip to content

Instantly share code, notes, and snippets.

View serut's full-sized avatar

serut

  • French
View GitHub Profile
@serut
serut / main.yml
Created April 15, 2020 13:06
Reproductible issue ansible command and double pipe
- name: Create docker network if not existing
command: "cat /path/to/something/not/existing || ls -al /etc"
# command: "docker network inspect {{ role_regards_init_docker_network_name }} >/dev/null 2>&1 || docker network create --driver overlay --subnet={{ role_regards_init_docker_network_subnet }} --gateway={{ role_regards_init_docker_network_gateway }} {{ role_regards_init_docker_network_name }}"
# command: "docker network inspect regards_network_leo_2 >/dev/null 2>&1 || docker network create --driver overlay --subnet=10.11.4.0/24 --gateway=10.11.4.1 regards_network_leo_2"
Output :
$ ansible-playbook -i inventories/cs-integration regards.yml
@serut
serut / circuit.json
Last active March 27, 2020 19:46
Novation Circuit config file 7x3 for Melodics
// Launch circuit; take an empty synth line, set the scales to C minor (C on the top part and top left to choose minor)
// Then put all screen note mode (press Shift + Note)
// After that, just save the here under configuration as described in the following tutorial :
// https://melodics.com/support-articles/support-unknown-device
{
"controls_image": "",
"filters": [
],
"inputs": [
{
@serut
serut / index.md
Last active October 16, 2018 16:23
Postgres index on JSONB field

I'm running this test because a rumor assumes there is a difference between operators and functions in postgres.

DB infos

In our table we have a field (json_aip) that contains a JSONB looking like that:

{
	"properties": {
		"pdi": {
			"contextInformation": {
@serut
serut / phantomjs-test-in-console-with-coverage.coffee
Created June 23, 2016 17:18
serut/Spacejam phantomjs-test-in-console-with-coverage.coffee runs tests then save coverage
page = require('webpage').create()
system = require('system')
console.log("phantomjs: Running tests at #{system.env.ROOT_URL} using test-in-console and coverage")
page.onConsoleMessage = (message) ->
console.log(message)
page.open(system.env.ROOT_URL)
@serut
serut / script.sql
Created January 5, 2016 10:00
DBSchema SQLite issue
DROP TABLE IF EXISTS Foo;
CREATE TABLE Foo (
Id INTEGER NOT NULL,
Lastname VARCHAR( 32 ) ,
Firstname VARCHAR( 32 ) ,
PRIMARY KEY ( Id )
); //This is working so far
DROP TABLE IF EXISTS Foo;
CREATE TABLE Foo (