2011年1月23日日曜日

「Twitter Streaming APIの使い方」を見て、そのままやってみた。

おもしろそう以下のエントリ

Twitter Streaming APIの使い方 - nokunoの日記

を見て、ちょっとやってみた↓

書いてあることをそのままやったみただけだけど、実行するとtweetがだーっと流れてきて、なんだか、映画の1シーンを見ているような気持ちになってくる。
紹介元ではtwitterストストリーミングAPIとcurlを使って、デコードするpythonスクリプトを使っている。せっかくなのでデコードのとこをruby(1.9.2p0)でもやったみた。
#!/usr/bin/env ruby
require 'json'
puts JSON.load($_)['text'] while gets
簡単だなー


いろいろ遊べそうだ。

2011年1月22日土曜日

オバマ大統領のスピーチ

Obama’s Speech in Tucson

President Obama offered the nation’s condolences on Wednesday to the
victims of the Tucson shooting rampage, urging Americans to usher in a
new era of civility in memory of the fallen.

headline : calling for new era of civility in politcs
video and transcripts

http://www.nytimes.com/interactive/2011/01/13/us/politics/201100113_OBAMA_ARIZONA.html

from New York Times web site.

印象に残ったフレーズ
 “All of us – We should do everything we can to make sure this country lives upto our children’s expectations.”

大統領の頭が白くなってきたなあ。

2011年にこころがけたいこと

2011年にこころがけたいこと


2011年にこころがけたいこと、それは、 アウトプットする 、ということ。イ ンプットしたことは、アウトプットする。アウトプットすることを意識すれば、 自然にインプットの質も高まる。書いて残す力、文章力も鍛えることができる(はずである。) 漫然としたインプットはしない!!


2011年1月12日水曜日

emacs org-mode blog

emacs org-mode でblog投稿


org-rubyを使ってみる



  • ここは#BEGIN_EXAMPLE ~ #END_EXAMPLEで囲むのはだめ

  • :はOK

  • 表もだめ

  • 強調 したり、 code をかいてみたり、 下線 を引いてみたり。


2011年1月6日木曜日

emacsの矩形処理TIPS

矩形処理TIPS

  • copy-rectangle-to-register
    • C-x r r
  • to insert this register in the buffer
    • C-x r g

便利。

2010年12月31日金曜日

Use goolgecl in emacs

Use goolge command line from emacs.

;;; google command line with emacs-org-mode
;; $ git clone https://github.com/rileyrg/org-googlecl
;; (org-googlecl-blog) ; posts current org item to blogger
;; (googlecl-blog)     ; more general function
(require 'org-googlecl)
(global-set-key (kbd "C-c L") 'org-googlecl-list-blogs)
(global-set-key (kbd "C-c B") 'googlecl-prompt-blog)
(global-set-key (kbd "C-c P") 'org-googlecl-blog)

READMEを参考に上のようにした。
どうやら google command line に変換されるときに日本語タイトルだとうま
くいかない様子。ブログタイトルを日本語を含まないものにした。

2010年12月18日土曜日

emacsでカーソルの色、形を変更する

emacsでカーソルの色、形がいまいち見にくかったので設定した。そのメモ。

(list-colors-display)         ;好きな色を選ぶ。
(setq cursor-type 'box)       ;形を選ぶ
(set-cursor-color 'indianred) ;色を決める

ちなみに、
(setq cursor-type 'nil)
とすると、消える。









他にも
cursor-in-non-selected-windows
とかも設定できる。