YourMac:~ tosh$ mkdir src
YourMac:~ tosh$ cd src/
YourMac:src tosh$ curl -O http://gdata-python-client.googlecode.com/files/gdata-2.0.14.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1828k 100 1828k 0 0 745k 0 0:00:02 0:00:02 --:--:-- 886k
YourMac:src tosh$ tar xzvf gdata-2.0.14.tar.gz
x gdata-2.0.14/
...
x gdata-2.0.14/MANIFEST
YourMac:src tosh$ cd gdata-2.0.14
YourMac:gdata-2.0.14 tosh$ sudo python setup.py install
Password:
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267:
...
Writing /Library/Python/2.7/site-packages/gdata-2.0.14-py2.7.egg-info
YourMac:gdata-2.0.14 tosh$ cd ~/src
YourMac:src tosh$ curl -O http://googlecl.googlecode.com/files/googlecl-0.9.13.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 85690 100 85690 0 0 64726 0 0:00:01 0:00:01 --:--:-- 92637
YourMac:src tosh$ tar xzvf googlecl-0.9.13.tar.gz
x googlecl-0.9.13/
…
x googlecl-0.9.13/PKG-INFO
YourMac:src tosh$ cd googlecl-0.9.13
YourMac:googlecl-0.9.13 tosh$ sudo python setup.py install
running install
…
Finished processing dependencies for googlecl==0.9.13
YourMac:googlecl-0.9.13 tosh$ cd
YourMac:~ tosh$ google youtube list
Please specify user: toshiki.saito
Please log in and/or grant access via your browser at https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=4%2FA62soD028vPKHABqZA9GVQ&hd=default then hit enter.
2011 Athletic Festival,http://www.youtube.com/watch?v=hZSplbQ&feature=youtube_gdata
...
1st concert,http://www.youtube.com/watch?v=AxFNTaw&feature=youtube_gdata
YourMac:~ tosh$ google docs list
Please specify user: toshiki.saito
Please log in and/or grant access at https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=4%2FF9R8_nT7ulks0qGomLkhe3-&hd=default
Please enter the verification code on the success page: 3egM-DKMKArS8FQbB3
Ptosh SOP Clerk DM,https://docs.google.com/document/d/1Wx7sAik8lOAGrLMsQa-A-Tt2DTPUHPLLBiFCY/edit
...
Otsuka 2006,https://docs.google.com/Doc?docid=0AfBu_SyaL1DWYWg4bjliZ2NrNmDQ4anBocG5od2M
YourMac:~ tosh$ login
login: root
Password:
Last login: Wed Mar 7 09:53:46 on console
YourMac:~ root# google docs list
Please specify user: toshiki.saito
0:123: execution error: An error of type -10810 has occurred. (-10810)
Please log in and/or grant access at https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=4%2FsxerBjcxdfsUhtM4vN&hd=default
Please enter the verification code on the success page: FLehmasdfaserersgk2Xy3w
YourMac:~ tosh$ tail -n 100 /var/log/daily.out
...
/etc/periodic/daily/backupMouseInventory.sh: line 2: google: command not found
-- End of daily output --
require 'date'
#
#= DATEDIF function in Excel
#
#Authors:: Toshiki I. Saito
#Version:: 1.0 2011-09-08 tosh
#License:: The MIT License
#--
# starting: Starting date
# ending: Ending date
# Interval: Meaning; Description
# y: Years; Complete calendar years between the dates.
# m: Months; Complete calendar months between the dates.
# d: Days; Number of days between the dates.
# ym: Months Excluding Years; Complete calendar months
# between the dates as if they were of the same year.
# yd: Days Excluding Years; Complete calendar days
# between the dates as if they were of the same year.
# md: Days Excluding Years And Months; Complete calendar days
# between the dates as if they were of the same month and same year.
#++
def datedif(starting, ending, interval)
if ending < starting then false
else
interval = interval.downcase
years = (ending.strftime('%Y%m%d').to_i - starting.strftime('%Y%m%d').to_i)/10000.to_i
months = (ending.strftime('%m%d').to_i - starting.strftime('%m%d').to_i)/100.to_i
months = months<0 ? months+12 : months
days = ending.day - starting.day
case interval
when 'y' then years
when 'm' then years*12 + months
when 'd' then (ending - starting).to_i
when 'ym' then months
when 'yd' then (ending - (starting >> 12*years)).to_i
when 'md' then (days<0 ? ending - (starting >> 12*years+months) : days).to_i
else false
end
end
end
Natureの記事読みましたが、ここでも専門家が「The levels in Japan itself, outside the immediate vicinity of the Fukushima power plant, “wouldn’t scare me”, he adds.」
つまり福島原発のすぐそば以外であれば私は怖くないと言っています。
#まずCentOSのipアドレスに先ほど設定したユーザーのpasswordでログイン
telnet 192.168.210.131
#ルート権限に。suの後の"-"の入力大切。CentOSのルートパスワードを入力。
su -
#システムをアップデート
yum -y update
#NATなのでfirewallをoffにして、Macのターミナルから常にアクセスできるようにする。
#HostのMac以外からはpingも通らなかったので大丈夫かと
chkconfig --level 2345 iptables off
#kernelもアップデートされるので
reboot
#再起動後もう一度telnet, su
#今度は"-8"という8bitオプションを付けて起動。
#これで実際にプログラミング時に必要な日本語入力が出来るようになる。
telnet -8 192.168.210.131
su -
#makeコマンド使えるように、また後々色々足りないと怒られないようにするために次をインストール
yum -y groupinstall base 'Development Libraries'
#ruby, sqlite3, rubygemsはyumやgemでインストール出来ないので個別にコンパイル
#wgetはダウンロードに, gccはコンパイルに必要
yum -y install wget gcc
#約25分経過
rubyのインストール
#~/srcなどソースを置く場所を指定。どこでもOK。面倒なので~にしている。
cd
wget ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p302.tar.gz
tar xzvf ruby-1.8.7-p302.tar.gz
cd ruby-1.8.7-p302
./configure --prefix=/usr
make && make install
ruby -v
#ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]と表示されればOK
cd
wget http://www.sqlite.org/sqlite-autoconf-3070400.tar.gz
tar xzf sqlite-autoconf-3070400.tar.gz
cd sqlite-autoconf-3070400
./configure --prefix=/usr
make && make install
sqlite3 -version
#3.7.4と表示されればOK
RubyGemsのインストール
cd
wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz
tar xzf rubygems-1.3.7.tgz
cd rubygems-1.3.7
ruby setup.rb
gem -v
#1.3.7と表示されればOK
後は適当な.docファイルを選択後
情報を見る[command]+[I]
「開くアプリケーション」を選択、「その他」を選択(下の図の[TextEdit.app]と書いてある所をクリックして選ぶ)
左側の先ほど登録した「Application」フォルダをクリック
「推奨アプリケーション」→「全てのアプリケーション」に変更
「Microsoft Word – Windows Xp Professional.app」などVMware Fusionの中のアプリを選択
ダイアログを閉じたら、全ての.docファイルがこの設定で開くように
「全てを変更」ボタンを押す。(下図の[Change All...]と書いてあるボタン)