Want more?

Account stuff

An anti chain mail service

Jul 18 by Justin Comment

I hate chain mails, so very much. I hate them so much that, when receiving them from even my girlfriend’s friends, I will risk becoming a social pariah by replying with an article from Snopes and:

p.s. I HATE CHAIN MAIL

I hate chain letters for several reasons:

  • They are never real or helpful
  • They waste my time
  • They transmit malware/viruses
  • Prey off peoples’ “Faith”

Often, I feel like replying to every person in the chain with the same Snopes reply; however, I only share my outrage with the people who care enough about me to send an email in the first place. You know, the people who deserve it.

But, I was thinking about creating a service where you can forward an email and it will reply to everyone in the forward chain.

This would let Ashley Duhamel at NetJets know the Dalai Lama did not create a powerpoint slide that, through 14 different people, found its way to me.

P.S. I HATE CHAIN (e)MAIL

Postfix with ActionMailer

Jul 18 by Brian Comment

Notes for getting Postfix working with ActionMailer:

- Make sure there is a main.cf file (touch /etc/postfix/main.cf)
- Start the service: /etc/init.d/postfix start
- Test the service: mail brian@mydomain.com
- Configure ActionMailer

ActionMailer::Base.delivery_method = :sendmail

What is running on Port X?

Jul 18 by Brian Comment

Have you ever been frustrated trying to start a server in Windows and you get a “Bad file descriptor” error? That means most likely there is another process running that is listening at port the port you’re trying to listen on. In Linux operating systems, the solution is to use lsof.

lsof -i:80

Tells you exactly the process ID that you are competing with for port 80.

kill -9 3212

kills it and frees the port. In Windows, run:

netstat -aon

To see a listing of all listening ports and the processes that own them, along with the process id. Open Task manager, go to View > Select Columns, and add process ID. Now you can find the problem process and kill it.

By the way, if the name is something like inetd and you’re fighting for access to port 80, chances are its the IIS Admin service, and you actually have to open Windows Services and stop it, or it will continue restarting itself.

Dobson AND Obama

Jun 25 by Justin Comment

I part of the John Stewart generation.  Despite originally hating him as Criag Kilborn’s replacement, I’ve grown to admire his political attitude which was best summarized in his crossfire debate.

In summary, politics, the media, and the American people are suffering from self-imposed division.  It keeps this country from moving forward.
This is why Obama has been so refreshing.  He seems to actually want to unite people.  And, despite changing his position on public financing, I think he really means it.

Today, you might have noticed the seemingly heated exchange between Dobson and Obama.
In my opinion, it highlights Obama’s challenges with being a uniter.

Challenges
It’s very clear that Dobson is projecting his views on the senator onto what Obama said.  Obama has a very liberal voting record, especially on abortion.  But Obama was not taking a stance on abortion, gay rights, or guns.  He wasn’t saying faith should be removed from someone’s decision making process.   Obama was giving the faithful a blueprint for success in the ‘enlightened’ 21st century.

Secular arguments

A ’secular’ position is only secular because it has the strongest rational arguments. If religious people can make secular arguments, like they eventually did with slavery, and equal rights (MLK), they have a much stronger chance at public policy.

Resorting to “God told us so” is not going to play out in public policy.  Obama is giving instructions on how religious leaders can find common ground.  Maybe if Dobson listened to him, he would be more effective at his pro-choice efforts.

Unfair comparison

Dobson distorts Obama’s words in the way he is accuses Obama of distorting the bible.  Obama didn’t compare Dobson with Sharpton.  In fact he used their differences to provide more evidence for his point - that people interpret their religion very differently.

Great experiement

Obama’s campaign is a great experiment on the American people.  I disagree with most of his economic stances.  But I can’t get over the fact that he is always well reasoned in his public discourse.  I’m hoping that there are other Americans who can recognize the importance of voting for the a man that represents something, other than the opinions that will get him elected.

Tim Russert dies at 58

Jun 13 by Justin Comment

Today, Tim Russert died. He was, by far, my favorite political journalist. He established himself with the difficult combination of opinion and fairness, which can only be archived through the perfect, but contradictory balance of confidence and humility.

It was only fitting that he demonstrated his paradoxical nature in one of his last public acts - pronouncing the Democratic Primary for Obama. A bold, but correct move.  I’m going to miss him.

What’s up?

May 23 by Justin Comment

It has been a long time since we’ve posted. The reason? We’ve been very busy with JavaScriptMVC and its blog.

Here’s a list of things that have been going on with JavaScriptMVC, Jupiter, and myself (Brian will update you separately if he finds the time) .

JavaScriptMVC

  • Released first beta, but haven’t publicized it yet.
  • Got a rhino based compressor working. I haven’t spent time with Java since my college work. What I would have done to have Eclipse then.
  • Just created a pretty good plan for JavaScriptMVC 2.0.
  • We’ve been getting about 50 downloads a day for the last month or so.

Jupiter

  • Still trying to close a deal that’s lasted over 7 months, but it actually is starting to get some headwind.
  • We are going to create a professional version of F->IT. It’s very old 0.1 release has gotten over 3000 downloads without any promotion. The online version will start having ads on the homepage. We have to pay the bills.
  • We are going to do the same thing with DamnIT and potentially CommentIT. Unless someone protests, NoteIT will probably see no future development.
  • We put ads on JavaScriptMVC’s site. But we aren’t making any money. I think our add location is very bad.
  • We’re going to moved F->IT to Amazon’s Elastic Compute Cloud. Someday Brian will give a tutorial on how to setup a rails app on it. It’s a pretty good deal.
  • We’re moving to Rails 2.0 for all of our applications.
  • A lot of deals have gone south. Lost one job to a Chinese competitor. I didn’t think that sort of thing actually happened … wrong.

Justin

  • Went to Jamaica on my first real vacation since I left Accenture.
  • Joined Aspiring Association of Business Leaders.
  • Joined Thin Server Architecture Group.

Setting up Exception Notification on Rails

May 13 by Brian Comment

Install the plugin

ruby script/plugin install exception_notification

Set up the plugin
Include the following inside the ApplicationController:

include ExceptionNotifiable

Set up ActionMailer by including the following in environment.rb:

ActionMailer::Base.smtp_settings = {
:address  => “secureserver.net”,
:port  => 80,
:domain  => ‘www.sever.com’,
:user_name  => “accounts@server.com”,
:password  => ‘pass’,
:authentication  => :login
}

Set up ExceptionNotification by including the following in environment.rb:

ExceptionNotifier.exception_recipients = %w(brian@server.com)
ExceptionNotifier.sender_address = %w(brian@server.com)

Testing it

This is the part I always forget.  ExceptionNotifier by default does not work in development mode or when the web server is accessed from localhost.

  1. Turn on production mode.
  2. Add “local_addresses.clear” to ApplicationController.

Hiding passwords on the server

May 13 by Brian Comment

Rails 2.0 uses cookie-based sessions by default.  This eliminates one place where passwords are stored on the server: session files.  Passwords are also being stored in your log file because Rails logs every parameter of every request.  To hide passwords, add the following in application.rb:

class ApplicationController < ActionController::Base
filter_parameter_logging :password

Fixing Flash Sessions with Cookie-based Sessions

May 13 by Brian Comment

Flash initiated HTTP requests do not, by default, grab the correct session from Rails because it sends the wrong session_id. To fix this, send the session_id in the url, then amend the session class in rails to use this session id instead of the one sent by Flash.

  1. Send the correct session_id as part of the url. For example: https://fit.jupiterit.com/upload?_ftp_session_id=98564df5564sfd98sd4f564sfd55
  2. In any controller/action where the flash sessions will be used, insert the following: session :cookie_only => false, : only => : index
  3. At the bottom of environment.rb, add the following patch for cookie sessions:

class CGI::Session
alias original_initialize initialize
def initialize(request, option = {})
session_key = option[’session_key’] || ‘_session_id’
query_string = if (qs = request.env_table[”QUERY_STRING”]) and qs != “”
qs
elsif (ru = request.env_table[”REQUEST_URI”][0..-1]).include?(”?”)
ru[(ru.index(”?”) + 1)..-1]
end
if query_string and query_string.include?(session_key)
option[’session_data’] = CGI.unescape(query_string.scan(/#{session_key}=(.*?)(&.*?)*$/).flatten.first)
end
original_initialize(request, option)
end
end

class CGI::Session::CookieStore
alias original_initialize initialize
def initialize(session, options = {})
@session_data = options[’session_data’]
original_initialize(session, options)
end

def read_cookie
@session_data || @session.cgi.cookies[@cookie_options[’name’]].first
end
end

Thanks to Inquiry Labs for sharing the above code.

Flash HTTPS Gotcha

May 12 by Brian Comment

If you’re deploying an application that uses Flash to send an HTTP request to your server, be aware that http requests aren’t sent on secure sites using an invalid certificate.   This threw me for a loop while working on a temporary deployment of F->IT and I couldn’t get the Flash uploader to work with HTTPS.  If you’ve set up HTTPS, but the domain you’re using doesn’t have the right certificate, your browser will warn you, but you click OK and it goes away.  However, Flash must have its own security measures to prevent sending HTTP requests when it detects the given certificate doesn’t match the current domain on a secure site.