installing mysql ruby gem with macports mysql on snow leopard
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- -with-mysql-dir=/opt/local —with-mysql-lib=/opt/local/lib/mysql5/mysql —with-mysql-include=/opt/local/include/mysql5/mysql
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- -with-mysql-dir=/opt/local —with-mysql-lib=/opt/local/lib/mysql5/mysql —with-mysql-include=/opt/local/include/mysql5/mysql
Add these to the end of the specified files. I only needed the first one the last time I set this up, but I had done all three in the past.
/etc/kde4/kdm/Xsetup
/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc <servier-ip-address>
/etc/kde4/kdm/Xstartup
/usr/bin/killall synergyc
sleep 1
/etc/kde4/kdm/Xsession
/usr/bin/killall synergyc
sleep 1
/usr/bin/synergyc <servier-ip-address>
DHH posted about merging merb’s provides/display into rails. He proposed used a dual of respond_to and respond_with, similar to merb’s provides/display, with a couple tweaks to allow each action to respond to different types. There are a couple things about the API he suggested which I don’t love:
class DealsController < SubjectsController
respond_to :html, :xml, :json
def index
@deals = Deal.all
respond_to(:html, :xml, :json, :atom, :with => @deals)
end
def new
respond_to(:with => Deal.new)
# uses the class-level defined response types (html, xml, and json)
# maybe this is a good case for also having respond_with(Deal.new)
end
def create
@deal = Deal.create!(params[:deal])
respond_to(:xml, :json, :with => @deal) do |format|
format.html { redirect_to @deal }
end
end
end
var myString = ' first line \ second line \ third line \ ';
If you ever replace drag/drop elements on the page (eg. through rjs) make sure you unregister the old ones first, or IE will crash.