Skip to content

Instantly share code, notes, and snippets.

Working from home

BONNAURE Olivier solisoft

Working from home
Block or report user

Report or block solisoft

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View layout.html
<!DOCTYPE html>
<html lang="{{ lang }}">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="@css_vendors" />
<link rel="stylesheet" href="@css" />
solisoft / reorder.aql
Created Mar 5, 2019
ArangoDB / AQL : reorder collection
View reorder.aql
LET docs = (FOR doc IN @@collection SORT doc._key RETURN doc)
FOR i IN (0..(LENGTH(docs) - 1))
LET doc = docs[i]
UPDATE({ _key: doc._key, order: i }) IN @@collection
View docker-compose.yml
version: '3'
image: arangodb:3.4.1
restart: always
- db-data:/var/lib/arangodb3
View arangodb_migrate.rb
require 'net/http'
require 'json'
DB_USER_SRC = 'root'.freeze
DB_USER_DST = 'root'.freeze
DB_PASS_SRC = 'XXXX'.freeze
DB_PASS_DST = 'XXXX'.freeze
DB_ENDPOINT_SRC = 'http+tcp://'.freeze
DB_ENDPOINT_DST = 'http+tcp://'.freeze
DUMP_PATH = '/home/dump/'.freeze # must exist

Keybase proof

I hereby claim:

  • I am solisoft on github.
  • I am solisoft ( on keybase.
  • I have a public key ASBwAVlHY7lCxAqmsYdT_oq5hh8cRh9Fbgr25LZKUe8_Xwo

To claim this, I am signing this object:

solisoft / main.js
Last active Nov 27, 2017
ArangoDB Multipart/formdata
View main.js
'use strict';
const db = require('@arangodb').db;
const joi = require('joi');
const _ = require('lodash');
const createRouter = require('@arangodb/foxx/router');
const router = createRouter();
const querystring = require('querystring');
const crypt = require('@arangodb/crypto');
const fs = require("fs")
solisoft / auth.js
Created Nov 23, 2017
Authentification endpoint
View auth.js
'use strict';
const db = require('@arangodb').db;
const joi = require('joi');
const createRouter = require('@arangodb/foxx/router');
const sessionsMiddleware = require('@arangodb/foxx/sessions');
const jwtStorage = require('@arangodb/foxx/sessions/storages/jwt');
const createAuth = require('@arangodb/foxx/auth');
const auth = createAuth();
const router = createRouter();
solisoft /
Created Aug 24, 2017
Install ruby 1.9.3 within rbenv & archlinux
curl -fsSL | PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig:/usr/lib/pkgconfig rbenv install --patch 1.9.3-p551
require "kemal"
require "jwt"
require "json"
require "yaml"
require "arangocr"
require "redis"
# Load .env file
env_data = YAML.parse".env.yml") rescue Hash(String, String).new
env_data.each { |k, v| ENV[k.to_s] = v.to_s }
solisoft /
Last active Aug 13, 2017
multi rooms kemal websockets server
require "kemal"
require "json"
connected_sockets = {} of String => Array(HTTP::WebSocket)
connected_users = {} of String => Hash(String, JSON::Any)
def broadcast(data, sockets)
sockets.each do |socket|
socket.send data.to_json
You can’t perform that action at this time.