Edoceo :: Creations

Creo are different software projects that have been put together by Edoceo. Named projects are generally a complete and functional package. In each programming language section are various functions, routines, classes, defintions, etc. All of the listed on this page is released under the GPL 3.0 only.

BigBlueDashboard - Interface for BigBlueButton

BigBlueDashboard ("BBD") is a web-dashboard for BigBlueButton. Screenshots The dashboard shows you all about what's going on with your BigBlueButton server. You can start and

Cella Backup Script

The Cella backup script is a Bash based wrapper around rsync, mysqldump and

Cella Configuration

Cella backup jobs are defined as a array of hashs in PERL. Each Job definition has an action (a); a source (s) and a target (t). If the target is missing or empty the target becomes $cella_dir/$job->{s}. Standard Parameters $cella_age The amount of time to store backups for, used by rdiff only. $cella_age = '21D'; # 21 Days $cella_ag

Drive Shred - Hard Disk Shredding Utility

See Also sdelete/sfree drive-shred.pl is a small utility written in PERL that will shred a disk drive, or any block device really. Simply run drive-shred and poof! the data is gone. Drive Shred

Gentoo EC2 Images

These have been superceeded by our Praxis Linux Distribution. Amazon provides the EC2 service - Elastic Computing in the Cloud. This allows one to create an image of a Linux system, publish it to the S3 system and bring one or more online with ease. Amazon dynamically provides and public and private address available to access these machines. Edoceo currently offers two Gen

eNom Dynamic DNS Script

The edoceo.com/pub/enom-ddns.sh script is a Dynamic DNS update utility for use with the registrar eNom. We have scripts written in Bash, PERL and PHP. With their Dynamic DNS it's possible to create names under your domain that are on a dynamic IP address, awesome. If your office is on a dynamic IP address, as some broadband providers do, this script could be run from some ho

eNom API Domain/Host Dump Script

The edoceo.com/pub/enom-dump.php script reads and dumps a full set of host records for every domain in an account with eNom. Just run with the username and password used to access your eNom account ~ $ ./enom-dump.php [username] [password]


Gund is a script that should be run by cron on a daily basis to check for updates to a Gentoo system. It syncs the portage tree checks for different types of updates and then writes the output to STDOUT. If run from root's crontab then the administator should get the message and can then handle accordingly The Script Change Log 2005-07-11 - Cleaned, ad

IMAP Move - An email migration script

When migrating email services one does not want to lose the old messages. This tool copies messages from one IMAP system to the other. We've used this to migrate from Exchange to Gmail/Google Apps, Gmail to Exchange, Exchange to Exchange, in or out of dovecot too. Her


Inotify allows one to monitor files or directories for one or more events, like dnotify but better. All about the Linux kernels inotify component, brief sample code and updates about removal of /dev/inotify in favour of system calls. This section is in a work in progress. What is inotify? Inotify is a replacement for dnotify, it's written by Robert Love and John McCutchan. It's not fully part of the kernel, there is are patchs for Linux >=2.6 The interface is via de

mail2trac - IMAP/POP3 Email to Trac

This PHP based mail2trac script reads from a POP3 or IMAP mailbox and imports messages as Tickets with Attachments. It is designed to be run via cron on some periodic basis. Overview The mail2trac system is designed to be run via cron or some other command scheduler to attach to a mailbox, pull message,

Convert MS-SQL to PostgreSQL

Ms2pg is a utility to assist with migration of a database on Microsoft SQL Server to a PostgreSQL database server. This script will connect to the MS-SQL server and to the PostgreSQL server to copy tables, primary keys, indexes and data. At this time the foreign keys are not copied. Plans for a future is to add the foreign key copy, update sequence counter

OpenVPN + Config Windows Installer

This handy NSIS installer script installs both OpenVPN as well as a set of configuration data. It makes it super easy to package and distribute OpenVPN and Configurations to Windows users (like in a corporate environment) Building OpenVPN Installer These commands will be executed from the Windows command line, these for example come from our make.bat file. c:\Pr


Edoceo::UserAgent is a wrapper package for LWP::UserAgent and a few others. When first using LWP information was difficult to find for a complete UserAgent framework. Looking for a package that was smart enough to handle a session, cookies and other full scale UA features was difficult. This framework is provided to help others, it surely needs to be customized for the readers environment. Assistance with PERL development is also available, for a fee, please use our contact form.


Important note, this package doesn't function as well as SSMTP which is also a null mail client. It is a more complete and compatible replacement for sendmail on machines that don't recieve any mail. This is not a full blown replacement for sendmail, rather it is a limited replacement for use in certian cicumstances. It does not understand CC or BCC, or much else really. It will block until the message has been d


smb.monitor is a script for use with the mon package. It simply connects to a host and lists the shares to detect failures from name resolution or authentication. Installation To install the script simply download it to the mon scriptdir, usually set to '/usr/local/lib/mon/mon.d:/usr/lib/mon/mon.d'. Then add the settings for this to the mon.cf file. Configuration It configures like any other mon script, the specific parameters

Benchmark Wrapper for pgbench

While tuning PostgreSQL the benchmark exams can be brutal, they take a long time and are repetitive. The script here wraps pgbench to automate this testing. When using this tool run once with default PostgreSQL configuration, then tune up The Script Below is the script, you can copy and paste it into your favourite editor, and save it or down load from here.

pgbackup - PostgreSQL Server Backup Script

This script has been deprecated in favour of Cella. Pgbackup is a PostgreSQL database server backup BASH script. The script is very basic, you can either call it and grab all databases, or call it specifying one database. The output directory (BACKUP_DIR), user name (PGUSER) and paths to the PostgreSQL commands must be


Below are two functions in PHP to assist with calculating bandwidth information. The first to_bytes($value,$unit) will turn value into bytes based on what the unit is. The function bytes_to($value, $unit) converts the $value of bytes to the specified unit. This is what drives our Bandwidth Calculator. Parameters The two functions both use the $unit parameter the same. The supported units are: b = bits B = B


class CurlWrapper { static private $ch; function __construct($url) { self::$ch = curl_init($url); // todo: should set URL later with CURLOPT_URL curl_setopt($ch, CURLOPT_VERBOSE, false); curl_setopt($ch, CURLOPT_AUTOREFERER, false); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); curl_setopt($ch, CURLOPT_COOKIESESSION, false); curl_setopt($ch, CURLOPT_CRLF, false); curl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, true); curl_setopt($ch, CURLOPT_FAILONER


The function below will return a sorted array of directories & files in the requested directory. No hidden (/^./) files are listed. Copy and paste away. // @return array of names function directory_listing($d) { $dl = array(); if ($hd = opendir($d)) { while ($sz = readdir($hd)) { if (preg_match("/^\./",$sz)==0) { $dl[] = $sz; } } closedir($hd); } asort($dl); return $dl; } Here is the same routine with PHP SPL objects. The list return


After downloading the necessary WSDLs and documentation from FedEx it's a simple matter of building the proxy's. This docuemnt describes how it's done and provides some samples. Generating the API Proxy The proxy here is the stub code necessary to call the service described in the WSDL file. Using PEAR SOAP_WSDL class this can be accomplished with this simple snip. Oddly the FedEx developer resource center describes some FedEx provided PHP samples but they to not exist. re


These functions currently only work for US telephone numbers, perhaps one day internationalisation will be added. View source if you cannot see the code properly. function clean_phone($phone) { $p = strtolower($phone); for ($i=0;$i<strlen($p);$i++) { $a = ord(substr($p, $i, 1)); // If ( Not Numeric ) or ( Not 'x' ) if ((($a >= 48) && ($a <= 57)) || ($a == 120)) $r .= substr($p, $i, 1); } return $r; } function format_phone($phone) { $phone = clean_phone($phon


This is our PHP redirect() function, it has been tested with PHP versions >= 4.2.0. Seen a lot of requests for this on various mailing lists so we thought we'd share. We've added support for different HTTP/1.1 3XX status codes. Each of the response codes tell the requesting User-Agent how to respond as described below. In the W3C specification it's stated that the server should also give some content back for the User-Agent to render if it does not obey the redirect. This redirect fu

phps3tk - Amazon S3 PHP Toolkit

This is yet another set of PHP scripts for S3. It's primary difference from other packages is the us of the CURL functions to reduce memory usage when PUTing or GETing large files. Mime type detection is from the /usr/bin/file command which is only opened once, there were issues when exec()ing more than 1000 times. Some other

Promitto - Email Campaign/Marketing Software

Many organizations use services like Constant Contact, iContact or EasyContact for their campaigning purposes. These operations are excellent for small list or sm

Handy Script for Pushing SSH Keys

The pussh.sh script automatically pushes your SSH private key to the server specified so you can have automatic SSH,scp and sftp authentication. If you don't have a key the script will generate one for you, also this script assumes that the user running the script has a home directory on the remote host. Should note that this script will only push the RSA encrypted key. SSH Automatic login is further described in the document


create table base_country ( id serial primary key, ); insert into


The list is based on what the USPS considers states. <?php function state_list($sel=&#039;&#039;) { echo "<option value=&#039;AL&#039;".($sel==&#039;AL&#039;?&#039; selected&#039;:&#039;&#039;).">Alabama</option>"; echo "<option value=&#039;AK&#039;".($sel==&#039;AK&#039;?&#039; selected&#039;:&#039;&#039;).">Alaska</option>"; echo "<option value=&#039;AS&#039;".(


When trying to lockdown a system the removal of useless users and groups, ones who don't own anything, is a good start. The script below finds files who don't have valid user or group owners and finds users and groups who don't own any files. Of course many other things should be done as well to secure a system. The Script Copy and paste this or download useless-users from here. #/bin/bash # run this as root CHECK_DIRS="/dev /etc /home /

winlogd - Windows EventLog to Syslog Service

Winlogd is an open source Windows sylog client which forwards Event Log messages to a syslog server. Thousands of network devices (firewalls, routers, switches, storage, etc...) from major manufacturers (Cisco,