This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
lftp ftp://user:[email protected] -e "set ftp:ssl-allow no; mirror -R /var/backup /backup ; quit" | |
# pour voir le dossier | |
# lftp ftp://user:[email protected] -e "set ftp:ssl-allow no;" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#date du jour | |
DATE=`date +%y_%m_%d` | |
#liste des dossier | |
LISTEBDD=$( echo 'show databases' | mysql -uroot -pPWD ) | |
for SQL in $LISTEBDD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function scrollToAnchor(id){ | |
var aTag = $("#"+id); | |
$('html,body').animate({scrollTop: aTag.offset().top - 50},'slow'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//brightness : http://couchdb.ovh:5984/database/_design/mesures/_view/brightness?group=true | |
//map : | |
function(doc, req) { | |
var date = dateFromISO8601(doc.datetime); | |
emit(date.getDate(), doc.brightness); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int photocellPin = A1; | |
int photocellReading; | |
const int sensorPin = 0; | |
const int hydroAnalog = A2; | |
void setup(void) { | |
Serial.begin(9600); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var serialport = require("serialport"); | |
var SerialPort = serialport.SerialPort; | |
var sp = new SerialPort("/dev/ttyACM0", { baudrate: 9600, parser: serialport.parsers.readline("\n\r") }, false); | |
var rest = require('restler'); | |
var callback = function (error) { | |
if ( error ) { | |
console.log('failed to open: '+error); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int photocellPin = 0; // the cell and 10K pulldown are connected to a0 | |
int photocellReading; // the analog reading from the analog resistor divider | |
void setup(void) { | |
// We'll send debugging information via the Serial monitor | |
Serial.begin(9600); | |
} | |
void loop(void) { | |
photocellReading = analogRead(photocellPin); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
first install | |
apt-get install ruby rubygems ruby-dev libsqlite3-dev | |
gem install mailcatcher | |
puis ajouter un script pour le lancer | |
https://gist.github.com/Bouhnosaure/49d733254d11d4240364 | |
nano /etc/init.d/mailcatcher | |
ne pas oublier de changer les ip pour les faire correspondre a l'ip du server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PID_FILE=/var/run/mailcatcher.pid | |
NAME=mailcatcher | |
PROG="/usr/bin/env mailcatcher" | |
USER=mailcatcher | |
GROUP=mailcatcher | |
start() { | |
echo -n "Starting MailCatcher" |