2008/07/22

404 fetching http://gems.datamapper.org/yaml


$ sudo gem sources -r http://gems.datamapper.org
Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 404 fetching http://gems.datamapper.org/yaml

$ sudo nano ~/.gemrc

Capistrano, git, rails again.

set :use_sudo, false
# ====================================================
# CUSTOM OPTIONS
# ====================================================
set :user, "deploy"
set :runner, user
set :application, "go.go.com"
set :domain, "xx.xx.xx.xx."

role :app, application
role :web, application
role :db, application, :primary => true

# ====================================================
# DATABASE OPTIONS
# ====================================================
set :rails_env, "production"

# ====================================================
# DEPLOY TO
# ====================================================
set :deploy_to, "/home/#{user}/public/#{application}"

# ====================================================
# REPOSITORY
# ====================================================
set :scm, :git
set :deploy_via, :remote_cache
set :repository, "ssh://deploy@xx.xx.xx.xx:xxxx/var/git/ext_kocm.git"
set :repository_cache, "git_cache"

# ====================================================
# REPOSITORY
# ====================================================
set :ssh_options, { :forward_agent => true }
default_run_options[:pty] = true
set :port, 30003 #ssh port

# ====================================================
# Tasks
# ====================================================
namespace :deploy do
desc "Restarting mod_rails with restart.txt"
task :restart, :roles => :app, :except => {:no_release => true} do
run "touch ${current_path}/tmp/restart.txt"
end

[:start, :stop].each do |t|
desc "#{t} task is a no-op with modrails"
task t, :roles => :app do; end
end
end

2008/07/08

Ubuntu Hardy Intel graphics dual monitor on LG XNote LW25

1. xorg.conf

http://www.thinkwiki.org/wiki/Installing_Ubuntu_6.06.1_on_a_ThinkPad_R60e#Intel_945GM_with_the_xorg_Intel_driver

2.
$  xrandr -q 
$ xrandr --output LVDS --auto
$ xrandr --output LVDS --mode 1024x768 --output VGA --off
$ xrandr --output VGA --right-of LVDS --mode 1024x768

3.
compiz-switch howto
sudo apt-get install fusion-icon

You can run Fusion-icon immediately by opening the Run Applications dialog with Alt-F2 and typing fusion-icon. Note that this will cause Compiz to restart.

To start Fusion-icon whenever you log in, add it to the Startup Programs list in System->Preferences->Sessions.

adding Fusion-icon to startup programs

I haven’t found a package for Ubuntu 7.10, but those who are waiting until the final 8.04 release to upgrade can also use the similar Compiz-Switch application instead.

[update] emiligene has posted a Ubuntu 7.10 repository for Fusion-icon in the comments:
deb http://ppa.launchpad.net/maco.m/ubuntu gutsy main restricted universe multiverse
Thanks!

[update] An anonymous commenter has pointed out that running fusion-icon -n will prevent the application from unnecessarily restarting Compiz when it starts. You should use this command instead.