Compile Android on Cordova

set ANDROID_HOME=C:\Program Files\Android\android-sdk-windows

set PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

Open a command line window, and go to /path/to/your/project/platforms/android/cordova.

cordova build android –release, from top level directory

Check for the keystore details..

Also keygeneration:

keytool -genkeypair -dname "cn=Mark Jones, ou=JavaSoft, o=Sun, c=US" -alias -keypass kpxx135 -keystore xyu.keystore

Debian Install Packages behind Firewall

apt-get --print-uris install mysql-server -y

Will print out the URL for the package and dependancies;

'' libaio1_0.3.109-3_armhf.deb 8944 MD5Sum:ddc43710db3f102df9477a8a95f025ad
'' mysql-server-core-5.5_5.5.40-0+wheezy1_armhf.deb 3060608 MD5Sum:9a8f4620799fcceb4567433caad2434e
'' mysql-server-5.5_5.5.40-0+wheezy1_armhf.deb 1729934 MD5Sum:98fe33dd64039ba120d1aa77e0992fa7
'' heirloom-mailx_12.5-2+deb7u1_armhf.deb 253508 MD5Sum:6155feba05b677f5f01eb5b53ae4ba2d
'' libhtml-template-perl_2.91-1_all.deb 72020 MD5Sum:b25cc0a02e43fe4b5b46a01af3e98c4c
'' mysql-server_5.5.40-0+wheezy1_all.deb 73872 MD5Sum:b49873c3a32d33f6186e779202f6a87e

Cut out the URLs and put them into a file.

y=0;for x in `cat deps.txt`; do ssh username@"wget -O - $x" >> $y.deb; y=$y+1; done

dpkg -i *.deb

Quick – Install Package on a Firewalled Server

On the firewalled/vpnd server;

1. find the package URL

apt-get –print-uris install dos2unix

2. wget over ssh from an internet bound server on the same network

ssh use@somehost ‘wget -O –’ >> dos2unix_6.0-1_armhf.deb

3. dpkg -i dos2unix_6.0-1_armhf.deb

Perl – Sending Email with NET::SMTP using username and password

First of all double check that Authen::SASL is an installed module.. If you are not getting emails this could be why – it doesnt provide an error that is understandable!

### ENSURE Authen::SASL is installed
use Net::SMTP;
use strict;
use warnings;

my $host= 'yourhostname';
my $username= "yourpop3username";
my $password = "yourpassword";

my $from = 'bob\';
my $to = '';
my $DOMAIN = "";

my $smtp = Net::SMTP->new($host, Hello =>$DOMAIN, Timeout => 60) or die "Failed to Open SMTP Connection : $!";
$smtp->auth($username, $password) or die "Failed to authenticate";

my $subject = "Build";
my $emailBody = "This is the body...\n BOB";

$smtp->mail("$from"); ## FROM
$smtp->datasend("To: $to\n");
$smtp->datasend("From: $from \n");
$smtp->datasend("Subject: $subject \n");

These links were useful also:

Fix Open Postfix Relay – Unauthenticated Email

If your mail server is left open, anyone can use your SMTP service to send mail, and spammers will use it. This can result in your server being blacklisted and extraneous use of system resources that neither benefit you nor your users.

Postfix logoTo secure Postfix, there are a number of functions you can add the configuration file /etc/mail/ Edit the file and add the following lines:

smtpd_helo_required = yes
smtpd_delay_reject = no
disable_vrfy_command = yes

smtpd_helo_restrictions = permit_mynetworks,reject_invalid_hostname,reject_unknown_hostname,reject_non_fqdn_hostname

This will force incoming requests to pause and identify themselves before proceeding, and will allow properly authenticated users to pass through and send mail. To finish, save the file and restart Postfix:

/etc/init.d/postfix restart