Alternative syntax for control structures. PHP offers an alternative syntax for some of its control structures; namely, if, while, for, foreach, and switch. In each case, the basic form of the alternate syntax is to change the opening brace to
Raspberry PI install RPi.GPIO
To install on raspbian: apt-get -y install python-rpi.gpio raspberry-gpio-python package provides a class to control the GPIO on a Raspberry Pi. To get started with RPi.GPIO, it would be worthwhile reading the examples here. Note that this module is unsuitable for real-time
Linux: Netstat Command Examples
Netstat command displays various network related information such as network connections, routing tables, interface statistics, masquerade connections, multicast memberships etc. List All Ports (both listening and non listening ports) #netstat -a root@localhost:~# netstat -a | more Active Internet connections (servers
MySQL Utilities – Brief overview of command-line utilities
MySQL Utilities This is a brief overview of the MySQL command-line utilities. See their respective manual pages for further details and examples: mysqlauditadmin Monitor the audit log. Copy, rotate, and configure the audit log mysqlauditgrep Search the audit log. Output results to
GNUPG – gpg encrypt files
GNU Privacy Guard (GnuPG or GPG) is a GPL Licensed alternative to the PGP suite of cryptographic software. PGP encryption uses a serial combination of hashing, data compression, symmetric-key cryptography and finally public-key cryptography; each step uses one of several supported algorithms. Each public key is bound to
cURL – upload files and submit data
curl is a command line tool for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. curl supports SSL certificates, HTTP POST,
Scheduling tasks with cron
Cron is a daemon used for scheduling tasks to be executed at a certain time. Cron is driven by a crontab, a configuration file that specifies shell commands to run periodically on a given schedule. Each user has a
Hello world!
First article! Definitely must be a “Hello World” examples article. A “Hello World” program is a computer program which prints out “Hello, world!” on a display device. It is used in many introductory tutorials for teaching a programming language. It