Skip to content

Instantly share code, notes, and snippets.

View bonclay7's full-sized avatar

Rodrigue Koffi bonclay7

View GitHub Profile
{
"title": "Quiz TSA Estounie",
"comments": "Ce quiz a pour but de recenser les parents d'autistes en Estounie",
"language": "fr",
"questions": [
{
"number": 1,
"type": "singleValue",
"title": "Avez Vous des enfants ?",
"answersTemplate": [
//
// AppDelegate.m
// Step1
//
// Created by Ro on 02/03/15.
// Copyright (c) 2015 Ro. All rights reserved.
//
#import "AppDelegate.h"
#define API_BASE_URL @"http://amazon-application-server:8080/MicroBlogging/api"
#!/usr/bin/env python
#
# Copyright (c) 2015 Orange
# guyrodrigue.koffi@orange.com
# morgan.richomme@orange.com
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
#
parser.add_argument("test_mode", help="Tempest test mode", nargs='?', default="smoke")
args = parser.parse_args()
if not args.test_name == "tempest":
if not args.test_mode == "smoke":
parser.error("test_mode is only used with tempest")
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package fr.ecp.sio.drawing;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;

A local network is a network that can only be realized on a single host. This is only used in proof-of-concept or development environments, because just about any other OpenStack environment will have multiple compute hosts and/or a separate network host.

A flat network is a network that does not provide any segmentation options. A traditional L2 ethernet network is a "flat" network. Any servers attached to this network are able to see the same broadcast traffic and can contact each other without requiring a router. flat networks are often used to attach Nova servers to an existing L2 network (this is called a "provider network").

A vlan network is one that uses VLANs for segmentation. When you create a new network in Neutron, it will be assigned a VLAN ID from the range you have configured in your Neutron configuration. Using vlan networks requires that any switches in your environment are configured to trunk the corresponding VLANs.

gre and vxlan networks are very simil

@bonclay7
bonclay7 / mem.py
Last active August 10, 2016 12:57
Memory stats with python
#!/usr/bin/python
import subprocess
import re
# Get process info
ps = subprocess.Popen(['ps', '-caxm', '-orss,comm'], stdout=subprocess.PIPE).communicate()[0]
vm = subprocess.Popen(['vm_stat'], stdout=subprocess.PIPE).communicate()[0]
# Iterate processes
@bonclay7
bonclay7 / challenge-2d-array.md
Last active April 25, 2016 21:14
few algorithms challenges

Objective

Given a 6×6 2D Array, A

1 1 1 0 0 0
0 1 0 0 0 0
1 1 1 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
@bonclay7
bonclay7 / pauseplay_aws_autoscaling.sh
Last active August 10, 2016 12:56
Pause and play autoscaling on AWS
#!/bin/bash -xe
# This script provide a way to pause/resume your autoscaling group
# created with a cloudformation stack
ARGC=$#
PRGNAME=$(basename $0)
ACTION=$1
CFN_STACK_NAME=$2
@bonclay7
bonclay7 / cleaning-temp-file.sh
Last active August 10, 2016 12:55
Bash trap example
#!/bin/sh
tf=/tmp/tf.$$
cleanup() {
rm -f $tf
}
trap "cleanup" EXIT