Skip to content

Instantly share code, notes, and snippets.

View DaffyDuke's full-sized avatar

Olivier Duquesne DaffyDuke

View GitHub Profile
@DaffyDuke
DaffyDuke / keybase.md
Last active March 3, 2017 10:54
Keybase proof

Keybase proof

I hereby claim:

  • I am daffyduke on github.
  • I am daffyduke (https://keybase.io/daffyduke) on keybase.
  • I have a public key ASCNMgGzRBRs_h82UpqHM6NNJVew98uOVVAdxqQdogF26go

To claim this, I am signing this object:

@DaffyDuke
DaffyDuke / 0_reuse_code.js
Created March 3, 2017 11:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Here is a tip for those using the Puppet ‘augeas’ native resource: always use the ‘incl’ and the ‘lens’ parameters. Without that, Augeas will autoload all of the files defined in its lenses. On an empty VM that can take up to 1 second.

Here is my base test file:

$logrotate_file = '/etc/logrotate.d/httpd' 
augeas {
    'logrotate-httpd':
    context => "/files${logrotate_file}/rule/",     
    changes => [
        'set schedule daily',
@DaffyDuke
DaffyDuke / journalctl.md
Created March 3, 2017 20:07
Systemd, systemct & journalctl sont sur un bateau

Full disk suite à l'activation de la persistence

when : enable systemd journal persistence (default limit to 10% of its partition)

vraiment ?

# du -sh /var/log/journal/
905M /var/log/journal/
# df -h /var/log
Filesystem Size Used Avail Use% Mounted on
@DaffyDuke
DaffyDuke / Readme.md
Last active March 4, 2017 12:40
conversion d'OVA

Voici un petit script qui permet de convertir une image packer buildée avec VBox en fichier OVA utilisable par VMWare.L'idée est de modifier le XML (le .ovf) pour supprimer les contrôleurs IDEs, la carte son, et surtout de modifier le type de virtualisation, sinon VMWare rejette l'image.Source : https://github.com/asyd

@DaffyDuke
DaffyDuke / _etc_crowbar_network.json
Created March 4, 2017 12:43
Openstack Suse Cloud
{
"attributes": {
"network": {
"conduit_map": [
{
"conduit_list": {
"intf0": {
"if_list": [
"1g1",
"1g2"
#!/bin/env python
#
# Envoi une demande de statistiques a une application
# mise en forme des resultats avec separateur :
# param 1 : IP de destination
# param 2 : port de destination
#
# 2009/09/21 V. PAGNON Creation
#
# ____________________________BEGIN_IMPORT__________________________________
@DaffyDuke
DaffyDuke / VxVM mini Howto.md
Created March 4, 2017 14:08
VxVM mini Howto

Binaires VCS (Veritas Cluster Server) : dans /opt/VRTS* (notamment /opt/VRTSvcs/bin)

Log: dans /var/VRTSvcs/log (surtout engine*.log)

Conf: dans /etc/VRTSvcs/conf/config

Commandes de base

  • hastart : demarre un noeud (a faire sur les N noeuds si le cluster est arrete)
@DaffyDuke
DaffyDuke / _etc_profile_bastion.md
Last active March 4, 2017 14:30
Some personnal config files
# Clean exit if CTRL-C !
function_trap_ctlc()
{
        echo ""
        echo "[ $MACHINE ] CTRL-C detecte: la clef SSH V2 de PROD doit etre creee."
        echo "Merci de laisser finir le processus de generation de la clef id_dsa/id_dsa.pub"
        echo "Vous devez vous re-logguer !"
        read
        /bin/rm /tmp/.id_dsa_lock
@DaffyDuke
DaffyDuke / Apache.md
Last active March 4, 2017 14:36
Administration Web

APACHE PROCESSES / THREADS TUNING

The goal of this doc is to give you some tips to help tuning the worker MPM of the Apache web server.

The worker MPM

This Multi-Processing Module (MPM) implements a hybrid multi-process multi-threaded server. By using threads to serve requests, it is able to serve a large number of requests with less system resources than a process-based server. Yet it retains much of the stability of a process-based server by keeping multiple processes available, each with many threads.

The most important directives used to control this MPM are ServerLimit (default is 16), which controls the max number of process started by Apache, ThreadsPerChild (default is 25), which controls the number of threads deployed by each child process and MaxClients (default is 256), which controls the maximum total number of threads that may be launched and which can't be greater than (ServerLimit * ThreadsPerChild). The memory impact