daily minutia on Twitter

I'm Ingrid Alongi, a developer in Boulder, Colorado. I'm a co-founder at Quick Left, a Web Engineering company. I used to be a software engineer at Gnip where API integration and social media data were my world. Prior to that, at OneRiot, I wrote web applications using Java/Wicket/CSS. I've got experience with CodeIgniter for PHP, but mostly use Zend with Doctrine when it comes to PHP. Got some JQuery too.

I've been in the web development/interactive agency world for almost 10 years, with most of my experience in building database-driven web applications (PHP, ColdFusion) for consumer facing clients (e-commerce, email marketing, advertising, cms, etc.). Lots of strategy, lots of driving traffic back the web site types of stuff. Oh, and managing an amazing team of developers.

I'm an electronic music snob, ex national level cyclist, I play violin and cello, and have an MA in Women's Studies. You can contact me at ialongi at yahoo . com. Or, mosey on over to the Quick Left blog to see what I'm up to.

SVN+SSH setup on MediaTemple DV Hosting

December 13, 2008, 2:46pm by electromute

A few months ago, I wrote a post about installing svnserve on DV hosting at Media Temple. It was a great quick solution to get started, but I really wanted to get to svn via ssh instead for the long term.

Rather than scour the Internet for how to do this (I’ve done it a few times in my career, but I’m no sysadmin), I sat down for lunch one day with Collin, who used to be a mighty fine sysadmin! Saved me hours of time, hopefully this will help some of you all too.

Keep in mind that you’ll have to check out your files from scratch, so you’ll want to make sure all of your current changes are checked in (or otherwise managed) before you get started on this project.

Log into your server. I have root access from ssh disabled, and you may want to consider doing this as well.

% su – root
% adduser joe
% passwd joe

I use the su – username notation to be sure the console session is refreshed. Now add a new group called svn that members will be a part of

% groupadd svn

Because we’re on CentOS, there are certain permissions that make the owner only having default permissions of the file, so we’ll have to deal with that here as well so that we can avoid permissions issues when users commit their changes to SVN.

% usermod -G svn joe

Take a look to verify, in the group file, that your user is added to the correct group:

% view /etc/group

You also want to verify that svn is the secondary group by doing this:

% su – joe
% id

You should see something like this:

uid=10004(joe) gid=10005(joe) groups=10004(svn),10005(joe)

Now you’ll set up the ssh keys. We’ll set up dummy keys for now because we’re going to copy the public key from our local computer, not the other way around. Make sure you are still acting as the new user.

% cd /home/joe
% mkdir .ssh
% cd .ssh
% ssh-keygen -t rsa

when it prompts you for a filename, enter id_rsa
when it prompts you for a password, hit enter, leave it blank, we won’t be using these keys.

Now, go back to you local computer and generate the keys again as described above, but this time use a password. If you already have keys, you’ll just need to copy them to the server.

From your local computer, do a secure copy. My keys happen to be named identity. Also note that I am renaming the keys to authorized_keys2 for this CentOS environment.

% scp identity.pub joe@servername.com:/home/joe/.ssh/authorized_keys2

Double check that the user can now log in properly without any trouble. Now to go back and change the permissions on the repository

% su – root
% cd /var/svn
% ls -la

You’ll want to make sure your repository has a group owner of svn and a user owner of someone in that group. Make sure you’re running as root here, and it never hurts to refresh the console using the dash notation.

% chgrp -R svn reponame/
% chown -R joe reponame/
% chmod -R 775 reponame/

Since the owner can read/write but the group can only read/view on the CentOS, we need to change the default umask for the user to avoid collisions:

% su – joe
% vi .profile

In the .profile file, add the following:

add umask 002

then reload the environment again by doing:

% su – joe

Now we need to make joe’s default group SVN:

% su – root
% usermod -g svn joe

Now refresh enviro

% su – joe
% id

You should see something similar to the following–notice the default group is svn now:

uid=10004(joe) gid=10004(svn) groups=10004(svn)

Now, if you’d previously been using svnserv, you’ll want to turn it off. Let’s start by viewing the running processes on the server:

% su – root
% ps aux

I had more than one instance running, so I ended up doing the following (do at your own risk)

% killall -9 svnserv

Double check that you can then check out, change and commit files. If you can’t, there is likely a permissions issue. Also double check that you can’t access the repository with plan svn://. If so, you may have not properly terminated svnserve. You will also want to clean up for yourself by making sure that you’ve removed any information from the passwd and svnserv.conf files in the /var/svn/reponame folder.

Cheers!

Tags: , , ,

   Read More »




Recursion in PHP

December 7, 2008, 2:21pm by electromute

Well, I’ve been a bad blogger lately, lots of awesome stuff going in in the world of Ingrid. I’m now working at Gnip. I’ve gotten the chance to do some really cool stuff there, having a great time for sure!

In any case, here’s a little snippet of something I wrote. In Computer Science, recursion is a major conceptual hurdle to get through. Once you master it in school, you sadly may or may not ever see it again. Well, I was fortunate enough to need the beauty of recursion recently.

Say you are trying to calculate the date of the first Sunday in September of 2008. You know that the first day of September is September 1st. The following recursive function in PHP will take the parameters and return the day part of the date. For instance,

// find the first Sunday in September of 2008
// Note that the day of the week in PHP for Sunday is 0.

echo addDay(“9″, “1″, “2008″, “0″);

This will return 7; the first Sunday in September of 2008 is, indeed, September 7, 2008. Here is the function:

function addDay($m, $d, $y, $dbase){
   $tmpDate = mktime(0, 0, 0, $m, $d, $y);
   if (date(“w”, $tmpDate) != $dbase){
     return addDay($m, $d + 1, $y, $dbase);
   } else {
     return $d;
   }
}

Tags: ,

   Read More »




Using ListView in Wicket

October 26, 2008, 10:31am by electromute

I’ve been spending a lot of time on Wicket lately for some exciting things that will be coming soon from Me.dium.  One cool trick I started using the ListView. If you’ve come from PHP or any other web language, you know the drill– display query data from the database on a web page.

Here’s a simple implementation of the ListView to help you get started. I’m going to take a list of employees and output them to the screen. This tutorial assumes you know the basics of how Wicket works. This is the portion where we’re adding components to the display piece.

EmployeesPage.java

(…)
List employees = new ArrayList();
//Now I’ll grab the output of the query and populate the ArrayList
try {
  employees = service.getAllEmployees();
}
catch (ServiceException e) {
  //write your handler here
}

//Now I’ll populate the ListView with the query results
add(new ListView(“employeesRptr”, employees) {
  private static final long serialVersionUID = 1L;

  @Override
  protected void populateItem(ListItem item) {
   User employee = (User) item.getModelObject();

   // image display
   item.add(new StaticImage(“profilePic”, new Model(employee.getPicture())));

   // name display
   StringBuilder name = new StringBuilder();
   name.append(employee.getFirstName());
   name.append(” “);
   name.append(employee.getLastName());
   item.add(new Label(“profileName”, name.toString()));

   // location display
   item.add(new Label(“profileLocation”, employee.getLocation()));
  }
});

Now for the display:

EmployeesPage.html

<span wicket:id=”employeesRptr”>

<img wicket:id=”profilePic” border=”0″ />
<p class=”name” wicket:id=”profileName”>Joe Schmo</p>
<p class=”location” wicket:id=”profileLocation”>location</p>

</span>

Enjoy!

Tags: , , ,

   Read More »




Why did I move to Boulder?

October 6, 2008, 9:11pm by electromute

Alright now, I’m not a job hopper. Moving to a new job is a risky endeavor for me. I invest a lot of my SELF into my job. And I’m old school. I’m loyal. I believe in toughing it out to the end. I believe in taking a hit for the team.

Perhaps that is a dumb attitude in this day and age, and perhaps my loyalties have kept me from some great opportunities (but I’ll never change that about myself), but one thing I’ve learned through my career is that sometimes pushing yourself out of your comfort zone is the best way to grow.

Comfort zone was what I was in at my last job in San Diego. I was Director of Technology at Red Door Interactive. I had the best team of developers there. They worked together selflessly. They endured the constant interruption and emergencies that is the nature of agency work with style and grace. Great chemistry. Love that team.


Kari and Jeff during a bbq at Mission Bay


Halloween costumes: Kari as Air Force Pilot, Omed as Charlie Chaplin, me as Mud Run Victim, Ronel as Japanese Tourist

So, why did I leave? Well, for one, being so busy, I longed for a place where I could go on a hike in the mountains before work without having to drive 30 minutes to get to and from the trail (and then 30 minutes to and from work). That’s already 2 hours of driving time, which means I have to get up pretty damn early to fit it all in. Not going to happen. Not while working “agency hours”.


Me at the Teva Mountain Games in Vail

I also wanted more of a technical challenge. As I had transitioned to managing people more than writing code and as I saw the ability to be innovative pulled away by the need for projects to come in under budget (again, just the nature of agency work), I knew I could not last.

As scary and uncomfortable as it was, moving to Boulder has so far been an amazing experience. I feel so lucky to have the opportunities I’ve had, met the people I’ve met. I have some amazing possibilities on the horizon and I could not be happier with what I am working on.

So, what about you? What do you really want to be doing in your life? How can you get there? Push yourself…see where it can take you! One more day to apply to http://boulder.me doooo itttttt….!

Tags: , , ,

   Read More »




« Previous PageOlder Posts »    « Newer PostsNext Page »