Jun 26, 2009
[Misc] Eclipse 3.5 Galileo Release Now Available !!
Eclipse 3.5 Galileo がリリースされた!! 関連 URL をメモ。
- Eclipse Galileo Release Now Available
- http://www.eclipse.org/org/press-release/20090624_galileo.php
- Eclipse 3.5 - New and Noteworthy
- http://download.eclipse.org/eclipse/downloads/drops/R-3.5-200906111540/eclipse-news.html
- Eclipse 3.5 Acknowledgements
- http://www.eclipse.org/eclipse/development/acknowledgements_3_5.php
- Eclipse Project Release Notes
- http://www.eclipse.org/eclipse/development/readme_eclipse_3.5.html
Jun 23, 2009
[Maven] Maven Resource Plugin のワーニング
Maven 2.1.0 にしたら、Maven Resource Plugin でリソースのフィルタリングを行う際に以下のワーニングが出る様になった。
対処方法は以下の 2 通り。[INFO] [resources:resources] [WARNING] File encoding has not been set, using platform encoding SJIS, i.e. build is platform dependent! [WARNING] Using platform encoding (SJIS actually) to copy filtered resources, i.e. build is platform dependent!
maven-resource-plugin の encoding を設定する方法
1 つ目の対処方法は maven-resource-plugin の encoding を設定するというもの。
<project>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
詳細は Maven Resource Plugin - resources:resources を参照のこと。
"project.build.sourceEncoding" プロパティを設定する方法
2 つ目の対処方法は pom.xml に "project.build.sourceEncoding" プロパティを設定するというもの。
<project>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
"project.build.sourceEncoding" は多くのプラグインで参照されているので、設定する場合は多少注意が必要。
ちなみに、 "project.build.sourceEncoding" を参照するプラグインは以下の通り(全部ではない可能性大)。
- Maven Checkstyle Plugin - checkstyle:checkstyle
- Maven Doxia Plugin - doxia:render-books
- Maven Invoker Plugin - invoker:run
- Maven Javadoc Plugin - javadoc:javadoc
- Maven Plugin Plugin - plugin:xdoc
- Maven PMD Plugin - pmd:pmd
- Maven Changes Report Plugin - changes:announcement-generate
- Maven Resource Plugin - resources:resources
- Maven Site Plugin - site:run
Jun 18, 2009
[WebService] Google Maps API version 3
Google Maps API の version 3 がいつの間にか公開されていた。 Google Maps API は少し触れた程度なので、何がどう変わっているのかは分からないが、ドキュメントによると実行速度の改善(特に、Android 端末、iPhone)がポイントらしい。 2009/06/18 現在、日本語版ドキュメントには version 3 の記述はない。
- Google Maps API Concepts
- http://code.google.com/apis/maps/documentation/
Jun 17, 2009
[WebService] シェルスクリプト + cron で実現するお気軽 Twitter bot
Twitter で何が出来るのか試行錯誤中。 大規模なアプリケーションを構築するつもりは無いので、数行〜数十行程度のシェルスクリプト + cron で実現できる bot を作って実験中。
- trend_history
- Twitter のトレンドを定期的に Tweet。
- world_clock
- 世界各地の時刻を定期的に Tweet。
- jcp_news
- JCP 関連ニュースを Tweet。
- maven_news
- Maven 関連ニュースを Tweet。
- eclipse_newz
- Eclipse 関連ニュースを Tweet。
- pgsql_news
- PostgreSQL 関連ニュースを Tweet。
- aozora_news
- 青空文庫の新着情報を定期的に Tweet
- jpy_usd
- 円・米ドルの為替相場を定期的に Tweet。
- jpy_eur
- 円・ユーロの為替相場を定期的に Tweet。
- wikipedia_rnd
- Wikipediaの記事をランダムに紹介。
元々は欲しい情報を Twitter に集約したい、という意図だったのでニュース系はやはり便利。 為替相場は試しにやってみたものの余り意味はなかった。外貨預金も FX もやっていないし。 Twitter では海外の人を follow したり、されたりが結構あるので world_clock が意外と便利。
Jun 10, 2009
[Misc] TLD "ru" からのコメントスパムが酷い
TLD "ru" からのコメントスパムが酷いので、"ru" 圏内からのアクセスを全てフィルタリングしておくことにする。 方法は以下のサイトを参照のこと。多謝。
- krfilter - deny accesses from .kr
- http://www.hakusan.tsg.ne.jp/tjkawa/lib/krfilter/index.jsp
- ― 世界の国別 IPv4 アドレス割り当てリスト ―
- http://nami.jp/ipv4bycc/
Jun 09, 2009
[AS] Apache Tomcat で gzip 圧縮を有効にする方法
Apache Tomcat で gzip 圧縮を有効にする方法をメモ。
- Apache Tomcat Configuration Reference - The HTTP Connector
- http://tomcat.apache.org/tomcat-6.0-doc/config/http.html
compression$CATALINA_HOME/conf/server.xml を以下の様に設定する。
The Connector may use HTTP/1.1 GZIP compression in an attempt to save server bandwidth. The acceptable values for the parameter is "off" (disable compression), "on" (allow compression, which causes text data to be compressed), "force" (forces compression in all cases), or a numerical integer value (which is equivalent to "on", but specifies the minimum amount of data before the output is compressed). If the content-length is not known and compression is set to "on" or more aggressive, the output will also be compressed. If not specified, this attribute is set to "off".
<Server port="8005" shutdown="SHUTDOWN">
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
useBodyEncodingForURI="true"
compression="on"/>
</Server>
Jun 08, 2009
[Misc] アンチウィルスのテスト用ダミーファイル
アンチウィルスのテストに使用できるダミーファイル。 アンチマルウェア用のものもある。
This test file has been provided to EICAR for distribution as the "EICAR Standard Anti-Virus Test File", and it satisfies all the criteria listed above. It is safe to pass around, because it is not a virus, and does not include any fragments of viral code. Most products react to it as if it were a virus (though they typically report it with an obvious name, such as "EICAR-AV-Test"). The file is a legitimate DOS program, and produces sensible results when run (it prints the message "EICAR-STANDARD-ANTIVIRUS-TEST-FILE!").
- The Anti-Virus or Anti-Malware test file
- http://www.eicar.org/anti_virus_test_file.htm
Jun 07, 2009
[Misc] Load Average の判断基準
Load Average の判断基準について調べてみた。 結論から言うと、
- Load average は CPU 数(CPU コア数) で割って 1 を超えないことを目安とする。
- Load average の最大値は CPU 数(CPU コア数) + 1 を超えないことを目安とする。
- 但し、上記 1 & 2 はケース・バイ・ケースで柔軟な判断が必要。
- System Administration Toolkit: Monitoring a slow system
- http://www.ibm.com/developerworks/aix/library/au-satslowsys.html
In a multi-CPU (or multi-core) system, divide the load average by the number of CPUs. To determine if the machine is over stressed, use the same principles as above. An alternative way of looking at the figures is to treat them as a percentage; in other words, if the figures above were from a single-CPU system, then the machine would be able to cope with the load if it was 224 percent faster. Within a multi-CPU system, you should use the number of CPUs plus one to determine the maximum load. For example, a four-CPU system would have a maximum load average of 5.
- Examining Load Average
- http://www.linuxjournal.com/article/9001
The point of perfect utilization, meaning that the CPUs are always busy and, yet, no process ever waits for one, is the average matching the number of CPUs.If there are four CPUs on a machine and the reported one-minute load average is 4.00, the machine has been utilizing its processors perfectly for the last 60 seconds.
- naoya のはてなダイアリー - マルチコア時代のロードアベレージの見方
- http://d.hatena.ne.jp/naoya/20070518/1179492085
4CPU ならロードアベレージ 4.00 まで OK、は鵜呑みにしないほうがよさそう。状況によって異なるのでその他の指標も使って細かく統計を分析したほうがよい。 * nr_running > 1 のときはロードバランスが適切に働く。そのため 4CPU なら 4.00 で割れ、というのは負荷があるときはそれなりに正しい。
livedoor Knowledge の 「複数CPUで稼動するlinuxのload averageの目安に関する信頼できるソース」 が参考になった。多謝。
Jun 06, 2009
[Misc] Capacity Planning に関するメモ
Capacity Planning に関する資料をメモ。
- Carpe Diem - The Art of Capacity Plaining
- http://www.sssg.org/blogs/naoya/archives/996
- Wikipedia - Capacity planning
- http://en.wikipedia.org/wiki/Capacity_planning
- capacity planning for LAMP
- http://www.kitchensoap.com/talks/MySQLConf2007-Capacity.pdf
- Capacity Planning for Web Operations - Web20 Expo 2008
- http://www.slideshare.net/jallspaw/capacity-planning-for-web-operations-web20-expo-2008
- Performance Management with Free and Bundled Tools
- http://www.slideshare.net/adrianco/capacity-planning-with-free-tools
- Tomcat Capacity Planning
- http://www.devshed.com/c/a/BrainDump/Tomcat-Capacity-Planning/
- Tomcat Tuning
- http://oreilly.com/catalog/9780596101060/chapter/ch04.pdf
今度この書籍を買っておかないと。
翻訳版は出ていないのかな??
![]()
The Art of Capacity Planning (ペーパーバック)
Jun 05, 2009
[Misc] Google の検索結果画面に Wolfram Alpha 検索フォームを追加する GreaseMonkey スクリプト
Wolfram Alpha が OpenSearch に対応していないので、Google の検索画面に検索フォームを追加する Grease Monkey スクリプトをでっち上げてみた。これで Wolfram Alpha が少し楽に使える様になった。早く OpenSearch に対応してくれないものか。
[Misc] Google Chrome for Mac リリース!!
ようやく Google Chrome for Mac がリリースされた。
正式リリースではなく Developer Release なので制約やバグ有り状態だけれども。
・・・ Tiger では動かない orz
自宅の Leopard 環境でないと試せないか。無念。
帰宅後の楽しみに取っておこう。
- Google Chrome for Mac Developer Release
- http://www.google.com/chrome/intl/en/eula_dev.html?dl=mac
Jun 03, 2009
[Misc] コードサイニング証明書に関するメモ
Java で利用可能なコードサイニング証明書を入手できる業者をメモ。
商用利用の場合(有償)
| 業者 | 製品 | 価格 |
| VeriSign | Object Signing対応Digital ID | ¥ 94,500(1年間有効) |
| グローバルサイン(旧日本ジオトラスト株式会社) | Object signing 対応コードサイニング証明書 Java 対応バージョン | ¥ 59,850(1年間有効) ¥ 113,400(2年間有効) ¥ 163,800(3年間有効) |
| ChosenSecurity | Sun Java Signing Degital ID | $ 399.00(1年間有効) |
| thawte | JavaSoft Developer Certificate | $ 299.00(1年間有効) $ 549.00(2年間有効) |
| ソートジャパン株式会社 | コードサイニング証明書 JavaSoft デベロッパーサート | ¥ 94,500(1年間有効) |
個人利用の場合(無償)
個人利用の場合、無償でコードサイニング証明書を入手することができるらしい。 提供してくれるのは 上記でも触れた thawte。
- thawte - Personal E-mail Certificates
- http://www.thawte.com/secure-email/personal-email-certificates/index.html
- Convert the Java JKS key - store to Microsoft PFX format
- http://www.crionics.com/products/opensource/faq/signFree.htm
Jun 02, 2009
[Mustang] Java 配備ツールキットに関するメモ
JavaSE 6u10 で Java 配備ツールキット という機能が追加された。 Java 配備ツールキットを利用することで、クライアントにインストールされている JavaSE 環境の取得や、クライアントへの JavaSE 環境のインストールなどを行うことができる。 この機能は JavaScript ファイル(deployJava.js) で提供されている。 Applet や Java Web Start によるスマートクライアントなどを実装するときに是非活用したい機能だ。 関連情報をメモしておく。
- Java 配備ツールキット
- http://java.sun.com/javase/ja/6/ea/6u10/deploymentToolkit.html
- Java Web App Deployment Advice for JavaSE 6u10
- http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html
Jun 01, 2009
[Misc] Clickjacking に関するメモ
Clickjacking に関してメモ。 完全ではないにせよ、Web アプリケーションでは下記の Framekiller に対応しておきたい。
- Clickjacking
- http://en.wikipedia.org/wiki/Clickjacking
- Framekiller
- http://en.wikipedia.org/wiki/Framekiller
(2009/12/21 追記) Twitter の Clickjacking 対策が変更された模様。コンテンツの非表示ではなく親フレームの URL 差し替えになっている。Twitter に飛ばされてしまうのでサンプルは削除。



