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

GNOMEで Ctrl+h を Backspace に

http://forums.ubuntulinux.jp/viewtopic.php?pid=15364 Ubuntu 8.10 Gnome 2.24.1 設定エディタで desktop -> gnome -> interface -> gtk_key_theme 初期値は[default] これを[Emacs]に変更するだけ. ・・・[Vi]とかあるんだろうか?(未確認) GoogleDeskt…

シェル(bash)でOS判定分岐

if [ `uname` = "Darwin" ]; then #mac用のコード elif [ `uname` = "Linux" ]; then #Linux用のコード fiwinはなんだろう? 後でcygwinで調べとこう.

Debian ( CUI ) で無線LAN

http://nai.homelinux.net/wireless.html 試したのはArmadillo-300(開発キット) これにdebianを入れたもの。インストールまず、設定をするのにwlan-toolsをインストール # apt-get install wlan-toolsこれでiwconfig等のコマンドが使用可に。 インターフェイ…

Latexで複数行のコメント

tex

http://www.yuec.net/blog/article.php?id=94 http://d.hatena.ne.jp/PyTest/20081012/1223791008 \if0 コメント \fi これだけ. Cの #if 0 コメント #endif みたいなものだと思われる. commentパッケージなるものを入れたら \begin{comment} コメント \end…

Linuxでディレクトリ毎のサイズを表示する

$ du -hs */ # ディレクトリだけ 404K Docments/ 12M public_html/$ du -hs * # ファイルも 404K Docments 91K packet090112.tar 12M public_html計算に時間かかるかも.

vimの小技

Vim

Visual Operatorhttp://www15.ocn.ne.jp/~tusr/vim/vim_text1.html コマンド1の後にコマンド2を打つ 例) yiw -> カーソル位置の単語をコピー コマンド1 意味 ~ 大/小文字の切替 d 削除 c 変更 y ヤンク > 右シフト 左シフト ! 外部コマンドによるフィルタ = …

Ubuntuでシリアル接続

http://kod.ath.cx/wp/index.php/archives/25 特に問題なくいけた。使うのは[GtkTerm]というソフト USB-Serial変換には[URS-03]というコネクタを使用コネクタを挿した時点で[/dev/ttyUSB0]として認識された。 あとはGtkTermを起動して[Configuration -> Port…

GCCとG++でのswitch文内のcaseラベルにおけるconst定数の扱いの違い

GCCとG++でのswitch文内のcaseラベルにおけるconst定数の扱いの違い #include <stdio.h> int main(void) { const int A = 2; int a = 2; switch(a) { case A: puts("ok"); break; } } $ gcc test.c test.c: In function ‘main’: test.c:10: error: case ラベルを整数</stdio.h>…