Skip to content

Instantly share code, notes, and snippets.

View Bouhnosaure's full-sized avatar
🎺
Doot Doot

Alex Bouhnosaure

🎺
Doot Doot
View GitHub Profile
build_settings:
mysql:
host: 'localhost'
user: '-----'
pass: '-----'
setup:
mysql:
- "DROP DATABASE IF EXISTS -----;"
- "CREATE DATABASE -----;"
/*!
* OS.js - JavaScript Cloud/Web Desktop Platform
*
* Mysql Handler: Login screen and session/settings handling via database
* PLEASE NOTE THAT THIS AN EXAMPLE ONLY, AND SHOUD BE MODIFIED BEFORE USAGE
*
* Copyright (c) 2011-2016, Anders Evenrud <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#!/bin/bash
echo '#################################'
echo '# #'
echo '# FAIL2BAN INSTALL #'
echo '# #'
echo '#################################'
echo ''
apt-get install fail2ban
service fail2ban stop
#!/bin/bash
echo '#################################'
echo '# #'
echo '# FIREWALL CONFIGURATION #'
echo '# #'
echo '#################################'
echo ''
cat > /etc/iptables.firewall.rules << EOL
#!/bin/bash
SAMBATOOL=/usr/local/samba/bin/samba-tool
USER=admin
PASSWORD="PASSWORD"
HOST="DNS-SERV.TEST.LOCAL"
DOMAIN
For each new VM
create virtual mac and add it to physical properties in network-device
under E100
then add this lines to /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; VARIABLES GLOBALES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
breed [capteurs capteur]
breed [habitants habitant]
breed [batiments batiment]
breed [capteursTemperature capteurTemperature]
breed [capteursPresence capteurPresence]
breed [radiators rad]
@Bouhnosaure
Bouhnosaure / status_console.php
Last active November 6, 2015 12:41
Console status bar
<?php
public function show_status($done, $total, $size = 50)
{
static $start_time;
// if we go over our bound, just ignore it
if ($done > $total) return;
#!/bin/bash
# Dump Mongo Dbs database every night using mongodump
# Author: by yrushka.com
## Binary path ##
#MONGO="/usr/bin/mongo"
#MONGODUMP="/usr/bin/mongodump"
/usr/bin/mongodump --out /var/backup/mongodb/`date +"%Y_%m_%d_%H-%M__dump"`
tar -cvf /var/backup/mongodb/`date +"%Y_%m_%d_%H-%M__dump.tar"` /var/backup/mongodb/`date +"%Y_%m_%d_%H-%M__dump"`
#!/bin/bash
#date du jour
DATE=`date +%y_%m_%d_%H-%M`
mkdir /var/backup/mysql/$DATE
#liste des dossier
LISTEBDD=$( echo 'show databases' | mysql -uroot -pPASSWORD )