14 November 2014

A fast and simple image gallery in PHP

I've just finished a very basic and simple image gallery/explorer in one single PHP file with zero configurazion needed. :)

Demo: http://mira.scavenger.ch/~pascal/psg/gallery.php

Download: https://github.com/pascalbrax/psg

10 November 2014

14 March 2014

Send SMS from Bash script

Since Gnokii failed me without any valid reason, I tried to write myself a piece of code to send SMS from the Linux bash command line.
This script is still buggy and has several race condition issues if you usually send more SMS at once.

shift 1

echo -e -n "AT+CMGF=1 \015" > $MODEM
echo -e -n "AT+CMGS=\"$NUMBER\" \015" > $MODEM
echo -e -n "$TEXT \015" | cut -c1-150 | tr -d '\n' > $MODEM
echo -e -n "\032" > $MODEM
echo To: $NUMBER
echo Text: $TEXT
echo SMS sent.