Shammer's Philosophy

My private adversaria

2013-10-01から1ヶ月間の記事一覧

Using curl as ftp client

Curl can be a ftp client. FTP is required an authentication. The option -u provides an user account and password to log in. $ curl -u user:password ftp://192.168.1.10/If path begins // instead of / like ftp://192.168.1.10//, this syntax se…

GoogleDrive permission change

Mac

Goals I want to see html files in GoogleDrive via local apache. But GoogleDrive files default permission is 600. I want to change these files permission, but chmod -R 755 doesn't work fine. Resolution cd $GoogleDriveWebContentsDirectory fi…

How to check the HTTP header?

The command line tools, curl has a -v option. This is very useful because all HTTP request and response header displays. The response header value is depends on the web server configuration. This is just sample to Debian squeeze apache res…

How to get html required authentication by curl?

The command "curl" has a -c option and -b option. The option -c makes cookie filed into local disk. And the option -b is used the cookie file to connect web server. Then, the option -d enables to send post data. So, the following steps ena…

Try xmls make-xmlrep

I installed xmls when I installed Quicklisp at the first time. I tested this. XMLS Documents I found this site, http://www.quicklisp.org/beta/UNOFFICIAL/docs/xmls/doc/index.html. This seems to be UNOFFICIAL document. I found this site too,…

Mac Emacs SKK file sharing

Rsync command does not download even if upload directory contents are newer than source contents. Is this caused by bad option? I have no idea. But, I found more easier resolution with GoogleDrive. The step is below. Configure GoogleDrive …

LoginHook と LogoutHook

Mac

定義した LoginHook と LogoutHook を削除する方法を調べていて以下のサイトを見つけた。 Customizing Login and Logout削除するには、read や write のところを delete にすればよいとわかったが、同時に LoginHook と LogoutHook は Deprecated な仕組みだ…

Bash 終了判定

シェルスクリプトの終了ステータスは、$? に格納されるはずだが、いちいちこれを if で比較判定するの面倒だな、と思っていたら、もっと簡単に実行する方法が見つかった。 終了ステータス | UNIX & Linux コマンド・シェルスクリプト リファレンスうーん、こ…

Mac OS X での rsync コマンド

Mac

同じ rsync コマンドなのに OS によって微妙にオプションとかが異なるので・・・例によってメモ。Mac では以下のようにすればできた。 rsync -avu -e "ssh -p $SSH_PORT_NUMBER" $SOURCE_DIRECTORY $REMOTE_USER@$REMOTE_HOST:$TARGET_DIRECTORYここで指定す…

Mac OS X でのSSH公開鍵認証設定

Mac

仮想レンタルサーバーに申し込んでみた。SSHアクセスができること、root権限で利用できることを条件に探して、月額ワンコイン以下で条件を満たすものを見つけることができた。早速申し込んでみた。例によって、SSHの公開鍵認証を設定した。SSHのポートがデフ…

Apache python inline CGI

Python sample code is here. This source code file extension should be .py and located in /usr/lib/cgi-bin/ directory and attached exec permission by chmod 755 ***.py(*** means file name). import cgi print "Content-Type: text/html" # This i…