» Search Results » jackpo :Coming Full Circle

Coming Full Circle: Productivity

I’m somewhat obsessed about productivity, and use a number of quantified self tools (Fitbit Charge HR, Automatic) to measure and improve myself.   I also have an extensive suite of gadgets that help me automate my life.

My attempts for being productive can generally be summed up as:

Coming Full Circle: Obsessive MD / PhD Tech Guy

I am a product manager at Google working on healthcare. Previously, I led BioDesign at Columbia University, where I also did my MD / PhD.

I spend a lot of time thinking about productivity, healthcare, math, and gadgets. I sometimes teach, and sometimes read. I tend to really care about both online and offline civil liberties.  Feel free to ping me.

Coming Full Circle: AI analysis of my blogging style

After learning about UrAI.com from a blog I frequently read: Modeled Behavior, I decided to run my own blog through the system and see what it says.

jackpo.org is probably written by a male somewhere between 66-100 years old. The writing style is academic and happy most of the time.

Now really? I had no idea I was such a cherry person.. and age 66 – 100? WTF…

Coming Full Circle: In Search of The Good Corporate Citizen

In general, I have the belief that most ethics courses whether they be medical ethics or business ethics tend to be taught from too theoretical of a standpoint. Scenarios are often defined to have black and white answers, and thus the students never actually deal with true moral dilemmas until they are actually on the job. This is especially true for those who spend their lives in consulting and/or academia, with no real understanding of the pressures that actually happen in an operational environment. Having gone through some particularly stressful board meetings, I was quite excited when I heard about a new PBS production that will attempt to showcase some of the moral complexity involved:

Banner: In Search of the Good Corporate Citizen

Everyday we hear about business people who gamble on ethics to meet business goals. The ongoing stream of scandals begs the question, Why does this keep happening? From an Emmy-winning team of producers,In Search of the Good Corporate Citizenweaves together expert panel discussions with personal accounts from real-life white-collar criminals and whistleblowers.

Unable to catch the show on the air, I contacted Light On Production to try and get a copy of the DVD. After several phone calls, Denny Swenson, the producer of the show sent me a *free* copy of their first show, “Hitting the Numbers”!

I think the show is quite well done, and the stories that they showed were truly remarkable. The show leveraged a small panel to discuss each story after they were presented. The panel was moderated by Thomas Donaldson from the Wharton School of Business and was composed of:

  • William W. George, the former chairman and CEO of Medtronic
  • Ben Heineman, General Counsel of General Electric
  • Donna C. Boehme, former chief compliance officer of BP

Given the show was filmed in 2008, one can reasonably assume that Boehme did not lose her job over the oil scandal. However, just from the body language of the panelists, it was quite obvious that they were quite dismissive of the idea of having a chief compliance officer and frankly I am as well. Perhaps such a role is indeed necessary in many large institutions, but it was not clear from the panel discussions how a CCO as described by Boehmewould have in anyway contributed to ethical behaviors in an organization. What was truly disappointing with this panel was that they never really acknowledged how much pressure there was in middle management and how sometimes the decisions are actually not that black and white. Even with Donaldson offering up truly gray and realistic scenarios, the panel always converged on black and white solutions. I would assume that the panelists themselves were at least somewhat worried about their professional image if they had mention doubts. Perhaps true ethical discussions involving business executive can never happen in front of a camera?

Coming Full Circle: Installing Rails, Apache, MySQL and Passenger on Snow Leopard with MacPorts

Once in a while, I catch the startup bug due to people like Sean Burgess. So this post is based on hours of frustration that I had from setting up multiple osx machines to deploy rails. Much of this is for my own reference and borrows heavily from these sites and my own attempts on 4 different macs:

  1. http://www.frederico-araujo.com/2010/08/19/installing-rails-enviroment-on-snow-leopard-with-macports-mysql-and-modrails-passenger/
  2. http://2tbsp.com/content/install_apache_2_and_php_5_macports
  3. https://trac.macports.org/wiki/howto/MAMP

1. Preparing System

In general, just easiest to start from scratch if you haven’t used ports in a while (or have never used it). Also make sure that web sharing is OFF under System Preferences as we are going to install the apache version from macports instead.

sudo rm -rf \
    /opt/local \
    /Applications/DarwinPorts \
    /Applications/MacPorts \
    /Library/LaunchDaemons/org.macports.* \
    /Library/Receipts/DarwinPorts*.pkg \
    /Library/Receipts/MacPorts*.pkg \
    /Library/StartupItems/DarwinPortsStartup \
    /Library/Tcl/darwinports1.0 \
    /Library/Tcl/macports1.0 \

1.1 Download and Install Xcode & Macports


Download Page: http://www.macports.org/install.php

1.3.1 Update macports

sudo port -v selfupdate
port upgrade outdated

2. Apache, php5, mysql & PhpMyAdmin

2.1 Install Apache, php5, PhpMyAdmin and misc

sudo port -v install phpmyadmin php5 php5-mysql apache2 mysql5-server mysql5 memcached libmemcached wget sqlite3 +apache2 +pear

2.2 Make apache, mysql autoload on startup

sudo -u mysql mysql_install_db5
sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
sudo port load memcached

2.3 Activating PHP5

cd /opt/local/apache2/modules
sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so

2.4 Add index.php to the dir_module directive

Open /opt/local/apache2/conf/httpd.conf in your favorite text editor.

<IfModule dir_module>
    DirectoryIndex index.html index.php

2.5 Add mod_php and phpmyadmin

Also, at the end of the httpd.conf file, add the following lines so that Apache includes the mod_php and phpmyadmin file

#Include PHP configurations
Include conf/extra/mod_php.conf
# Local access to phpmyadmin installation
Include conf/extra/httpd-phpmyadmin.conf

Set up your PHP configuration files

cd /opt/local/etc/php5
sudo cp php.ini-development php.ini

Setup the MySQL default socket to use the CentOS MySQL socket location by editing php.ini


2.6 Building my.cnf and changing the MySQL default socket to conform to CentOS (optional)

Open /opt/local/apache2/conf/httpd.conf in your favorite text editor. Add a new mimetype so that Apache will direct files ending in .php to the PHP module for processing. Add the following within the block. Without this, all you’ll see is the text of your PHP scripts

sudo cp /opt/local/share/mysql5/mysql/my-medium.cnf /etc/my.cnf
sudo mkdir /var/lib/mysql/
sudo chown -R _mysql:_mysql /var/lib/mysql

Change the TWO lines in /etc/my.cnf that says

socket = /opt/local/var/run/mysql5/mysqld.sock


socket = /var/lib/mysql/mysql.sock

2.7 Create the phpmyadmin configuration file

create a file /opt/local/apache2/conf/extra/httpd-phpmyadmin.conf containing this text:

AliasMatch ^/phpmyadmin(?:/)?(/.*)?$ "/opt/local/www/phpmyadmin$1"

<Directory "/opt/local/www/phpmyadmin">
  Options -Indexes
  AllowOverride None
  Order allow,deny
  Allow from all

  LanguagePriority en de es fr ja ko pt-br ru
  ForceLanguagePriority Prefer Fallback

2.8 Setup aliases to control the two services

sudo  ln -s /opt/local/apache2/bin/apachectl /usr/sbin/apache2
sudo ln -s /opt/local/share/mysql5/mysql/mysql.server /usr/sbin/mysql.server
sudo apache2 restart
sudo mysql.server restart

2.9 Setup the mysql root password

Set the MySQL root password. Where is your new desired root password. You will be prompted for your existing password (“Enter password:”); since its empty, just press Return.

mysqladmin5 -u root -p password <new-password>

Then log into the mysql connectionand use these commands (replacing your root password of course) to update all the root accoutns

shell> mysql -u root -p
mysql> UPDATE mysql.user SET Password = PASSWORD('newpwd')
    ->     WHERE User = 'root';

2.10 Test the PHP server

Make an index.php in /opt/local/apache2/htdocs and put the following in it:


2.11 Install and Test phpmyadmin

First make these changes in /opt/local/www/phpmyadmin/config.inc.php

$cfg['blowfish_secret'] = WHATEVER YOU WANT THIS TO BE

You should see quite a bit of information regarding your php installation.

3. Ruby, Rubygems, Rails, other gems

3.1 Install Ruby from macports

sudo port -v install ruby
$ ruby -v
ruby 1.8.7 (2010-08-08 patchlevel 302) [x86_64-darwin10]

3.2 download rubygems from http://rubygems.org/pages/download

cd /tmp
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar -xvf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb

3.3 Install rails, rake, rspec etc.

sudo gem install rake rails thin tzinfo capistrano ruby-debug rspec mysql sqlite3-ruby

4. ImageMagick, Rmagick and mini_magick (Optional)

lets install ImageMagick with support for JPEG, TIFF, WMF, PDF, and PNG images, and for Postscript and TrueType fonts.

sudo port -v install tiff -macosx imagemagick +q8 +gs +wmf
sudo gem install mini_magick rmagick

Test rmagick

$ irb -rubygems -r RMagick
>> puts Magick::Long_version
This is RMagick 2.13.1 ($Date: 2009/12/20 02:33:33 $) Copyright (C) 2009 by Timothy P. Hunter
Built with ImageMagick 6.6.3-0 2010-08-19 Q8 http://www.imagemagick.org
Built for ruby 1.8.7
Web page: http://rmagick.rubyforge.org
Email: rmagick@rubyforge.org
=> nil

5. Passenger

5.1 Install Passenger gem

sudo gem install passenger

5.2 Check Passenger path

passenger-config --root
 -> /opt/local/lib/ruby/gems/1.8/gems/passenger-2.2.15

5.3 Build passenger for apache

and don’t worry about the other steps, we will cover them directly in the guide

sudo passenger-install-apache2-module

5.4 Enable Passenger on apache:

create /etc/apache2/extra/httpd-passenger.conf and change wherever necessary for your directories.
LoadModule passenger_module /opt/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so
PassengerRoot /opt/local/lib/ruby/gems/1.8/gems/passenger-2.2.15
PassengerRuby /opt/local/bin/ruby
PassengerMaxPoolSize 6  # maximum global rails servers
PassengerMaxInstancesPerApp 2  # maximum rails servers per application
RailsFrameworkSpawnerIdleTime 1800
RailsAppSpawnerIdleTime 600
PassengerPoolIdleTime 600
PassengerMaxRequests 1000  # after 1000 requests will restart server, to skip memory leak 🙂

# Enabling NameBased Virtualhost

# my rails app virtual host 1
    ServerName my-rails-app.local
    DocumentRoot "/Users/jackpo/rails/my-rails-app/public" # change this to match your folder
    RailsEnv "development"
   <Directory /Users/jackpo/rails/my-rails-app/public>
        # change this to match your folder
        # MultiViews must be turned off
        Options -MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    # logs are optional, change this to match your folder
    CustomLog  "/Users/jackpo/rails/my-rails-app/log/access_log" combined
    ErrorLog   "/Users/jackpo/rails/my-rails-app/log/error_log"

5.5 Enable Virtual host on apache:

Edit /opt/local/apache2/conf/httpd.conf and add this new line at the bottom:

# Include Passenger ModRails config file
Include conf/extra/httpd-passenger.conf

5.6 Add your .local domain to /etc/hosts/

edit /etc/hosts and Add this line to that file and change to the name of your choosen application

You might add as many as you want, each line for each that ServerName on your VirtualHost blocks my-rails-app.local myapp-xyz.local

5.6 Restart Apache

sudo apache2 restart

6. Final

go to your browser and open the url of your application http://my-rails-app.local

If it works, congratulations. If it didn’t.. uh.. try and google. I maybe able to help, but I don’t have that much time!

all posts

18A long way home

27AI analysis of my blogging style
13In Search of The Good Corporate Citizen
13Installing Rails, Apache, MySQL and Passenger on Snow Leopard with MacPorts
8Our Salt Intakes
26Gallery2 to Flickr Migration
16Interesting statistics about sexual relationships and their implications on the spread of HPV
152009 as A Turning Point for Personal Genomes
3HBR’s Top 100 Best-Performing CEOs in the World

1Blogging Break!

19Collapse of the Economy
27Jack’s Philosophies on life – Part I (Effort)
17Tools for small Organizations
19Elevator Advertising on Campuses
9New Blog Design!
16Heading off to UCSB Conference

26Bubble 2.0
222007 Credit Card Satisfaction Survey
22Startup Camp – Wednesday November 28th, 2007
18Coming back out of hibernation…. again
28Princeton Review Hemorraging Money
21Canadian Dollar reaching parity with US Dollar
20Amherst College replaces financial aid with scholarships
17Sunrocket bankrupt and royally screws customers
16Harry Potter and the Deathly Hallows now definitely leaked
11McCain and the White House both falling apart
2The perfect storm at the White House
3Penn State ARML 2007 Recap
25Viagra to help travellers adjust to jet lag?
25Azia Kim is my hero
24Domain name squatters are assholes
21I am a covert: Vista & HDTV
17Aswin Chandrasekaran – Ruler of India!
13Korean Children Festival 2007 @ Fresh Meadows
10Celebrities gone wild, Paris Hilton and Jane Fonda
8Globalization, hackers too?
4AACS declaring war on bloggers
17Heroic acts amidst Virginia Tech tragedy
16Condolences to the Virginia Tech community
14ARML’s financials questionable
6Right to privacy and Vonage both lose in US court system
31Coworking convert
20Experian Group – Credit Reporting Pricks
12New Direction in life
17No calculators on AMC 2008 and beyond
29Michael Crichton’s Next
27University of California vs Intelligent Design
24Where is the knowledge age?
18Apple’s iPhone has no 3rd party application support
15Helper Applications
6Happy New Year and have a very hungry 2007!

17Transparency and accountability needed in government
15Scientists fighting back against the Bush administration
9MP3 players and headphones
23New York Magazine: The bastion of Journalism Idiocy
22What it takes to be great
16Computer Spam increasing in both quantity and complexity
6Scandals Abound – Indecision 2006
25NYU Psychology Department violating the spirit of IRB approvals and crossing ethical boundaries
20Faking Terrorist Attacks in Order to Graduate
18Apple Computer report preliminary fiscal fourth-quarter earnings
18Confident students do worse in math; bad news for U.S.
10Where is our Peter Wiggin?
8World of Warcraft meets South Park
7New web quiz: “Generous Inventor”
5Seamless Pictures – Robert Gonsalves
27Electronics Disaster
28Think you’ve gone on bad dates?
24My life as told through Amazon.com
25Sticks of Hope
12Slight Hiatus
31Heart doc halts surgery to donate blood
24IPO Frenzy! – Go Daddy, et tu?
17Illegal Immigration – US v.s. Mexico
15Vonage proposes IPO
6In Search of Excellence & Capital One
29DC Film Fest – A World without Thieves
23DC Film Fest – Hard Candy
17Foam Chair
15Fedora Core 5 – MythTV Adventures
11NYSML 2006
7Following Geoff
6Fedora Core 5 – Ouch…
31Legacy of Baltimore County Math Team
29SezenGate 2006 – Academic Scandal
27Netgear WGR101 – Review / False Advertising
22Random Survey
20Digital Media Consumers’ Rights Act
16Transparency into AMC’s operations

14Scientific Jargon
27Stunning triumph by math students gets short shrift
12Warez Crackdown
28Supreme Court Cleansing Needed
9Personality Quiz (Because of Jeff and Jennie)
12NYSML 2005
2Living Will
30The sad state of the world
18Tiananmen Square

11Incompetence in the Board of Elections
20A letter by Terry Jones (of Monty Python fame) to The Observer
6The I Shing @ Slashdot
3Stolen from Darren’s profile
13Glossary for Men | Words women use
8McDonald Coffee lawsuit not baseless
8The Trouble With Licensure
7Sis’s description… so true..
6Messed up Vendors
6Top 10 reasons for committing seppuku @ Slashdot
5HMMT 2004
3Woman uses sex act as manslaughter defense @ CNN
3Personality Test for Relationships
1Passion tickets bear ‘mark of the beast’ @ CNN
1Young Programmer, Stop Advocating Free Software @ Slasdot
29Billy Crystal @ Academy Awards 2004
29Jami Bernard @ New York Daily News
26New Lab… again
26THIS IS YOUR PRESIDENT TALKING!!!! – The first three years…can the English language survive?
26As God Told Me [Andy Rooney]
24Confessions of a Harvard Delinquent [Peter Cummin]
24This guy has balls [Michael Francis]
24Sarbuze @ TribalWar

28Wei Wei!

14Disaster Strikes
14First REAL encounter with Diane
14First Encounter with Diane
28Math Team…..
28First Rejection

28Blast from the past via Papa Smurf!
28First Love
27Probability @ TCI


Together with the prevention buy lasix and treatment of serious complications. Their synthetic analogs order deltasone in the disorders of many organ systems.