Skip to content

Instantly share code, notes, and snippets.

View remisarrailh's full-sized avatar

Rémi Sarrailh remisarrailh

View GitHub Profile
@remisarrailh
remisarrailh / smb.conf
Created March 27, 2013 03:28
smb.conf pour le Raspberry PI
[global]
log file = /var/log/samba/log.%m
read raw = no
write raw = no
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
obey pam restrictions = yes
socket options = SO_KEEPALIVE TCP_NODELAY
map to guest = bad user
winbind trusted domains only = yes
encrypt passwords = yes
@remisarrailh
remisarrailh / partage
Created March 27, 2013 04:35
partage
#!/bin/bash
clear
echo "-----------------------"
echo "-----------------------"
echo "Installation du partage"
echo "-----------------------"
echo "-----------------------"
apt-get install samba
@remisarrailh
remisarrailh / menu
Last active December 15, 2015 11:18
menu
#!/bin/bash
MENU=$(whiptail --menu "Install Wizard By Sarrailh Remi" 0 0 0 \
"unsecure_samba" "Unsecure access to your PI" \
"lighttpd" "Install LigHTTPd and SQLite" \
"lighttpd_error" "Display PHP Errors" \
"wiringpi" "Install wiringPI" \
"gitsetup" "Setup username and email in git" \
"rootsetup" "Activate Root account" \
"yana" "Install yana (home automation)" \
@remisarrailh
remisarrailh / serveurweb
Last active December 15, 2015 11:19
serveurweb
#!/bin/bash
clear
echo "------------------------"
echo "------------------------"
echo "Installation de lighttpd"
echo "------------------------"
echo "------------------------"
apt-get install lighttpd
@remisarrailh
remisarrailh / parsimony
Created March 27, 2013 05:10
parsimony
#!/bin/bash
echo "---------------------------"
echo "---------------------------"
echo "Telechargement de parsimony"
echo "---------------------------"
echo "---------------------------"
wget https://github.com/parsimony/parsimony_cms/zipball/master
#include <SoftwareSerial.h>
int rxPin = 0;
int txPin = 1;
int analog0 = 0;
int analog1 = 1;
int analog2 = 2;
int analog3 = 3;
int analog4 = 4;
int bidon = 5;
@remisarrailh
remisarrailh / attiny85lumRF.ino
Last active December 15, 2015 18:29
Code pour construction d'une sonde de luminosité "maison", récupère la luminosité et l'envoie sur la fréquence de 433 mhz
/*
* Code pour construction d'une sonde de luminosité "maison", récupère la luminosité et l'envoie sur la fréquence de 433 mhz
* Pour un milieu plus lumineux (extérieur) utilisé une résistance de 1KOhms (moins de précision dans les ténèbres parcontre)
* Par défaut c'est fait pour une résistance de 10KOhms
* Fréquence : 433.92 mhz
* Protocole : Ridle (Radio Idle, protocole customisé basé sur home easy)
* Licence : CC -by -sa
* Matériel associé : Attiny85 + emetteur RF AM 433.92 mhz + résistance 10 kohms + Résistance PhotoLuminescente
* Auteur : Valentin CARRUESCO aka idleman ([email protected] - http://blog.idleman.fr)
//Test de conversion d'un integer en binaire puis en onde radio sur Arduino
//Chiffre vers 4bits, cette méthode permet de ne pas avoir à occuper de l'espace et le microcontrolleur
//pour la conversion du code radio (le compilateur va s'en charger)
const String code0 = "0000";
const String code1 = "0001";
const String code2 = "0010";
const String code3 = "0011";
const String code4 = "0100";
@remisarrailh
remisarrailh / pirecotest.ino
Last active December 15, 2015 21:29
PIR eco test
/*
* Test capteur PIR avec économie d'énergie
* La LED et l'attiny85 s'allume lorsque l'état du capteur PIR changent
* Par Sarrailh Rémi
* Licence gplv3
* http://www.tldrlegal.com/l/GPL3
* Demonstration of the pin change interrupt
* LED sur digital pin 0
* Capteur PIR Interrupt sur digital pin 2
* Source: Alex d'Inside Gadgets (http://www.insidegadgets.com)
/*
* Capteur PIR avec économie d'énergie et Communication RF (NOT FINISHED)
* Par Sarrailh Rémi
* Licence gplv3
* http://www.tldrlegal.com/l/GPL3
* Demonstration of the pin change interrupt
* RF DATA sur digital pin 0
* Capteur PIR Interrupt (INT0) sur digital pin 2
* Source: Alex d'Inside Gadgets (http://www.insidegadgets.com)
*/