追記

屑俺日記

の備忘録(主にPC-UN*Xにネットワーク)みたいなものです。
RSSあります。
※ トラックバックは現在休止中です。

過去の日記

2010-09-02(Thu) 残暑としか

dd skip

既出かはどうでもいい。

$ echo 'いろはにほへと' | dd skip=1 bs=3
ろはにほへと

euc-jp ならbs=2だろうか


2010-08-28(Sat) 晴れて暑いが、夏も終わりみたい

久々のSWF

swftools SWFTools 、まだ開発は続いているようだった。
ちょっと思いついて頂戴する。 make install に問題とくになし。

$ find /usr/local/bin -mtime -1
/usr/local/bin
/usr/local/bin/wav2swf
/usr/local/bin/png2swf
/usr/local/bin/swfcombine
/usr/local/bin/swfstrings
/usr/local/bin/swfextract
/usr/local/bin/swfdump
/usr/local/bin/swfc
/usr/local/bin/jpeg2swf
/usr/local/bin/gif2swf
/usr/local/bin/swfbbox
/usr/local/bin/font2swf
/usr/local/bin/swfrender
/usr/local/bin/as3compile
/usr/local/bin/pdf2swf

gimpで適当に 256x192の絵と、 その2倍のサイズの同じ絵を書く。
後者の絵を ImageMagick の convert(1)に -crop 256x192 オプションを つけて4枚に分割する。
そして最初の絵と一緒に png2swf で一つの swf にする。
絵のすべて


2010-08-17(Tue) 多分今は晴れ

絵文字

picture

Plamo 上の lxterminal に python3でもって 絵文字の一部を表示させてみた。

今日中にまだ書くかは

不明。


2010-08-16(Mon) 天気さらに上々

昨日の書き直し

ASCII ART を格納している変数と、その配列を別ファイル (dig.py)に切り離す。
それから、エラー処理も見本通りに明確化する。

#!/usr/bin/env python3
 
import sys
import dig
 
try:
    opt = sys.argv[1]
    int(opt)
    for col in range(7):
        for row in opt:
            num = dig.Digits[int(row)]
            print(num[col],end = '')
        print('')
except ValueError:
    print("Wrong options")
except IndexError:
    print("No options")

2010-08-15(Sun) 天気は、まぁ上々

VirtualBox-3.2.8-64453

Plamo-4.6 に入れてみる。VirtualBox-3.2.8-64453-Linux_x86.run に実行属性をつけて sudo で実行。

$ head VirtualBox-3.2.8-64453-Linux_x86.run 
#!/bin/sh
# This script was generated using Makeself 2.1.5
 
CRCsum="3149859355"
MD5="9b8afa3fc610ea4c16a2e3dccfe28beb"
TMPROOT=${TMPDIR:=/tmp}
 
label="VirtualBox for Linux installation"
script="./install.sh"
scriptargs="$0 1> /dev/null"
 
$  wc -l  VirtualBox-3.2.8-64453-Linux_x86.run 
223085 VirtualBox-3.2.8-64453-Linux_x86.run
$ sudo ./VirtualBox-3.2.8-64453-Linux_x86.run 
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.........
VirtualBox Version 3.2.8 r64453 (2010-08-05T11:57:18Z) installer
Installing VirtualBox to /opt/VirtualBox

linux カーネルモジュールをビルドしている様子も見えた。

$ pstree
init-+-5*[agetty]
     |- (ry
     |-kterm---bash---VirtualBox-3.2.---install.sh--\
   -build_in_tmp---make---make---make---sh--\
   -gcc---cc1
     |-syslogd
     `-udevd

試しに立ち上げた Slax-ja-6.0.7 + KDE は重すぎて、スクリーンショットを撮る気にもなれなかった。

今更のASCII ART

赤いPython3の本の例題を、try と while から if と for で書き直してみた。
ついでに(順序は逆だけど)ASCII ARTも少し変えた。

import sys 
 
Zero = [   
"   000   ", 
" 0     0 ",   
" 0     0 ", 
" 0     0 ",   
" 0     0 ",
" 0     0 ",
"   000   " 
]
One = [
"    1    ",
"    1    ",   
"    1    ", 
"    1    ",
"    1    ",
"    1    ",
"    1    " 
]
 
# Two から Nine 略
 
Digits = [Zero, One, Two, Three, Four, Five, Six, 
     Seven, Eight, Nine]
digits = sys.argv[1]
 
if digits.isdigit():
   for row in range(7):
      for col in digits:
         num = Digits[int(col)]
         print(num[row], end="")
      print("")
else:
   print("Not integer or $1 is none")
$ python3 digit.py 0268
   000     22222     66666    88888  
 0     0       2     6        8   8  
 0     0       2     6        8   8  
 0     0   22222     66666    88888  
 0     0   2         6   6    8   8  
 0     0   2         6   6    8   8  
   000     22222     66666    88888 

短くはなったが、ややこしくもなった。


2010-08-09(Mon) 良く晴れて、風がちょっと涼しい朝

今頃まで書いてなかったかもな pstree

$ pstree
init-+-acpid
     |-apache2---5*[apache2]
     |-cron
     |-dhcpd3
     |-fetchmail
     |-7*[getty]
     |-inetd
     |-klogd
     |-master-+-pickup
     |        `-qmgr
     |-named---3*[{named}]
     |-ntpd
     |-portmap
     |-rpc.statd
     |-sshd-+-sshd---sshd---bash---pstree
     |      `-sshd---sshd---bash---ssh
     |-syslogd
     `-udevd

-a, -h, -p あたりが役に立ちそうだ


2010-07-24(Sat) よく晴れていた

inkscape-0.47

inkscape-0.47

ちょっと案内図を作成するつもりになって、入ってなかったinkscape をビルド。

Plamo-4.いくつだったっけ、に入れるには boost_1_43_0 を足す必要があった。
bootstrap.sh に ./bjam (ひとしきりかかった)、そして ./bjam --build-dir などをやった。
ln /usr/lib/boost-1_38/boost /usr/lib などともやっておいた。

inkscape 自体は時間がかかった以外、さしたるトラブルもなし。

忘れていた

 


昨年以前の日記にはコメントが付けられません。ご了承願います。
ググッて来たものの、有用な情報の見つからなかった方は、↑からサーチすれば ちょっとは見つかるものがあるかもしれません:-)

(C) 2004-2010 Sato Makoto
※リンク、引用はご自由にどうぞ。でもURLや内容が変った場合はあしからず。

サイトの天辺(index.html)はここから。

Powered by Plamo Linux!