Skip to content

Instantly share code, notes, and snippets.

AlexKovax /
Created Jan 19, 2014
This basic shell script uses the raspistill command to take a shot with different settings depending on the time. It's made to be called using a crontab
#fakewebcam script
TIME=$(date +"%H")
if [ ${TIME} -ge ${DAY} -a ${TIME} -le ${NIGHT} ]; then
#echo "It's day!"
raspistill -q 90 -w 640 -h 480 -t 60 -o /var/www/webcam.jpg
AlexKovax / crontab
Created Dec 25, 2013
This is a crontab that uses a builtin Z-Way server and wget to do some basic home automation
View crontab
# Edit this file to introduce tasks to be run by cron.
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
# For more information see the manual pages of crontab(5) and cron(8)
# m h dom mon dow command
AlexKovax / interfaces
Last active Jan 1, 2016
This is a simple conf file to set up the wireless adapter of a Raspberry Pi using Raspbian
View interfaces
#Basic /etc/network/interfaces file to access an encrypted AP
#Replace SSID by the name of the network the RPi must connect too
#Replace PASSWORD by the WPA password of the network
#loopback and ethernet
auto lo
iface lo inet loopback
iface eth0 inet dhcp
AlexKovax / kkbb-extractor.php
Last active Dec 18, 2015
A quick function to extract the name of the contributors from a Kiss Kiss Bank Bank "contributors" page
View kkbb-extractor.php
//returns an array with the names extracted
function name_extractor($url){
$html = file($url);
foreach($html as $ligne)
AlexKovax / flickr.html
Created Apr 20, 2013
This simple example shows you how to get the latest photos of any Flickr ID using an API call...
View flickr.html
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src=""></script>
//jsonFlickrFeed is the default callback function returned by flickr, let's use it...