この文書の現在のバージョンと選択したバージョンの差分を表示します。
Both sides previous revision Previous revision Next revision | Previous revision | ||
misc [2009/10/31 13:30] saito |
misc [2012/05/09 19:17] (現在) saito [ipod_touch_iphone] |
||
---|---|---|---|
ライン 1: | ライン 1: | ||
メモ | メモ | ||
+ | |||
+ | |||
+ | |||
+ | <code> | ||
+ | |||
+ | |||
+ | Section "ServerLayout" | ||
+ | Identifier "X.org Configured" | ||
+ | Screen 0 "Screen0" 0 0 | ||
+ | Screen 1 "Screen1" RightOf "Screen0" | ||
+ | Screen 2 "Screen2" RightOf "Screen1" | ||
+ | Screen 3 "Screen3" RightOf "Screen2" | ||
+ | InputDevice "Mouse0" "CorePointer" | ||
+ | InputDevice "Keyboard0" "CoreKeyboard" | ||
+ | EndSection | ||
+ | |||
+ | Section "Files" | ||
+ | ModulePath "/usr/lib/xorg/modules" | ||
+ | FontPath "/usr/share/fonts/X11/misc" | ||
+ | FontPath "/usr/share/fonts/X11/cyrillic" | ||
+ | FontPath "/usr/share/fonts/X11/100dpi/:unscaled" | ||
+ | FontPath "/usr/share/fonts/X11/75dpi/:unscaled" | ||
+ | FontPath "/usr/share/fonts/X11/Type1" | ||
+ | FontPath "/usr/share/fonts/X11/100dpi" | ||
+ | FontPath "/usr/share/fonts/X11/75dpi" | ||
+ | FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" | ||
+ | FontPath "built-ins" | ||
+ | EndSection | ||
+ | |||
+ | Section "Module" | ||
+ | Load "extmod" | ||
+ | Load "dri" | ||
+ | Load "glx" | ||
+ | Load "record" | ||
+ | Load "dbe" | ||
+ | Load "dri2" | ||
+ | EndSection | ||
+ | |||
+ | Section "InputDevice" | ||
+ | Identifier "Keyboard0" | ||
+ | Driver "kbd" | ||
+ | EndSection | ||
+ | |||
+ | Section "InputDevice" | ||
+ | Identifier "Mouse0" | ||
+ | Driver "mouse" | ||
+ | Option "Protocol" "auto" | ||
+ | Option "Device" "/dev/input/mice" | ||
+ | Option "ZAxisMapping" "4 5 6 7" | ||
+ | EndSection | ||
+ | |||
+ | Section "Monitor" | ||
+ | Identifier "Monitor0" | ||
+ | VendorName "Monitor Vendor" | ||
+ | ModelName "Monitor Model" | ||
+ | EndSection | ||
+ | |||
+ | Section "Device" | ||
+ | Identifier "Card1" | ||
+ | Driver "nvidia" | ||
+ | BusID "PCI:1:0:0" | ||
+ | EndSection | ||
+ | |||
+ | Section "Screen" | ||
+ | Identifier "Screen0" | ||
+ | Device "Card0" | ||
+ | Monitor "Monitor0" | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 1 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 4 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 8 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 15 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 16 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 24 | ||
+ | EndSubSection | ||
+ | EndSection | ||
+ | |||
+ | Section "Screen" | ||
+ | Identifier "Screen1" | ||
+ | Device "Card1" | ||
+ | Monitor "Monitor1" | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 1 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 4 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 8 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 15 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 16 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 24 | ||
+ | EndSubSection | ||
+ | EndSection | ||
+ | |||
+ | Section "Screen" | ||
+ | Identifier "Screen2" | ||
+ | Device "Card2" | ||
+ | Monitor "Monitor2" | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 1 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 4 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 8 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 15 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 16 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 24 | ||
+ | EndSubSection | ||
+ | EndSection | ||
+ | |||
+ | Section "Screen" | ||
+ | Identifier "Screen3" | ||
+ | Device "Card3" | ||
+ | Monitor "Monitor3" | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 1 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 4 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 8 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 15 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 16 | ||
+ | EndSubSection | ||
+ | SubSection "Display" | ||
+ | Viewport 0 0 | ||
+ | Depth 24 | ||
+ | EndSubSection | ||
+ | EndSection | ||
+ | |||
+ | </code> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ====== ipod_touch_iphone ====== | ||
+ | ==== Googleカレンダーと同期 ==== | ||
+ | 昔はiCal経由で同期していたが、Microsoft Exchangeなるもので同期できるらしい。 | ||
+ | http://google-mania.net/archives/1137 | ||
+ | ====== texdiff ====== | ||
+ | |||
+ | きちんとしたtexdiff作りたい | ||
+ | 元ファイル | ||
+ | http://robmar.net/TexDiff/ | ||
+ | |||
+ | * 日本語は何も気にしなくてもOK. | ||
+ | |||
+ | 計画 | ||
+ | * 改行がおかしいので,ulineではなく,jumoline.styのUnderlineを使う. | ||
+ | |||
+ | 問題点 | ||
+ | * 環境まわりがおかしい? | ||
+ | * Underlineを使うと\citeで死ぬ? | ||
+ | * いろいろ | ||
+ | |||
+ | |||
+ | |||
+ | ====== OpenFOAM ====== | ||
+ | インストール | ||
+ | [[http://www.openfoam.com/download/ubuntu.php]] | ||
+ | |||
+ | インストール後,.bashrcに以下を記述. | ||
+ | <code> | ||
+ | . /opt/openfoam171/etc/bashrc | ||
+ | </code> | ||
+ | |||
+ | ただ,mpich2をインストールしていると, . /opt/openfoam171/etc/bashrc が | ||
+ | mpich2のライブラリと当たるらしく, | ||
+ | <code bash> | ||
+ | /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start': | ||
+ | (.text+0x20): undefined reference to `main' | ||
+ | collect2: ld returned 1 exit status | ||
+ | /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crt1.o: In function `_start': | ||
+ | (.text+0x20): undefined reference to `main' | ||
+ | collect2: ld returned 1 exit status | ||
+ | </code> | ||
+ | というエラーが出る. | ||
+ | 問題はないかもしれないが,ターミナルを開く度にこのエラーがでる. | ||
+ | 改善策は分からない. | ||
+ | |||
+ | ====== mpich2 ====== | ||
+ | mpiを1台のパソコンで動かす.テスト環境作成のため. | ||
+ | |||
+ | gccがあれば,特に何もしなくても動く模様.素敵. | ||
+ | |||
+ | 拾ってきたソースコード | ||
+ | <code c> | ||
+ | #include <stdio.h> | ||
+ | #include <mpi.h> | ||
+ | int main (argc, argv) | ||
+ | int argc; | ||
+ | char *argv[]; | ||
+ | { | ||
+ | int rank, size, | ||
+ | MPI_Init (&argc, &argv); /* starts MPI */ | ||
+ | MPI_Comm_rank (MPI_COMM_WORLD, &rank); /* get current process id */ | ||
+ | MPI_Comm_size (MPI_COMM_WORLD, &size); /* get number of processes */ | ||
+ | printf( "Hello world from process %d of %d\n", rank, size ); | ||
+ | MPI_Finalize(); | ||
+ | return 0; | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | コンパイル,実行. | ||
+ | <code bash> | ||
+ | mpicc test.c | ||
+ | mpirun -n 5 ./a.out | ||
+ | </code> | ||
+ | 出力結果 | ||
+ | <code> | ||
+ | Process 3 on marcie out of 5 | ||
+ | Process 4 on marcie out of 5 | ||
+ | Process 1 on marcie out of 5 | ||
+ | Process 2 on marcie out of 5 | ||
+ | Process 0 on marcie out of 5 | ||
+ | </code> | ||
+ | |||
+ | ====== Vim ====== | ||
+ | VimReferenceCard.pdf なるものが便利 | ||
+ | [[http://insenvim.sourceforge.net/]] | ||
+ | ====== Parted Magic ====== | ||
+ | * パーティションを切るためのLiveCD | ||
+ | * 死んだHDDのサルベージにも使える。 | ||
+ | |||
+ | ===== 死んだHDDのサルベージ ===== | ||
+ | * ddrescueでHDDのコピー。 | ||
+ | * 死んだHDDをそのままいじってたら、変更が加わって後戻りできなくなるかもしれない。そのため、いじるようHDDを複製する。 | ||
+ | * このときコピー先のHDDは死んだHDDより大きなサイズがよい。1.5倍程度あれば良いらしい。(ただし、同じサイズのHDDでも問題無く動作した。) | ||
+ | * /dev/sdaを/dev/sdbにコピー | ||
+ | <code bash> | ||
+ | ddrescue /dev/sda /dev/sdb | ||
+ | </code> | ||
+ | * testdiskで中身をチェック。パーティションが見えなくなってるだけであれば、パーティションを切り直す。 | ||
+ | * 詳しい使い方は[[http://lets-go.hp.infoseek.co.jp/testdisk1.html]]が分かりやすい。 | ||
+ | ====== ubuntu live cd ====== | ||
+ | |||
+ | usb-creater-gtk を使うとusbにubuntuを入れることができる。 | ||
+ | |||
+ | CDやDVDからのインストール中に何をやっても下記のようなエラーメッセージが出るときは、usbからインストールするのもの一つの手。 | ||
+ | |||
+ | <code> | ||
+ | 多くの場合、CD/DVDかドライブ、もしくはハードディスクの問題です。CD/DVDのホコリを取り除く、CD/DVDを低速で焼き直す、CD/DVD ドライブのレンズを掃除する(電気店に行けば、ドライブレンズの掃除キットが販売されています)、ハードディスクが古く置き換える必要があるかどうかを確認する、より低温の環境に移動して動作させる、などを実行するとと解決するかもしれません。 | ||
+ | </code> | ||
+ | ===== HDDの消去 ===== | ||
+ | ライブCD起動後、ターミナルで | ||
+ | <code bash> | ||
+ | sudo fdisk -l | ||
+ | </code> | ||
+ | を実行。でてきたデバイスをshredの引数として指定。 | ||
+ | <code> | ||
+ | sudo shred -v -n3 -z /dev/hoge | ||
+ | </code> | ||
+ | * デバイスが複数ある場合はスペース区切りで続けて書く。 | ||
+ | * -v:よくしゃべるモード | ||
+ | * -n?:?回ランダムな書き込みをする | ||
+ | * -z:最後に全ての領域に0を書き込む。 | ||
+ | |||
+ | |||
+ | ====== geomview ====== | ||
+ | |||
+ | geomview -start Animator -p -s 70 -f "wave*.off" -- | ||
====== plplot ====== | ====== plplot ====== | ||
ライン 9: | ライン 324: | ||
</code> | </code> | ||
====== fluxbox ====== | ====== fluxbox ====== | ||
- | |||
===== sshd ===== | ===== sshd ===== | ||
<code bash> | <code bash> | ||
ライン 23: | ライン 337: | ||
===== 英語キーボードに変更 ===== | ===== 英語キーボードに変更 ===== | ||
- | コンソールにあうらしく | + | コンソールそのものを変更するのが良いかも。 |
- | /etc/default/console-setup | + | /etc/default/console-setup を編集。 |
- | を編集。 | + | |
<code> | <code> | ||
XKBMODEL="pc105" | XKBMODEL="pc105" | ||
ライン 40: | ライン 353: | ||
でもよいとのこと。 | でもよいとのこと。 | ||
- | ====== inkscape ====== | ||
- | |||
- | ===== 注意点 ===== | ||
- | |||
- | 枠内に書く.(LaTeXで使うと枠外の部分が消える.不思議) | ||
- | 透過した色を使用しない(LaTeXでは透過しない.eps?) | ||
- | inkscape自体のファイルはsvgという拡張子で保存される. | ||
- | |||
- | ===== グリッド ===== | ||
- | グリッドの表示 | ||
- | グリッドに合わせる | ||
- | |||
- | ===== 線 ===== | ||
- | 矢印 | ||
- | |||
- | ===== ボックス ===== | ||
- | 枠の線種,色 | ||
- | フィルスタイル | ||
- | |||
- | ===== 文字 ===== | ||
- | 日本語は打てるが入力中は見えない. | ||
- | 漢字の変換候補を選ぶときだけ見える.なぜ? | ||
ライン 72: | ライン 363: | ||
* わかりやすいムービー[[http://geuz.org/gmsh/screencasts/]] | * わかりやすいムービー[[http://geuz.org/gmsh/screencasts/]] | ||
+ | * エディタを正しく設定しないとフリーズする。Tools => Option => general => outputから作成 | ||
===== 用語 ===== | ===== 用語 ===== | ||
|パラメータ|数量を変数で置き換えて表現する。| | |パラメータ|数量を変数で置き換えて表現する。| |