Saturday, March 16, 2013

Ubuntu 12.04 LTS Drupal 7 prerequisites

Here is a list of packages needed for Drupal 7 on Ubuntu 12.04 LTS


apt-get install apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common dbconfig-common fontconfig-config libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 libdbd-mysql-perl libdbi-perl libfontconfig1 libgd2-xpm libhtml-template-perl libjpeg-turbo8 libjpeg8 libmysqlclient18 libnet-daemon-perl libplrpc-perl libt1-5 libxpm4 mysql-client mysql-common php5 php5-gd php5-mysql postfix psmisc ssl-cert ttf-dejavu-core wwwconfig-common  php-pear


You will also need Drush

pear channel-discover pear.drush.org
pear install drush/drush
pear upgrade-all

Tuesday, May 15, 2012

WX4EMA-R On The Air

After some fine tuning the new EMA repeater for Macon is online. Bibb County ARES will be using this repeater a lot but it anyone can use it day to day....

WX4EMA
147.015+ (600mz)
88.5 tone


Location: http://g.co/maps/pn88m

Tuesday, March 20, 2012

Mounting Network Drives with C#.net

First off, big thanks to aejw for making my life a lot easier by writing an awesome class to make this possible.

Download the project files from here, extract cNetworkDrives0015.cs and add it to your project.

Then: using aejw.Network;



private bool mount_drive(string localdrive, string sharelocation, string user = "blank", string pass = "blank")
        {

            NetworkDrive oNetDrive = new NetworkDrive();

            try
            {
                oNetDrive.LocalDrive = localdrive;
                oNetDrive.ShareName = sharelocation;
                if (user == "blank")
                {
                    oNetDrive.MapDrive();
                }
                else
                {
                    oNetDrive.MapDrive(user, pass);
                }
            }
            catch (Exception err)
            {
                //Optional MessageBox to show Error
                //MessageBox.Show(this, "Error: " + err.Message);
                return false;
            }

            return true;

        }


example usage:


if (mount_drive("h", @"\\nas007\shared"))
            {
                //Alert that drive was mapped
            }
            else
            {
                //Alert that drive mapping failed
            }





Source:
http://www.codeproject.com/Articles/6847/Map-Network-Drive-API

Thursday, March 15, 2012

C#.net Check if user is in Active Directory Group


Here is a simple c#.net function to see if a user is in a AD group.

Be sure to add the Directory Services as a refrence to your project and use:

using System.DirectoryServices.AccountManagement;








private static bool IsInGroup(string ingroup)
        {
            string username = Environment.UserName;

            PrincipalContext domainctx = new PrincipalContext(ContextType.Domain,
                                                        "example",
                                                        "DC=example,DC=com");

            UserPrincipal userPrincipal =
                              UserPrincipal.FindByIdentity(domainctx, IdentityType.SamAccountName, username);

            bool isMember = userPrincipal.IsMemberOf(domainctx, IdentityType.Name, ingroup);

            return isMember;
        }
itninja.com