Infrastructure

  • Server Setup
  • LAMP Configuration
  • Network Design and Setup
  • Email Setup
  • Cloud: Amazon EC2, Google App Engine
  • Database: MySQL, PostgreSQL, Oracle, DB2

Mobile

  • iOS
  • Android
  • Blackberry
  • WebOS
  • HTML4 and HTML5

Web

  • HTML4, HTML5, JavaScript
  • Java, J2EE, Spring
  • Groovy, Grails
  • PHP
  • Perl
  • Google App Engine
  • SQL, PL/SQL

Give us a chance and we will prove our efficiency!

Adam Brons
Lead Architect for Java, Enterprise Java Technologies, and GWT >>

James Zimmerman
Lead Developer for PHP, Flex, Zend, and Web Technologies >>

Big news! Google is acquiring Motorola Mobile. Yes this is about patents, but it could be good in other ways too.

http://googleblog.blogspot.com/2011/08/supercharging-android-google-to-acquire.html?m=1

Recently I’ve switched to using Git for version control for my day-to-day projects. I also finally got around to updating the website theme. This brings me to the point of the post.

I’ve been using GoDaddy’s virtual web hosting, no this isn’t a GoDaddy plug, I could take them or leave them. After enabling the SSH feature through the control panel so I didn’t have to deal with ftp I quickly decided that it was time to use Git. The problem is that GoDaddy doesn’t support Git on their virtual webhosting service.

So the following is a list of steps to get everything setup.

  • Statically compile Git
  • Install Git on virtual web hosting
  • Setup ssh
  • Git workaround for pull, push, fetch

Statically Compile Git
1) Find a 32bit linux box to use for this step. The virtual host I used was 32bit based. I believe all of their virtual hosts are 32bit based, but you can verify by running:

$ uname -m
i686

2) Download the latest version of Git source. Create a directory to contain the compiled binaries.

$ tar -jxvf git-1.7.6.tar.bz2
$ mkdir ~/git-scm
$ cd git-1.7.6
$ ./configure --prefix=~/git-scm CFLAGS="${CFLAGS} -static"

3) Compile and install git into ~/git-scm.

$ make
$ make install

4) Package the statically compiled Git for install on the GoDaddy virtual host.

$ cd ~/
$ tar -jcvf git-static-1.7.6.tar.bz2 ~/git-scm

Setting up SSH and installing Git
1) Creating an ssh public / private keypair is not required, but makes it easier to use git commands if you don’t have to enter your password each time a remote command is run.

# On your local system
$ ssh-keygen -t rsa -b 2048 -C "myid@goDaddy"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/abrons/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/abrons/.ssh/id_rsa.
Your public key has been saved in /Users/abrons/.ssh/id_rsa.pub.
The key fingerprint is:
...

2) Log into your GoDaddy account and setup the RSA public key for password-less authentication.

# SSH to GoDaddy Host
$ mkdir ~/.ssh
$ cd ~/.ssh
$ vi authorized_keys
# Copy the contents of local system myId@goDaddy.pub into authorized_keys
$ chmod 600 authorized_keys
$ chmod 700 ~/.ssh

3) Configure local system ssh client to connect as you with using a host alias.

$ cd ~/.ssh
$ vi config
# Put the following in your config file change "myhost" and "myid" with your
# GoDaddy host and userid
Host myHostAlias
HostName myhost
User myid
IdentityFile ~/.ssh/myid@goDaddy

Install Static Git
1) Use secure copy to copy the git-static-1.7.6.tar.bz2 tarball to the GoDaddy virtual web host and install.

# From local system
$ scp ~/git-static-1.7.6.tar.bz2 myhost:

2) SSH to your goDaddyHost and install the git binaries.

$ ssh myHostAlias
$ tar -jxvf git-static-1.7.6.tar.bz2
$ vi ~/.bash_profile
# Add the git binaries to your execute path
# Find the line that has "PATH=" or add one
PATH=${PATH}:${HOME}/git-scm/bin

3) Example git repository of GoDaddyHost/html

$ ssh myHostAlias
$ cd ~/html
$ git init
# NOTE: Do NOT do the following if you plan to make changes to ~/html locally
#           instead create a bare git repository that both GoDaddy and your local system
#           push and pull to/from.
$ git config receive.denyCurrentBranch ignore

4) From your local system clone the myHostAlias(GoDaddyHost) html git repository. You’ll notice the “-u”, this is required because GoDaddy does not allow you to override the PATH variable for a non-interactive ssh session such as git over ssh.

$ git clone -u /home/content/a/d/a/myid/git-scm/bin/git-upload-pack myHostAlias:html

5) Setting up Git paths for push, pull, and fetch on GoDaddyHost. On the local system cloned repository.

# Replace "/home/content..." with the FULLPATH on your GoDaddyHost to the git-upload-pack binary
$ git config remote.origin.uploadpack /home/content/a/d/a/myid/git-scm/bin/git-upload-pack

# Replace "/home/content..." with the FULLPATH on your GoDaddyHost to the git-receive-pack binary
$ git config remote.origin.receivepack /home/content/a/d/a/myid/git-scm/bin/git-receive-pack

This is a work in progress so bare with me, but as I find things that I miss about 10.10, can’t stand with 11.04, etc. I’ll post a link or a description here.

For now the best resource I’ve found is this site for making 11.04 usable if you’re not feeling very “United”.

Here’s a couple of Highlights:

JClassType Breaking Change in 2.0

Friday, May 6, 2011
posted by ambrons

JClassType *(metaData) methods are deprecated and return empty Strings.  Found this out the hardway.  JClassType now implements HasAnnotations and therefore can retrieve a real annotation instead of having to using a JavaDoc style annotation for specifying information about a class/interface to the GWT Generator.

Logical Volume Management (LVM): Tips

Friday, May 6, 2011
posted by Admin

lvcreate -L <Size>G -n <name> <volume_group>

lvremove <lv device name>: lvremove /dev/mapper/vg01-uec

The following commands will resize an ext2, ext3, or ext4 filesystem running on LVM while it is mounted:

$ sudo lvresize -L +XXG <path to fs device>
$ sudo resize2fs <path to fs device>

iPhone/iPad Video Streaming and Conversion with Linux

Friday, May 6, 2011
posted by james.zimmerman

Being a fairly content user of the iPad in general, I decided to explore what other offerings where available on the web regarding video streaming and conversion.  Upon first glance, I located AirVideo, a $3 app on the iPad with a Lite version available that limits the number of files that can be listed for streaming/conversion.

The application requires a server-side component to re-encode the video format.  Luckily, that part is free, and rightfully so as further digging and simple monitoring of the raw output of the file revealed a heavy reliance on an inherent component of many linux environments, ffmpeg.  The application server does offer a few distinct user interface interactions that are still advantageous, but for the core process of conversion, if you don’t prefer having your hand held, you could simply borrow their commands, though YMMV.

One thing that should be noted is that during the spin up of this solution, I had to hop through a few various hoops in order to get the server-side operating under Linux.  I had to custom compile ffmpeg for the best performance, and the default Ubuntu libraries I had didn’t cut it.  I found the first set of instructions [here].

  1. Download “customized” ffmpeg binary from AirVideo server. [Download] [License]
  2. Add custom repository for [Stephane Marguet's PPA]
    sudo add-apt-repository ppa:stemp/ppa
  3. Install required requisites for compilation of ffmpeg with appropriate options.
    sudo aptitude install \
    libmp3lame \
    libfaad-dev \
    libx264-dev \
    (Stephane’s PPA – 0.svn20100115-0.0)
    mpeg4ip-server \
    git-core \
    pkg-config
  4. Build custom ffmpeg instance (downloaded in step 1), with specific compilation flags:
    ./configure \
    –enable-pthreads \
    –disable-shared \
    –enable-static \
    –enable-gpl \
    –enable-libx264 \
    –enable-libmp3lame \
    –enable-libfaad \
    –disable-decoder=aac
  5. “Make” the new ffmpeg:
    make

The server side appears to rely heavily on two primary commands to operate:

Live Conversion (Transcoding):

ffmpeg \
–conversion-id $hash_id \
–port-number 46631 \
-threads 4 \
-flags2 \
+fast \
-flags \
+loop \
-g 250 \
-keyint_min 25 \
-bf 0 \
-b_strategy 0 \
-cmp \
+chroma \
-deblockalpha 0 \
-deblockbeta 0 \
-refs 1 \
-coder 0 \
-me_range 16 \
-subq 5 \
-partitions \
+parti4x4+parti8x8+partp8x8 \
-trellis 0 \
-sc_threshold 40 \
-i_qfactor 0.71 \
-qcomp 0.6 \
-map 0.0:0.0 \
-map 0.1:0.1 \
-ss 0.0 \
-i $input_filename \
-cropleft 0 \
-cropright 0 \
-croptop 0 \
-cropbottom 0 \
-s 608×336 \
-aspect 1.8095238 \
-y \
-f mpegts \
-vcodec libx264 \
-bufsize 128k \
-b 1700k \
-bt 1800k \
-qmax 48 \
-qmin 2 \
-r 23.976 \
-acodec libmp3lame \
-ab 192k \
-ar 48000 \
-ac 2 \
-

Long Term Conversion:

ffmpeg \
–conversion-id $hash_id \
–port-number 46631 \
-threads 4 \
-flags2 \
+fast \
-flags \
+loop \
-g 250 \
-keyint_min 25 \
-bf 0 \
-b_strategy 0 \
-cmp \
+chroma \
-deblockalpha 0 \
-deblockbeta 0 \
-refs 1 \
-coder 0 \
-me_range 16 \
-subq 5 \
-partitions \
+parti4x4+parti8x8+partp8x8 \
-trellis 0 \
-sc_threshold 40 \
-i_qfactor 0.71 \
-qcomp 0.6 \
-map 0.0:0.0 \
-map 0.1:0.1 \
-ss 0.0 \
-i $input_filename \
-padleft 0 \
-padright 0 \
-padtop 0 \
-padbottom 0 \
-cropleft 0 \
-cropright 0 \
-croptop 0 \
-cropbottom 0 \
-s 608×336 \
-aspect 1.8095238 \
-y \
-async 1 \
-f h264 \
-vcodec libx264 \
-crf 27 \
-qmax 27 \
-r 23.976 \
$output_filename.h264 \
-f adts \
-ar 48000 \
-f wav \
-ac 2 \
-

Preparation Muxing:

mp4creator \
-create $output_filename.h264 \
-rate 23.976 \
-optimize $output_filename.m4v

Final Muxing:

mp4creator \
-create $output_filename.aac \
$output_filename.m4v \
-I \
-optimize

It appears that with a few simple ffmpeg and mp4creator commands, we can generate the necessary files for play on our iPad/iPhones.  I specifically broke these down into separate lines for easier reference and review.  I will continue tweaking the application settings for conversion and monitor the resulting logs for additional details and update this point as the process continues.  Currently, conversion quality is set at 85% and it took roughly 50 minutes (guesstimate) to convert a 2-hour film.


Customize FireFox3 URL Bar Style

Monday, June 21, 2010
posted by ambrons

One of the things that bothers me with Gnome themes in Linux.  Recently I was checking out Slickness.  I enjoy the “Darker” themes, but unfortunately it rendered the URL bar in FF3 nearly unusable.  The text was a dark blue on a dark grey.  The contrast to be able to read the URL bar was near impossible.

Being new to customizing FireFox I had to do a little research.  The good news is that FireFox uses CSS so it was only a matter of knowing which classes to modify and where to put the CSS modifications.

The basics of creating FireFox customizations can be found at this write up on Mozilla’s website.  In addition to that the comments of $HOME/.mozilla/firefox/<insert goop>.default/chrome/userChrome.css where very helpful.

The following is a snippet from my userChrome.css file to make FireFox’s URL bar look close to the default.

.ac-comment {
font-size: 100% !important;
color: #444444 !important;
}

.ac-comment[selected="true"] {
color: #FFFFFF !important;
}

.ac-url-text {
font-size: 100% !important;
color: #000077 !important;
}

.ac-url-text[selected="true"] {
color:#FFFFFF !important;
}

I hope this helps, enjoy!

 

How to Change OpenLDAP RootDN Password

Thursday, May 27, 2010
posted by ambrons

Here is an OpenLDAP quick tip to change the RootDN password via ldapmodify. This tip should work for most systems, but we used Ubuntu 10.04 and this guide for installing OpenLDAP.

The first thing you want to do is determine the DN (Distinguished Name) for the database that contains the RootDN password.  To do this we used the following LDAP search command.

sudo ldapsearch -LLL -Y EXTERNAL -H ldapi:/// -b  cn=config olcRootDN=cn=admin,dc=adac-solutions,dc=net dn olcRootDN olcRootPW
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
<strong>dn: olcDatabase={1}hdb,cn=config</strong>
olcRootDN: cn=admin,dc=adac-solutions,dc=net
olcRootPW: {MD5}G7ANWX3yX2TWqZo6iaTK6w==

We’ve highlighted the DN for our LDAP database above as it will be needed for the ldapmodify command. Before we run our ldapmodify command we’re going to use slappasswd to setup an encrypted password.  We choose MD5 for our password encryption.  Use the following command to generate a MD5 password to be used in OpenLDAP.

slappasswd -h {MD5}
New password:
Re-enter new password:
{MD5}BNrIr+DKUBWHutZva1zlrQ==

We’ve highlighted the MD5 password you will need to paste into ldapmodify.  The final step is to use ldapmodify to update the password.

sudo ldapmodify -Y EXTERNAL -H ldapi:///
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
dn: olcDatabase={1}hdb,cn=config
replace: olcRootPW
olcRootPW: {MD5}BNrIr+DKUBWHutZva1zlrQ==
modifying entry "olcDatabase={1}hdb,cn=config"

The three lines above in bold must be typed by use.  As you can see we used the DN we looked up earlier, dn: olcDatabase={1}hdb,cn=config, this tells ldapmodify with object we plan to modify.  Next we enter replace: olcRootPW, this tells ldapmodify that we intend to replace the current value of olcRootPW attribute of object olcDatabase={1}hdb,cn=config.  Finally we update the value of olcRootPW with our password generated by slappasswd.


GWT DevMode Command Line Arguments

Thursday, May 20, 2010
posted by Admin

I was setting up GWT 2.0.3 today and needed to know the command line arguments for the DevMode class and couldn’t find them in any of the usual places.  So in case anyone else needs them here you go.

Google Web Toolkit 2.0.3
DevMode [-noserver] [-port port-number | "auto"] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logdir directory] [-logLevel level] [-gen dir] [-bindAddress host-name-or-address] [-codeServerPort port-number | "auto"] [-server servletContainerLauncher[:args]] [-startupUrl url] [-war dir] [-extra dir] [-workDir dir] module[s]

where
-noserver        Prevents the embedded web server from running
-port            Specifies the TCP port for the embedded web server (defaults to 8888)
-whitelist       Allows the user to browse URLs that match the specified regexes (comma or space separated)
-blacklist       Prevents the user browsing URLs that match the specified regexes (comma or space separated)
-logdir          Logs to a file in the given directory, as well as graphically
-logLevel        The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
-gen             Debugging: causes normally-transient generated types to be saved in the specified directory
-bindAddress     Specifies the bind address for the code server and web server (defaults to 127.0.0.1)
-codeServerPort  Specifies the TCP port for the code server (defaults to 9997)
-server          Specify a different embedded web server to run (must implement ServletContainerLauncher)
-startupUrl      Automatically launches the specified URL
-war             The directory into which deployable output files will be written (defaults to ‘war’)
-extra           The directory into which extra files, not intended for deployment, will be written
-workDir         The compiler’s working directory for internal use (must be writeable; defaults to a system temp dir)
and
module[s]        Specifies the name(s) of the module(s) to host

In the Beginning

Tuesday, May 4, 2010
posted by Admin

Finally ADAC Solutions, LLC has a website. The site is currently under construction and will be updated in the near future.  Stay tuned for many good things to come.