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
#Code officiel du MagPi | |
#!/usr/bin/python | |
import time | |
import RPi.GPIO as GPIO | |
#Il manque une ligne pour que ça marche GPIO.setmode(GPIO.BCM) | |
GPIO.setup(11, GPIO.IN) | |
while True: |
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 | |
interfaces=$(ifconfig |grep "Link"|awk '{print $1}') | |
interface=$(whiptail --inputbox "Listes des cartes reseaux\n-----------\n$interfaces" 0 0 "eth0" 3>&1 1>&2 2>&3) | |
ipaddress=$(ifconfig $interface|head -n2|tail -n1|awk '{print $2}'|sed -e 's/'addr:'//'|sed -e 's/'adr:'//'); | |
netmask=$(ifconfig $interface |head -n2|tail -n1|awk '{print $4}'|sed -e 's/'Mask:'//'|sed -e 's/'Masque:'//') | |
broadcast=$(ifconfig $interface |head -n2|tail -n1|awk '{print $3}'|sed -e 's/'Bcast:'//') | |
gateway=$(route |grep "default" |awk '{ print $2 }') |
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 | |
if [ $(id -u) -ne 0 ]; then | |
printf "Script must be run as root. Try 'sudo bash'\n" | |
exit 1 | |
fi | |
echo "Installation d'un serveur VNC sur la machine" | |
apt-get install tightvncserver |
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
form{} | |
form div {} | |
label | |
{ | |
display:block; | |
font-size : 20px ; | |
margin : 0 ; | |
padding : 5px 0 ; | |
color : #474242 ; | |
} |
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 wysiwyg() { | |
this.currentElmt; | |
this.toolbar; | |
this.toolbarWidgets; | |
this.widgets = []; | |
this.selector; | |
this.toolbarDocument; | |
this.currentDocument; | |
this.enable; |
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
<?php | |
/** | |
* Parsimony | |
* | |
* NOTICE OF LICENSE | |
* | |
* This source file is subject to the Open Software License (OSL 3.0) | |
* that is bundled with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://opensource.org/licenses/osl-3.0.php |
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
// scs3060f.cpp | |
// | |
// To compile this: gcc -o scs3060f scs3060f.cpp | |
// This program can be use to control SCS 3060f Remote Controlled Outlet | |
// By default you'll need a 433.92Mhz transmitter at GPIO 7 on your Raspberry PI | |
// Ce programme permet de controler des prises radio commandees SCS3060f | |
// Vous pouvez les acheter ici: | |
// http://scs-laboutique.com/Electricite/Commande+a+distance/prise+int+ext/3063+f+3600w+kit+3+prises+telecommandees+3600w+1+telecommande-566 | |
// |
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/sh | |
echo "Installing git-core to download wiringpi" | |
apt-get install git-core | |
echo "Downloading wiringpi" | |
cd /home/pi/Desktop | |
git clone git://git.drogon.net/wiringPi | |
echo "Building wiringpi" |
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
/* | |
emetteur.c | |
Ce programme permet de controler des prises SCS | |
Copyright (c) 2013 Sarrailh Remi | |
Ce programme est sous licence GPLv3 pour plus de detail: | |
http://www.gnu.org/licenses/gpl.html | |
Vous devez installer WiringPi avant pour cela tapez ces commandes: | |
------------------------------------------------------------------- |
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
0100 est le code de vérification | |
1 = 0 SUR 10 | |
2 = 0 SUR 12 | |
3 = 0 SUR 14 | |
4 = 0 SUR 16 | |
I = 10 | |
1 1 |
OlderNewer