harry’s memorandum

おれおれメモ

Amazon kindle Fire 買ったよ

f:id:dharry:20160124232947j:plain

Kindle Fire タブレット 買った。
4980円というは衝撃だ。
動きもなかなか良い。
4980円にしては素晴らしいと思う。

でも、Nexus 7 2013 持っている私には必要なかったな。
解像度がマイナスだ。ああ、解像度はやっぱ重要だね。


Fire タブレット 8GB、ブラック

Fire タブレット 8GB、ブラック

InnoSetup5.5.6リリース

ほぼ1年振りの更新です。

SetupMutexが良いですね。
Win32使うか、InnoScriptのCreateMutex()するか、setup.exeの排他制御できませんでしたが、これで楽になります。

5.5.6 (2015-07-16)

Added the Windows 10 "compatibility" section to the various manifest resources used by Inno Setup. This enables any check for the operating system version to get the real version number (10.0) instead of getting the same version number as it did in Windows 8.1 (6.3).
Added new [Setup] section directive: SignToolRetryCount, which defaults to 2. Specifies the number of times the Setup Compiler should automatically retry digital signing on any errors.
Added new [Setup] section directive: SetupMutex. Can be used to prevent Setup from running while Setup is already running.
Fix: Console-mode compiler (ISCC) change: Renamed /DO and /EO command line parameters to /O- and /O+ to avoid possible conflicts with /D.
Pascal Scripting change: Unicode Inno Setup: Added new functions VarIsClear and UnpinShellLink.
Inno Setup Preprocessor (ISPP) change: Added new function ForceDirectories.
Unicode [Code] based on RemObjects Pascal Script Git commit db0d6f521113a31b34a76aeefd79fb148a9c4bfd.
Various documentation improvements. Contributed by jogo- via GitHub.
Minor tweaks.

http://www.jrsoftware.org/files/is5-whatsnew.htm

XenServerのVMでコンソール画面を高解像度にするぜ!

XenServerのVMのビデオメモリは4MBで頑張ってもSXGA(1280x1024)までが限界でした。コンソールセッションで接続すると、解像度がショボくて悲しくなります。
でも、xenserver.orgのblogでVMのvRAMを変更することで、WQXGA (Wide-Quad-XGA)まで解像度を変更することができます。まじに嬉しい!


VGA over Cirrus in XenServer 6.2 - Virtualization Blog

デフォルトの解像度

デフォルトではこんな感じ。SXGA (Super-XGA)が限度。VNCで接続しても小さくて寂しいものです。
f:id:dharry:20141112042723p:plain

変更後の解像度

XenServerにsshでログインして、xeコマンドでvRAMを変更してVMをリブート。素晴らしい。

$ xe vm-list name-label=base_windows7_x64
uuid ( RO)           : 89091cf1-7790-c6c4-a80b-49370d01d77b
     name-label ( RW): base_windows7_x64
    power-state ( RO): running


$ xe vm-param-set uuid=89091cf1-7790-c6c4-a80b-49370d01d77b platform:vga=std
$ xe vm-param-set uuid=89091cf1-7790-c6c4-a80b-49370d01d77b platform:videoram=16

f:id:dharry:20141112042730p:plain

シェルスクリプトで三項演算子ぽいやつ

むむ、/etc/init.d/functionsを見ていたら。
三項演算子っぽいことシェルスクリプトでもできるのね。
この歳になって気づくとは情けねー。


でも、変数に代入する際にはどっちが使い勝手よいのか微妙。

status=1
[ true ] && ret=0

[ true ] && ret=0 || ret=1


デバッグ変数用意しておいて、というのは便利かも。

_infomsg() {
  [ x${__debug} = "x" ] && return 0
  echo "info: $1"
};

_errmsg() {
  echo "error: $1"
};

false && _infomsg  "1:おれ問題なし" || _errmsg "1:おれエラー"
true  && _infomsg  "1:おれ問題なし" || _errmsg "1:おれエラー"

__debug=1
true  && _infomsg  "2:おれ問題なし" || _errmsg "2:おれエラー"
false && _infomsg  "2:おれ問題なし" || _errmsg "2:おれエラー"


とりあえず便利だね。