Tech
Making 1Password Work with a Proxy
I’m a huge fan and proponent of password management software and especially 1Password by AgileWebSolutions. Yes, it’s paid software and there are alternatives but I use a Mac and I like eye candy (plus I got it for free from a MacHeist a while back, so nyah.)
When I started working at my new job, I wanted to import all of my logins in case I needed them at work. I quickly found that working at a credit card company meant there were a lot of limitations to what you were and were not allowed to do. One of these things was that I couldn’t log in to Dropbox (where I keep my encrypted 1Password keychain for syncing across machines) and the second was that you needed to go through a proxy server in order to access anything on the internet.
The Dropbox I could live without, I would just have to manually sync my keychain every once in a while for passwords I might reset. The proxy thing was a problem though.
Every time I opened FireFox or Safari meant I had to authenticate against the proxy server. In FireFox this was especially a problem because every time I opened FireFox with tabs already open from a previous session, FireFox would prompt for my proxy password for each tab that was open to an external web site. This meant almost a “ba-jillion” window prompts.
1Password keeps track of passwords based on the domain, but because it was a proxy password, depending on what page it was trying to load, the “domain” 1Password would “pick up” was usually the wrong one. Obviously, I didn’t want to have to enter my proxy password manually every time (why would I have the password manager in the first place then?!)
The work around for this is to open up 1Password, create the entry for your proxy server username/password and where it says “Display: Always” there is an additional entry at the end of the drop-down that says “Show in Every HTTP Auth Prompt.” That’s the golden ticket!
Now, when you open FireFox, (warning: it still opens up a million authentication windows but you only have to fill out one) in the 1Password dropdown to fill out the prompt you will see your proxy option. You may have to refresh the pages if it didn’t pop up the auth prompts in order but that was an acceptable price to pay for me to have both 1Password and FireFox.
A “gotcha” to watch out for is in Safari. I noticed that if I reset my browser settings (like, everything blown away, settings, cookies, etc) it lost the proxy server authentication. What you have to do is disable 1Password as a plugin in Safari and restart Safari. A single prompt should pop up asking you for your proxy username and password and will ask you if you want to save it to your keychain. Click the box and submit. When you enable 1Password as a plugin again you should be golden and won’t have to input your proxy password ever again.
I hope this helps someone out there that had the same problem! Took me a good week or so to get everything running smoothly.
ActiveResource, Cucumber and Dupe
At my job at American Express Publishing in New York City, I’m doing Ruby on Rails development and I was hired to help with the redesign of FoodAndWine.com. The production site is currently running Cold Fusion and MS SQL and the team is employed with the task of creating a Service Oriented Architecture (SOA) Ruby on Rails web site to replace the legacy code. How this works is that the legacy Cold Fusion site will serve up services for our site, we’ll make requests to get that information and then display that on our Ruby on Rails front end.
This is all nice and dandy because of Ruby on Rail’s ActiveResource that’s built right in. The tricky part comes in with testing. At American Express Publishing in our web development department, we’re really big into Test Driven Development (TDD) and Behavioral Driven Development (BDD). There are tools out there already made to do TDD and BDD for Ruby on Rails, Rspec and Cucumber, respectively. These tools work great when using ActiveRecord but since we don’t utilize a database, Rspec and Cucumber have a hard time working with ActiveResource and mocking service data.
This is where Dupe comes in. My co-worker Matt Parker came up with a ruby gem to mock service calls for use within Cucumber and Rspec so that we can write the appropriate tests for our code. With Dupe, you can write expected service returns and run tests against them. For the initial pages we’ve written we’ve only needed GET requests. When I started cuking and spec’ing some of the flat pages on Food and Wine we found that there was a (probably underused) polls section of the site that we needed to pull over. Because it needs user input to add to the poll, we would need to add a way for Dupe to mock POST requests.
This is the first time I’ve really programmed a gem let alone worked on someone else’s. I’ve spent a lot of time today researching HTTP requests and GETs, POSTs, PUTs and DELETEs. I also looked up the difference between blocks, lambdas and procs and found this neat, well-written blog post about them that helped straighten me out.
I’m still figuring out the appropriate way to set all this up but hopefully I can update the blog with a success story by tomorrow!
New Theme for a New Year
Surely, you’ve noticed the recent style update to the blog, yes? Since I started the blog last year I was using DigitalNature’s “Arclite” and was happy with it for a very long time.
Then with the recent update I noticed that this weird CSS bug kept showing up around my right side panel’s boxes that made the content huge and was majorly pissing me off. After some muddling around in the code, playing with the CSS myself and checking out DigitalNature’s support, I decided to cut my losses and discovered that DigitalNature recently released a new theme called “Mystique” that was just gorgeous. And now it’s applied here! I especially like the build-in widgets for Twitter and blog-specific stats on the side. Now, if only they had a widget for Tumblr too and then I would be set with my social media feeds!
Dynamic Dummy Image Generator
This is super geeky, but I can’t help but love it. If you’re like me, you use a lorem ipsum generator such as http://www.lipsum.com/ when you are designing layouts with sample content. But what about generating sample images to see how sizes affect your layouts (like if you’re designing a blog and you might have a variety of images with a variety of sizes linked in that blog)?
That’s where the Dynamic Dummy Image Generator comes in!
Sometimes you just need a placeholder image right at your finger tips. Just enter the width + x + height at the end of this URL and off you go!
Example: http://dummyimage.com/640×480
You can either generate one and right click + save as or just hotlink it right into whatever page you want to design. It would probably be nicer if you just downloaded the script yourself though so you don’t kill the poor guy’s server.
And I’ll do it right now, let’s hope this works!
It’s so stupidly simple, how come I didn’t think of this already? I think it would have been awesome to have this when I was working on some design projects in the past.
Squadron Scramble Redux
I’ll apologize to Brandon first for writing this because I am sure when he reads this blog post he will roll his eyes or puke at the thought of me brining this up.
My junior CSU670 “Software Development” class with Matthias Felleisen at Northeastern will forever be one of the most tortuous ordeals I will have ever lived though – but also probably the most rewarding. To this day, I still wake up from nightmares of me sitting at one of the Solaris boxes in the CCIS computer labs talking with other classmates and they ask me what other classes I am taking that semester; lo and behold I can’t even remember one of the 3 or 4 other classes I am supposed to be taking that semester, all I can think about is Software Dev and that I LIVE in this computer lab!
After passing the class from hell, a few of my friends and I made a pact of sorts that we would (one day) continue on with our code from the class and improve on it, because it really was probably one of the largest projects we had ever worked on.
If you have never heard of Squadron Scramble, no worries, I don’t think anyone in the class had ever heard of the game either. It’s a rummy style game but you use aircraft cards with aircrafts from World War II (oh, so appropriate since our professor is German.) Our class rules were modified from the original game, but the basic premise is that you collect three of an aircraft type and can use that to “shoot down” other aircraft trios with a few other wild cards thrown in for good measure.
We were required to pick a programming language and work in pairs and practice paired programming. I had mixed results in past course with paired programming but in this course it was absolutely critical that you have a well functioning team to carry out each week’s assignments, otherwise you would be behind for next week’s tasks because every week built on the weeks before it.
The tasks finally built up to us creating our own game server and administration as well as clients to connect to our server and other student team’s servers. We also had to create dumb artificial intelligence and come up with “player” strategies to try and beat each other with our “players.” And this was all using ugly XML syntax and we were only allowed to use the aging and severely out-dated Solaris machines. We also had to come up with a GUI interface, and did I mention that yes, it all had to work on the grossly out-dated Solaris machines?! That means using Tcl/Tk instead of all the new flashy goodness of anything else developed within the last decade.
With that said and done, my buddy, Ventz, asked me earlier this week if I had time to develop a Ruby client and server and bring the project back to life. My one request was that instead of XML we use JSON instead to make our lives easier. He was going to take a stab at re-writing a Perl version of the code and hopefully get a few other ex-CSU670ers to chip in a Java version and whatever other version they’d want to contribute. My first task is probably to write out a proper spec and improve upon on some of the universally despised guidelines in Matthias’ original spec.
If you’re interested in seeing the final code I wrote in the class, hop on over to my Subversion repository: http://svn.rachelober.com/csu670/ I think this is pretty much the final version of the code that I submitted in the class. I’m almost certain this will not run on anything unless you can get your hands on one of CCIS’ old Solaris servers (which have since been “taken out back” and summarily assassinated,) but I’ll add a disclaimer anyway that the code is provided “as-is” and under no warranty. If it screws up something on your system when you try to run it, sucks for you!
Maybe one day we’ll get some kind of game server to run and we can all play some crappy aircraft card game over the internet.

