Skip to content

Instantly share code, notes, and snippets.

/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.editorConfig = function (config)
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
config.toolbar = 'Full';
@bahamut45
bahamut45 / repose-droit
Last active August 29, 2015 14:09
Repose droit pour owncloud
#!/bin/bash
###### Variables #######
owncloud_dir=/var/www/owncloud
sabnzb_dir=/var/Downloads
user_data=/var/www/owncloud/data
tmp_dir=/tmp/repose-droit
now=$(date +"%d_%m_%Y_%H_%M_%S")
lock=${tmp_dir}/repose-droit-${now}.lock
@bahamut45
bahamut45 / configure_kvm.bat
Last active August 29, 2015 14:07
Configure Kvm
@ECHO OFF
SETLOCAL EnableDelayedExpansion
TITLE CONFIGURE KVM GIPRECIA
:rne
echo.
echo.
echo. Entrer le rne de l'etablissement :
echo.
echo.
@bahamut45
bahamut45 / rtgi-rne
Created October 1, 2014 15:12
rtgi-rne
#!/usr/bin/ruby1.9.1
# encoding: utf-8
##########################################################################################
RTGI_URL = 'https://rtgi.giprecia.fr'
#########################################################################################
require 'yaml'
require 'mechanize'
<?php
$output = shell_exec('cat output | tr "\"" "|"');
$snmp = array_values(array_filter(explode("|",$output),"trim"));
$marque = trim(shell_exec("echo \"$snmp[0]\" | head -1 | awk '{print $1}'"));
$model = trim(shell_exec("echo \"$snmp[0]\" | head -1 | awk '{print $1,$3}'"));
$nom = $snmp[1];
$location = $snmp[2];
$info = array("marque" => $marque,"modele" => $model,"nom" => $nom,"emplacement" => $location);
var_dump($info);
?>
@bahamut45
bahamut45 / resultat.txt
Last active August 29, 2015 14:04
Tableau Switch
array(2) {
["RG1"]=>
array(2) {
[1]=>
array(4) {
["UNITE"]=>
string(2) "U1"
["IP"]=>
string(11) "10.118.6.30"
["NOM"]=>