Friday, January 30, 2009

a paper

http://ads.nao.ac.jp/full/1968ApJ...152..577W

this was the last paper by the author, john waddell iii. in its original form, the paper was very long and was rejected for publication in apj. the author was very upset upon receiving the rejection letter from the editor, the famous "chandra", and stormed out with his car and got killed later in a car accident. chandra was sympathetic of this and asked the referees to edit and condense the paper to a publishable form, and the paper eventually got published.

Monday, January 12, 2009

Thursday, January 08, 2009

america

a land with ample supply of paper towels in restrooms
with icy toilet seats
with real non-smoking restaurants
with the nuisance of tipping and paying tax when dining out
with the blessing of extremely good return policy

crazy

前幾天在電車上看到一個廣告
一家電視台要播關於world heritage的節目
標題叫"the世界遺產"

總覺得不倫不類
冠詞在那是做什麼的?

此乃抵日後所見最怪異之現象

Saturday, January 03, 2009

setting up useful tools in os 10.5

-- install fink (comes with finkcommander), scisoft

-- install sm

read sm.install first!

then run make in the sm2_4_28 directory. then sudo make install in the same directory.

NOTE: as noted in http://geordie.astro.uiuc.edu/mac.html#sm, I need to substitute
XLIB11 = -lX11
for
XLIB11 = -L/USR/X11R6/lib -lX11
in the src/Makefile file to compile sm.

put .sm in home directory.

-- install MacTeX, which includes TeXShop

move texmf to ~/Library

-- next, some steps for x11. following helpful tips given here, I create the following files to put in my home directory:

.xinitrc:
###########################################################
#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
xrdb -merge $sysmodmap
fi

if [ -f $userresources ]; then
xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
xrdb -merge $usermodmap
fi

# initialise programs below
# xterm &
# start the window manager

exec quartz-wm
###########################################################

.login:
###########################################################
source /usr/share/tcsh/examples/login
###########################################################

.logout:
###########################################################
source /usr/share/tcsh/examples/logout
###########################################################

.cshrc
###########################################################
setenv TERM xterm-color
setenv CLICOLOR true
setenv LSCOLORS exfxcxdxbxegedabagacad
# set color ls options

source /usr/share/tcsh/examples/rc
# sourced handy defaults

test -r /sw/bin/init.csh && source /sw/bin/init.csh

source /Applications/scisoft/all/bin/Setup.csh

set path=($path . )
###########################################################

in addition I also download Xcode 3.1.2 Developer Tools from
https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/204/wo/4R4sFKmLiB8s3DbJsyXUK9qgCeq/7.1.17.2.1.3.3.1.1.1.1.0.3.4.3.3.1
and install Developer Tools Essentials and UNIX Development Support

this installs gcc; for gfortran, I download the compiler here

then update x11 to the latest version from xquartz project website

-- ssh: as I'm using a new laptop, I need to create a key, then transport it to the machines I want to connect to. using file sharing to first transfer my new pub key to my old laptop, then use it to transfer the key to the servers I work with.

here and here provide good tips.

the basic idea is, on the local machine, type "ssh-keygen -t dsa", then somehow transport the .ssh/id_dsa.pub key to the server, and append it to the ~/.ssh/authorized_keys file on the server.


-- for astronomers, starlink and scisoft are useful collection of tools to have, despite their big sizes

set a reply-to address in gmail

from this gmail help page:

to define a reply-to address:
1. click 'Settings' at the top of any gmail page, and open the 'Accounts' tab.
2. click 'edit info' next to your email address.
3. click 'Specify a different "reply-to" address' in the dialogue box.
4. enter the address to which you want the recipient(s) to reply.
5. click 'Save Changes.'

alternatively, one can configure gmail to send and receive emails from other accounts. these pages describe how to do that:

http://mail.google.com/support/bin/answer.py?answer=22370
http://mail.google.com/support/bin/answer.py?answer=34528
http://mail.google.com/support/bin/answer.py?answer=22377

Friday, January 02, 2009

some tips in using os 10.5

  • to name the computer: system preferences -> sharing
  • to enable root: see this article
  • to change the login shell: as root, run "chsh -s /path/to/the/shell username"
  • using eps figures in latex (MacTex+TeXShop): in TeXShop's preference, in the typesetting pane, select "tex+ghostscript"
  • to combine all opened safari windows: window -> merge all windows
  • to navigate through the tabs in safari: shift+command+right/left keys
  • to sort safari's bookmarks: use bookdog, which is not a free software, but you can download it and sort the bookmarks with a trial version
  • to have preview open all images in one window: preferences -> images, select "open all images in one window"
  • to customize the toolbar of preview and finder window: view -> customize toolbar
  • to navigate through the tabs in firefox: option+command+right/left keys
  • to view pdf files directly within firefox: install pdf plugin
  • enable 3-button setting for mouse
  • to remove the icon for modem on the top bar: command click the icon to drag it off the bar
  • it's not necessary to wirelessly connect to a time capsule; one can connect the laptop and the capsule with an ethernet cable
  • spotlight indexes the hard drive, that's why it can find things quickly; if for some reason spotlight doesn't work well, one can try to re-index the hard drive; see this article
  • can set up the trackpad so that tap the trackpad with two fingers functions as clicking the right button
  • to change the default application to open certain file types, right click the file, choose "get info", then click the triangle next to "open with", select the desired program/application
  • to automatically resize a windown, option+click the green button on the upper left corner of a window
  • in itunes, when importing a cd, but the album/track info from the cddb is wrong, can edit the album/track info, then submit the correct info back to cddb; or, in the case of selecting the wrong album when there's multiple entries of the cd, can use "advanced -> get cd track names" and select again
  • this is not os x, but a general unix/linux trick: to go back to the previous directory, use cd -
  • to save a ppt presentation as a pdf file, can use print -> save as pdf
  • note that time machine doesn't back up things in the trash
  • to change the number of items remembered in "recent items": System Preferences -> Appearance
  • in Finder, view options: hold the option key will make "restore to default" appear!
  • to disable the sidebar when opening pdf files with Preview: preferences -> pdf -> check "show sidebar only for table of contents"

some sites that have useful tips in using mac os x:
http://macsingularity.org/astrowiki/tiki-index.php

migration from powerbook to macbook

剛買了新的13" macbook, 花了一番功夫把資料從原先用的15" powerbook g4傳到新的電腦上. 藉此記下過程以供日後參考.

一開始的時候, 用了os x提供的migration assistant. 雖說很方便, 但因為我不知道怎麼只選擇部份的東西拷到新電腦上, 因而powerbook上許多舊的, 過時的設定, 也都跟著傳了過去. 在網上找了這篇, 裡面提供了許多有用的技巧, 值得參考.

我在舊電腦上跑的是os x 10.4, 而新電腦上的是10.5.

建議是
(1) 先將新的電腦設好(也就是略過migration assistant): network, trackpad, timezone, expose/spaces, etc. Note that in both laptops I use the same username.
(2) 然後是software update
(3) 為電腦取名: system preferences -> sharing; 在同個視窗內選擇 file sharing
(4) 下載及安裝thunderbird, skype 等需要的軟體
(5) 在舊電腦上, 將file sharing打開, 用網路線連接兩台電腦 (note: there's no firewire port in 13" macbook!)

我要migrate的軟體包括safari, thunderbird, skype, ical, itunes, x11. 以下簡單說明:

safari - 我要的只是書籤. 只要將~/Library/Safari/Bookmarks.plist copy到新電腦上的同個資料夾即可
thunderbird - follow the instructions on this page; basically (quoted from that page):
  • Locate your Default Thunderbird Profile folder named "XXXXXX.default" where the X's are a random mix of numbers and letters. On a Mac running OS X it's located in your Home folder (or if you have multiple users on your Mac, your user account's folder) > Library > Thunderbird > Profiles.
  • Copy all the files in the Default folder to the new computer over the network.
  • Start up the "new" Mac running Mac OS X and download, install & launch Thunderbird. By launching Thunderbird, the program will create a new Default Profile in Home > Library > Thunderbird > Profiles.
  • Shut down Thunderbird.
  • Move the contents of the Default folder from the "old" Mac to the "new" Mac's Default Profile for Thunderbird. Again, the Default Profile folder is located in Home > Library > Thunderbird > Profiles and is named "XXXXXXX.default" where the X's stand for random characters.
skype - 使用者資料存在~/Library/Application Support/Skype. 將資料夾裡面的user的folders copy到新電腦上的同個folder
ical - 在舊電腦中將calendar export為 .ics檔 傳到新電腦上 再import
itunes - 把原先的itunes library (~/Music/iTunes/) copy過來
x11 - 把 .XDefaults, .cshrc, .vimrc, etc 拷到新電腦上

最後, 一些零碎的設定:
skype - 避免他在每次login時自動啓動, 到system preferences -> account中的login items, 刪掉skype
x11 - in x11's preference, select "emulate 3 button mouse"
finder - open a finder window, set it the way you want, then click "use as default", then all finder windows will appear the way you like