<<option chkGenerateAnRssFeed>> 产生 RssFeed
<<option chkOpenInNewWindow>> 链接开启于新视窗
<<option chkSaveEmptyTemplate>> 保存范本
<<option chkToggleLinks>> 点击文章使已开启者关闭
<<option chkHttpReadOnly>> 隐藏编辑功能 ({{{http:}}})
<<option chkForceMinorUpdate>> 修改文章不变更日期时间
^^(确认修改同时按 Shift 键,或只按 Ctrl-Shift-Enter)^^
<<option chkConfirmDelete>> 删除文章前确认
编辑模式中显示列数: <<option txtMaxEditRows>>
存放备份文件的资料夹: <<option txtBackupFolder>>
<<option chkInsertTabs>> 使用 tab 键插入定位字符,而非跳至下一个栏位
档案系统编码:<<option txtFileSystemCharSet>>
<<<
^^使用Gecko based的浏览器(如:Firefox)时,
指定正确系统环境编码(BIG5、GBK、SHIFT-JIS、EUC-KR....等),
可支援储存文件于非 ASCII 路径及文件名。^^
<<<
Background: #fff
Foreground: #000
PrimaryPale: #8cf
PrimaryLight: #18f
PrimaryMid: #04b
PrimaryDark: #014
SecondaryPale: #ffc
SecondaryLight: #fe8
SecondaryMid: #db4
SecondaryDark: #841
TertiaryPale: #eee
TertiaryLight: #ccc
TertiaryMid: #999
TertiaryDark: #666
Error: #f88
DateFormat: [[YYYY年0MM月0DD日 am hh12:0mm]]
shortDateFormat: [[YYYY年0MM月0DD日]]
<!--{{{-->
<div class='toolbar' macro='toolbar +saveTiddler -cancelTiddler deleteTiddler'></div>
<div class='title' macro='view title'></div>
<div class='editor' macro='edit title'></div>
<div macro='annotations'></div>
<div class='editor' macro='edit text'></div>
<div class='editor' macro='edit tags'></div><div class='editorFooter'><span macro='message views.editor.tagPrompt'></span><span macro='tagChooser'></span></div>
<!--}}}-->
使用此 TiddlyWiki 的空白范本之前,请先修改以下默认文章:
* SiteTitle 及 SiteSubtitle:网站的标题和副标题,显示于页面上方<br />(在保存变更后,将显示于浏览器视窗的标题列)。
* MainMenu:主菜单(通常在页面左测)。
* DefaultTiddlers:包含一些文章的标题,可于进入TiddlyWiki 后开启。
请输入您的大名,作为所创建/ 编辑文章的署名:<<option txtUserName>>
这些设置将缓存于浏览器
请签名<<option txtUserName>>
(范例:WikiWord)

<<option chkSaveBackups>> 保存备份
<<option chkAutoSave>> 自动保存
<<option chkRegExpSearch>> 正规式搜寻
<<option chkCaseSensitiveSearch>> 区分大小写搜寻
<<option chkAnimate>> 使用动画显示
----
[[进阶选项|AdvancedOptions]]
<!--{{{-->
<div class='header' macro='gradient vert [[ColorPalette::PrimaryLight]] [[ColorPalette::PrimaryMid]]'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>&nbsp;
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu' refresh='content' tiddler='MainMenu'></div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='storyDisplay'></div>
</div>
<!--}}}-->
[[StyleSheetLocale]]
/*{{{*/
body {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}

a {color:[[ColorPalette::PrimaryMid]];}
a:hover {background-color:[[ColorPalette::PrimaryMid]]; color:[[ColorPalette::Background]];}
a img {border:0;}

h1,h2,h3,h4,h5,h6 {color:[[ColorPalette::SecondaryDark]]; background:transparent;}
h1 {border-bottom:2px solid [[ColorPalette::TertiaryLight]];}
h2,h3 {border-bottom:1px solid [[ColorPalette::TertiaryLight]];}

.button {color:[[ColorPalette::PrimaryDark]]; border:1px solid [[ColorPalette::Background]];}
.button:hover {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::SecondaryLight]]; border-color:[[ColorPalette::SecondaryMid]];}
.button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::SecondaryDark]];}

.header {background:[[ColorPalette::PrimaryMid]];}
.headerShadow {color:[[ColorPalette::Foreground]];}
.headerShadow a {font-weight:normal; color:[[ColorPalette::Foreground]];}
.headerForeground {color:[[ColorPalette::Background]];}
.headerForeground a {font-weight:normal; color:[[ColorPalette::PrimaryPale]];}

.tabSelected{color:[[ColorPalette::PrimaryDark]];
	background:[[ColorPalette::TertiaryPale]];
	border-left:1px solid [[ColorPalette::TertiaryLight]];
	border-top:1px solid [[ColorPalette::TertiaryLight]];
	border-right:1px solid [[ColorPalette::TertiaryLight]];
}
.tabUnselected {color:[[ColorPalette::Background]]; background:[[ColorPalette::TertiaryMid]];}
.tabContents {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::TertiaryLight]];}
.tabContents .button {border:0;}

#sidebar {}
#sidebarOptions input {border:1px solid [[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel {background:[[ColorPalette::PrimaryPale]];}
#sidebarOptions .sliderPanel a {border:none;color:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
#sidebarOptions .sliderPanel a:active {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::Background]];}

.wizard {background:[[ColorPalette::PrimaryPale]]; border:1px solid [[ColorPalette::PrimaryMid]];}
.wizard h1 {color:[[ColorPalette::PrimaryDark]]; border:none;}
.wizard h2 {color:[[ColorPalette::Foreground]]; border:none;}
.wizardStep {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];
	border:1px solid [[ColorPalette::PrimaryMid]];}
.wizardStep.wizardStepDone {background::[[ColorPalette::TertiaryLight]];}
.wizardFooter {background:[[ColorPalette::PrimaryPale]];}
.wizardFooter .status {background:[[ColorPalette::PrimaryDark]]; color:[[ColorPalette::Background]];}
.wizard .button {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryLight]]; border: 1px solid;
	border-color:[[ColorPalette::SecondaryPale]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryDark]] [[ColorPalette::SecondaryPale]];}
.wizard .button:hover {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.wizard .button:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]]; border: 1px solid;
	border-color:[[ColorPalette::PrimaryDark]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryPale]] [[ColorPalette::PrimaryDark]];}

#messageArea {border:1px solid [[ColorPalette::SecondaryMid]]; background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]];}
#messageArea .button {color:[[ColorPalette::PrimaryMid]]; background:[[ColorPalette::SecondaryPale]]; border:none;}

.tiddlerPopupButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::PrimaryPale]]; border: 1px solid [[ColorPalette::PrimaryLight]];}
.tiddlerPopupButton:hover {color:[[ColorPalette::Background]]; background:[[ColorPalette::PrimaryMid]];}
.tiddlerPopupButton:active {color:[[ColorPalette::Background]]; background:[[ColorPalette::Foreground]];}
.tiddlerPopupButton.highlight {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Background]];}
.popupTiddler {background:[[ColorPalette::TertiaryPale]]; border:2px solid [[ColorPalette::TertiaryMid]];}

.popup {background:[[ColorPalette::TertiaryPale]]; color:[[ColorPalette::TertiaryDark]]; border-left:1px solid [[ColorPalette::TertiaryMid]]; border-top:1px solid [[ColorPalette::TertiaryMid]]; border-right:2px solid [[ColorPalette::TertiaryDark]]; border-bottom:2px solid [[ColorPalette::TertiaryDark]];}
.popup hr {color:[[ColorPalette::PrimaryDark]]; background:[[ColorPalette::PrimaryDark]]; border-bottom:1px;}
.popup li.disabled {color:[[ColorPalette::TertiaryMid]];}
.popup li a, .popup li a:visited {color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border: none;}
.popup li a:active {background:[[ColorPalette::SecondaryPale]]; color:[[ColorPalette::Foreground]]; border: none;}
.popupHighlight {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
.listBreak div {border-bottom:1px solid [[ColorPalette::TertiaryDark]];}

.tiddler .defaultCommand {font-weight:bold;}

.shadow .title {color:[[ColorPalette::TertiaryDark]];}

.title {color:[[ColorPalette::SecondaryDark]];}
.subtitle {color:[[ColorPalette::TertiaryDark]];}

.toolbar {color:[[ColorPalette::PrimaryMid]];}
.toolbar a {color:[[ColorPalette::TertiaryLight]];}
.selected .toolbar a {color:[[ColorPalette::TertiaryMid]];}
.selected .toolbar a:hover {color:[[ColorPalette::Foreground]];}

.viewDetails {border-left:2px solid [[ColorPalette::TertiaryPale]];}
.viewDetails table {border:none;}
.viewDetails th, .viewDetails thead td {background:[[ColorPalette::TertiaryLight]]; color:[[ColorPalette::Background]]; border:1px solid [[ColorPalette::Background]];}
.viewDetails td, .viewDetails tr {background-color:[[ColorPalette::TertiaryPale]]; border:1px solid [[ColorPalette::Background]];}

.tagging, .tagged {border:1px solid [[ColorPalette::TertiaryPale]]; background-color:[[ColorPalette::TertiaryPale]];}
.selected .tagging, .selected .tagged {background-color:[[ColorPalette::TertiaryLight]]; border:1px solid [[ColorPalette::TertiaryMid]];}
.tagging .listTitle, .tagged .listTitle {color:[[ColorPalette::PrimaryDark]];}
.tagging .button, .tagged .button {border:none;}

.footer {color:[[ColorPalette::TertiaryLight]];}
.selected .footer {color:[[ColorPalette::TertiaryMid]];}

.sparkline {background:[[ColorPalette::PrimaryPale]]; border:0;}
.sparktick {background:[[ColorPalette::PrimaryDark]];}

.error, .errorButton {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::Error]];}
.warning {color:[[ColorPalette::Foreground]]; background:[[ColorPalette::SecondaryPale]];}
.lowlight {background:[[ColorPalette::TertiaryLight]];}

.zoomer {background:none; color:[[ColorPalette::TertiaryMid]]; border:3px solid [[ColorPalette::TertiaryMid]];}

.imageLink, #displayArea .imageLink {background:transparent;}

.annotation {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; border:2px solid [[ColorPalette::SecondaryMid]];}

.viewer .listTitle {list-style-type:none; margin-left:-2em;}
.viewer .button {border:1px solid [[ColorPalette::SecondaryMid]];}
.viewer blockquote {border-left:3px solid [[ColorPalette::TertiaryDark]];}

table {border:2px solid [[ColorPalette::TertiaryDark]];}
th, thead td {background:[[ColorPalette::SecondaryMid]]; border:1px solid [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::Background]];}
td, tr {border:1px solid [[ColorPalette::TertiaryDark]];}

.viewer pre {border:1px solid [[ColorPalette::SecondaryLight]]; background:[[ColorPalette::SecondaryPale]];}
.viewer code {color:[[ColorPalette::SecondaryDark]];}
.viewer hr {border:0; border-top:dashed 1px [[ColorPalette::TertiaryDark]]; color:[[ColorPalette::TertiaryDark]];}

.highlight, .marked {background:[[ColorPalette::SecondaryLight]];}

.editor input {border:1px solid [[ColorPalette::PrimaryMid]];}
.editor textarea {border:1px solid [[ColorPalette::PrimaryMid]]; width:100%;}
.editorFooter {color:[[ColorPalette::TertiaryMid]];}

#backstageArea {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::TertiaryMid]];}
#backstageArea a {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstageArea a:hover {background:[[ColorPalette::SecondaryLight]]; color:[[ColorPalette::Foreground]]; }
#backstageArea a.backstageSelTab {background:[[ColorPalette::Background]]; color:[[ColorPalette::Foreground]];}
#backstageButton a {background:none; color:[[ColorPalette::Background]]; border:none;}
#backstageButton a:hover {background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]]; border:none;}
#backstagePanel {background:[[ColorPalette::Background]]; border-color: [[ColorPalette::Background]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]] [[ColorPalette::TertiaryDark]];}
.backstagePanelFooter .button {border:none; color:[[ColorPalette::Background]];}
.backstagePanelFooter .button:hover {color:[[ColorPalette::Foreground]];}
#backstageCloak {background:[[ColorPalette::Foreground]]; opacity:0.6; filter:'alpha(opacity:60)';}
.backstageDecal a {border:none; background:[[ColorPalette::TertiaryMid]]; color:[[ColorPalette::Background]];}
.backstageDecal a:hover {border:none; background:[[ColorPalette::Foreground]]; color:[[ColorPalette::Background]];}
.backstageDecal a:active {border:none; background:[[ColorPalette::TertiaryLight]]; color:[[ColorPalette::Foreground]];}
/*}}}*/
/*{{{*/
* html .tiddler {height:1%;}

body {font-size:.75em; font-family:arial,helvetica; margin:0; padding:0;}

h1,h2,h3,h4,h5,h6 {font-weight:bold; text-decoration:none;}
h1,h2,h3 {padding-bottom:1px; margin-top:1.2em;margin-bottom:0.3em;}
h4,h5,h6 {margin-top:1em;}
h1 {font-size:1.35em;}
h2 {font-size:1.25em;}
h3 {font-size:1.1em;}
h4 {font-size:1em;}
h5 {font-size:.9em;}

hr {height:1px;}

a {text-decoration:none;}

dt {font-weight:bold;}

ol {list-style-type:decimal;}
ol ol {list-style-type:lower-alpha;}
ol ol ol {list-style-type:lower-roman;}
ol ol ol ol {list-style-type:decimal;}
ol ol ol ol ol {list-style-type:lower-alpha;}
ol ol ol ol ol ol {list-style-type:lower-roman;}
ol ol ol ol ol ol ol {list-style-type:decimal;}

.txtOptionInput {width:11em;}

#contentWrapper .chkOptionInput {border:0;}

.externalLink {text-decoration:underline;}
.externalLink:after {content:" ⇢";}

.indent {margin-left:3em;}
.outdent {margin-left:3em; text-indent:-3em;}
code.escaped {white-space:nowrap;}

.tiddlyLinkExisting {font-weight:bold;}
.tiddlyLinkNonExisting {font-style:italic;}

/* the 'a' is required for IE, otherwise it renders the whole tiddler in bold */
a.tiddlyLinkNonExisting.shadow {font-weight:bold;}

#mainMenu .tiddlyLinkExisting,
	#mainMenu .tiddlyLinkNonExisting,
	#sidebarTabs .tiddlyLinkNonExisting {font-weight:normal; font-style:normal;}
#sidebarTabs .tiddlyLinkExisting {font-weight:bold; font-style:normal;}

.header {position:relative;}
.header a:hover {background:transparent;}
.headerShadow {position:relative; padding:4.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:4.5em 0em 1em 1em; left:0px; top:0px;}

.siteTitle {font-size:3em;}
.siteSubtitle {font-size:1.2em;}

#mainMenu {position:absolute; left:0; width:10em; text-align:right; line-height:1.6em; padding:1.5em 0.5em 0.5em 0.5em; font-size:1.1em;}

#sidebar {position:absolute; right:3px; width:16em; font-size:.9em;}
#sidebarOptions {padding-top:0.3em;}
#sidebarOptions a {margin:0em 0.2em; padding:0.2em 0.3em; display:block;}
#sidebarOptions input {margin:0.4em 0.5em;}
#sidebarOptions .sliderPanel {margin-left:1em; padding:0.5em; font-size:.85em;}
#sidebarOptions .sliderPanel a {font-weight:bold; display:inline; padding:0;}
#sidebarOptions .sliderPanel input {margin:0 0 .3em 0;}
#sidebarTabs .tabContents {width:15em; overflow:hidden;}

.wizard {padding:0.1em 1em 0em 2em;}
.wizard h1 {font-size:2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizard h2 {font-size:1.2em; font-weight:bold; background:none; padding:0em 0em 0em 0em; margin:0.4em 0em 0.2em 0em;}
.wizardStep {padding:1em 1em 1em 1em;}
.wizard .button {margin:0.5em 0em 0em 0em; font-size:1.2em;}
.wizardFooter {padding:0.8em 0.4em 0.8em 0em;}
.wizardFooter .status {padding:0em 0.4em 0em 0.4em; margin-left:1em;}
.wizard .button {padding:0.1em 0.2em 0.1em 0.2em;}

#messageArea {position:absolute; top:2em; right:0em; margin:0.5em; padding:0.5em; z-index:200;}
*[id='messageArea'] {position:fixed !important; z-index:200;}
.messageToolbar {display:block; text-align:right; padding:0.2em 0.2em 0.2em 0.2em;}
#messageArea a {text-decoration:underline;}

.tiddlerPopupButton {padding:0.2em 0.2em 0.2em 0.2em;}
.tiddlerPopupButton:after {content:" ↓";}
.popupTiddler {position: absolute; z-index:300; padding:1em 1em 1em 1em; margin:0;}

.popup {position:absolute; z-index:300; font-size:.9em; padding:0; list-style:none; margin:0;}
.popup .popupMessage {padding:0.4em;}
.popup hr {display:block; height:1px; width:auto; padding:0; margin:0.2em 0em;}
.popup li.disabled {padding:0.4em;}
.popup li a {display:block; padding:0.4em; font-weight:normal; cursor:pointer;}
.listBreak {font-size:1px; line-height:1px;}
.listBreak div {margin:2px 0;}

.tabset {padding:1em 0em 0em 0.5em;}
.tab {margin:0em 0em 0em 0.25em; padding:2px;}
.tabContents {padding:0.5em;}
.tabContents ul, .tabContents ol {margin:0; padding:0;}
.txtMainTab .tabContents li {list-style:none;}
.tabContents li.listLink { margin-left:.75em;}

#contentWrapper {display:block;}
#splashScreen {display:none;}

#displayArea {margin:1em 17em 0em 14em;}

.toolbar {text-align:right; font-size:.9em;}

.viewDetails {padding:0.5em 0em 0.5em 0em;}
.viewDetails {font-size:0.9em;}
.detailsMessage {margin:0.8em 1.0em;}

.tiddler {padding:1em 1em 0em 1em;}

.missing .viewer,.missing .title {font-style:italic;}

.title {font-size:1.6em; font-weight:bold;}

.missing .subtitle {display:none;}
.subtitle {font-size:1.1em;}

.tiddler .button {padding:0.2em 0.4em;}

.tagging {margin:0.5em 0.5em 0.5em 0; float:left; display:none;}
.isTag .tagging {display:block;}
.tagged {margin:0.5em; float:right;}
.tagging, .tagged {font-size:0.9em; padding:0.25em;}
.tagging ul, .tagged ul {list-style:none; margin:0.25em; padding:0;}
.tagClear {clear:both;}

.footer {font-size:.9em;}
.footer li {display:inline;}

.annotation {padding:0.5em; margin:0.5em;}

* html .viewer pre {width:99%; padding:0 0 1em 0;}
.viewer {line-height:1.4em; padding-top:0.5em;}
.viewer .button {margin:0em 0.25em; padding:0em 0.25em;}
.viewer blockquote {line-height:1.5em; padding-left:0.8em;margin-left:2.5em;}
.viewer ul, .viewer ol {margin-left:0.5em; padding-left:1.5em;}

table {border-collapse:collapse; margin:0.8em 1.0em;}
.viewer th, .viewer td, .viewer tr,.viewer caption {padding:3px;}
table.listView {font-size:0.85em; margin:0.8em 1.0em;}
table.listView th, table.listView td, table.listView tr {padding:0px 3px 0px 3px;}

.viewer pre {padding:0.5em; margin-left:0.5em; font-size:1.2em; line-height:1.4em; overflow:auto;}
.viewer code {font-size:1.2em; line-height:1.4em;}

.editor {font-size:1.1em;}
.editor input, .editor textarea {display:block; width:100%; font:inherit;}
.editorFooter {padding:0.25em 0em; font-size:.9em;}
.editorFooter .button {padding-top:0px; padding-bottom:0px;}

.fieldsetFix {border:0; padding:0; margin:1px 0px 1px 0px;}

.sparkline {line-height:1em;}
.sparktick {outline:0;}

.zoomer {font-size:1.1em; position:absolute; overflow:hidden;}
.zoomer div {padding:1em;}

* html #backstage {width:99%;}
* html #backstageArea {width:99%;}
#backstageArea {display:none; position:relative; overflow: hidden; z-index:150; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageToolbar {position:relative;}
#backstageArea a {font-weight:bold; margin-left:0.5em; padding:0.3em 0.5em 0.3em 0.5em;}
#backstageButton {display:none; position:absolute; z-index:175; top:0em; right:0em;}
#backstageButton a {padding:0.1em 0.4em 0.1em 0.4em; margin:0.1em 0.1em 0.1em 0.1em;}
#backstage {position:relative; width:100%; z-index:50;}
#backstagePanel {display:none; z-index:100; position:absolute; margin:0em 3em 0em 3em; padding:1em 1em 1em 1em;}
.backstagePanelFooter {padding-top:0.2em; float:right;}
.backstagePanelFooter a {padding:0.2em 0.4em 0.2em 0.4em;}
#backstageCloak {display:none; z-index:50; position:absolute; width:100%; height:100px;}
.backstageDecal {display:none; font-size:9pt; margin:0.4em 0.4em 0.4em 0.4em;}
.backstageDecal a {display:inline !important; padding:0.2em 0.4em 0.2em 0.4em !important;}
.backstageVisible .backstageDecal {display:block;}
/*}}}*/
/***
StyleSheet for use when a translation requires any css style changes.
This StyleSheet can be used directly by languages such as Chinese, Japanese and Korean which use a logographic writing system and need larger font sizes.
***/

/*{{{*/
body {font-size:0.8em;}
.headerShadow {position:relative; padding:3.5em 0em 1em 1em; left:-1px; top:-1px;}
.headerForeground {position:absolute; padding:3.5em 0em 1em 1em; left:0px; top:0px;}

#sidebarOptions {font-size:1.05em;}
#sidebarOptions a {font-style:normal;}
#sidebarOptions .sliderPanel {font-size:0.95em;}

.subtitle {font-size:0.8em;}

.viewer table.listView {font-size:0.95em;}

.viewDetails {padding:0.5em 0em 0.5em 0em;}
.viewDetails {font-size:1.1em;}

.htmlarea .toolbarHA table {border:1px solid ButtonFace; margin:0em 0em;}
/*}}}*/
/*{{{*/
@media print {
#mainMenu, #sidebar, #messageArea, .toolbar {display: none ! important;}
#displayArea {margin: 1em 1em 0em 1em;}
/* Fixes a feature in Firefox 1.5.0.2 where print preview displays the noscript content */
noscript {display:none;}
}
/*}}}*/
<!--{{{-->
<div class='toolbar' macro='toolbar closeTiddler closeOthers +editTiddler > syncing permalink references jump'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DateFormat::DateFormat]]'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date [[DateFormat::shortDateFormat]]'></span>) <span macro='viewDetails'></span></div>
<div class='tagging' macro='tagging'></div>
<div class='tagged' macro='tags'></div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
Ajaxterm web终端。

http://localhost:8022/
!!~/.vim/plugin/AutoExplorer.vim.html
@@color(#ffff00):au@@! @@color(#00ff00):CursorHold@@ *.[ch] nested @@color(#ffff00):call@@ PreviewWord@@color(#ffff00):()@@
@@color(#ffff00):func@@ PreviewWord@@color(#ffff00):()@@
  @@color(#ffff00):if@@ &amp;previewwindow>>     @@color(#8080ff):" 不要在预览窗口里执行@@
    @@color(#ffff00):return@@
  @@color(#ffff00):endif@@
  @@color(#ffff00):let@@ w @@color(#ffff00):=@@ @@color(#00ffff):expand@@@@color(#ffff00):(@@@@color(#ff6060):"<cword>"@@@@color(#ffff00):)@@>     @@color(#8080ff):" 在当前光标位置抓词@@
  @@color(#ffff00):if@@ @@color(#ffff00):w@@ @@color(#ffff00):=~@@ @@color(#ff6060):'\a'@@>>  @@color(#8080ff):" 如果该单词包括一个字母@@

@@color(#8080ff):    " 在显示下一个标签之前,删除所有现存的语法高亮@@
    @@color(#ffff00):silent@@! @@color(#ffff00):wincmd@@ @@color(#ffff00):P@@>>    @@color(#8080ff):" 跳转至预览窗口@@
    @@color(#ffff00):if@@ &amp;previewwindow>   @@color(#8080ff):" 如果确实转到了预览窗口……@@
      @@color(#ffff00):match@@ @@color(#00ff00):none@@>>>@@color(#8080ff):" 删除语法高亮@@
      @@color(#ffff00):wincmd@@ @@color(#ffff00):p@@>>  @@color(#8080ff):" 回到原来的窗口@@
    @@color(#ffff00):endif@@

@@color(#8080ff):    " 试着显示当前光标处匹配的标签@@
    @@color(#ffff00):try@@
       @@color(#ffff00):exe@@ @@color(#ff6060):"ptag "@@ @@color(#ffff00):.@@ w
    @@color(#ffff00):catch@@
      @@color(#ffff00):return@@
    @@color(#ffff00):endtry@@

    @@color(#ffff00):silent@@! @@color(#ffff00):wincmd@@ @@color(#ffff00):P@@>>    @@color(#8080ff):" 跳转至预览窗口@@
    @@color(#ffff00):if@@ &amp;previewwindow>   @@color(#8080ff):" 如果确实转到了预览窗口……@@
> @@color(#ffff00):if@@ @@color(#00ffff):has@@@@color(#ffff00):(@@@@color(#ff6060):"folding"@@@@color(#ffff00):)@@
>   @@color(#ffff00):silent@@! @@color(#ffff00):.@@@@color(#ffff00):foldopen@@>   @@color(#8080ff):" 展开折叠的行@@
> @@color(#ffff00):endif@@
> @@color(#ffff00):call@@ @@color(#00ffff):search@@@@color(#ffff00):(@@@@color(#ff6060):"$"@@, @@color(#ff6060):"b"@@@@color(#ffff00):)@@> @@color(#8080ff):" 到前一行的行尾@@
> @@color(#ffff00):let@@ w @@color(#ffff00):=@@ @@color(#00ffff):substitute@@@@color(#ffff00):(@@w, @@color(#ff6060):'\\'@@, @@color(#ff6060):'\\\\'@@, @@color(#ff6060):""@@@@color(#ffff00):)@@
> @@color(#ffff00):call@@ @@color(#00ffff):search@@@@color(#ffff00):(@@@@color(#ff6060):'\<\V'@@ @@color(#ffff00):.@@ w @@color(#ffff00):.@@ @@color(#ff6060):'\>'@@@@color(#ffff00):)@@>@@color(#8080ff):" 定位光标在匹配的单词上@@
@@color(#8080ff):> " 给在此位置的单词加上匹配高亮@@
      @@color(#ffff00):hi@@ previewWord @@color(#00ff00):term@@=@@color(#ff40ff):bold@@ @@color(#00ff00):ctermbg@@=green @@color(#00ff00):guibg@@=green
> @@color(#ffff00):exe@@ @@color(#ff6060):'match previewWord "\%'@@ @@color(#ffff00):.@@ line@@color(#ffff00):(@@@@color(#ff6060):"."@@@@color(#ffff00):)@@ @@color(#ffff00):.@@ @@color(#ff6060):'l\%'@@ @@color(#ffff00):.@@ col@@color(#ffff00):(@@@@color(#ff6060):"."@@@@color(#ffff00):)@@ @@color(#ffff00):.@@ @@color(#ff6060):'c\k*"'@@
      @@color(#ffff00):wincmd@@ @@color(#ffff00):p@@>>  @@color(#8080ff):" 返回原来的窗口@@
    @@color(#ffff00):endif@@
  @@color(#ffff00):endif@@
@@color(#ffff00):endfun@@
Awk用法
Created 星期六 06/01/2007
{{{
awk -F'Section' 'BEGIN{RS = ""} /.*\"Screen\"/' /etc/X11/xorg.conf
}}}
显示xorg.conf里面的Screen完整段。
Bashrc
Created 星期五 27/10/2006 09:34
{{{
#-----中英文环境变量设置----- 
alias cn='export LC_ALL=zh_CN.UTF-8'
alias en='export LC_ALL=C'

#-----中文帮助手册直接操作----- 
alias cman='man -M /usr/share/man/zh_CN'

#-----无线网卡开关----- 
alias 0u='sudo ifup eth0'
alias 0d='sudo ifdown eth0'
alias 1u='sudo ifup eth1'
alias 1d='sudo ifdown eth1'

alias p='ping www.163.com -c 5'
alias adsl='pon dsl-provider' 

#-----文件列表和查看----- 
alias ll='ls -lFh' 
alias la='ls -AF' 
alias l='ls -CF' 

alias dog='grep -v -E "(^$|^#)"'        # 显示有效内容,剔出空行和#号注释行
# 相同操作 grep -v -e ^# -e ^$ acpi-support
# grep '^[^#]' options

alias kd='find -type d -empty -exec rmdir {} \;'        # 删除空目录
alias rm_empty_dir='find -type d -empty -exec rmdir {} \;'

#-----编辑----- 
alias v='gvim'
alias sv='sudo vi'
alias se='sudo mousepad'
alias e='mousepad'
alias h='Hypersrc.pl '

#-----软件包管理命令----- 
alias ai='sudo aptitude install' 
alias ar='sudo aptitude remove' 
alias au='sudo aptitude update' 
alias ag='sudo aptitude upgrade' 
alias as='aptitude search' 
alias aw='aptitude show' 

#-----系统进程操作----- 
alias pg='pgrep -l' 
alias sk='sudo killall' 

#-----tar常用命令,后跟压缩包名,和带全路径的操作的文件名----- 
alias t.d='tar --delete -f '
alias t.x='tar xPvf '
alias t.l='tar tf '
alias t.u='tar uPvf '

#-----命令行提示符设置----- 
PS1='\t-\u\w\$●  '
}}}
欢迎
Du用法
Created 星期日 04/03/2007
{{{
$●  du -h --max-depth=1 媒体/图片
31M     媒体/图片/打印的帅帅图片
9.1M    媒体/图片/长春
1.4G    媒体/图片/帅帅的成长记录
1.4G    媒体/图片
$●  du -h --max-depth=1 媒体
17M     媒体/png
2.1G    媒体/●飞行家族
5.1M    媒体/1024x768
123M    媒体/et::sound
1.4G    媒体/图片
1.9M    媒体/老虎
16G     媒体/电影
531M    媒体/音乐
3.4M    媒体/科技产品图片
5.8M    媒体/1280x800
677K    媒体/法国。企鹅论坛图标
237K    媒体/目录图标
1.8M    媒体/●我的图片
617K    媒体/韩国熊猫狗
21G     媒体
$●  du -hs 媒体/*
5.1M    媒体/1024x768
5.8M    媒体/1280x800
208K    媒体/14203922.jpg
12K     媒体/card.jpg
356K    媒体/cnpaint_1006.jpg
420K    媒体/cnpaint_2006.jpg
348K    媒体/cnpaint_2008.jpg
288K    媒体/design13.jpg
104K    媒体/~DiMAGE Z5.jpg
8.0K    媒体/distributor-logo.png
8.0K    媒体/Eexpress.svg
123M    媒体/et::sound
184K    媒体/keer.gif
180K    媒体/l163_2.jpg
184K    媒体/mini_comics_600.png
24K     媒体/mini_comics_prev.png
276K    媒体/opera::widget.png
180K    媒体/~Pics_OOo4d1xm9PJK.jpg
17M     媒体/png
96K     媒体/screenshot-2007-02-17-22-17-54.png
28K     媒体/start-here.svg
436K    媒体/wine的印加石青蛙Zuma.png
8.8M    媒体/加菲猫-片段.mpeg4
316K    媒体/加菲猫-片段.png
100K    媒体/双头显示.png
1.4G    媒体/图片
4.0K    媒体/张国荣.m3u
1.8M    媒体/●我的图片
7.7M    媒体/新型键盘.flv
677K    媒体/法国。企鹅论坛图标
16G     媒体/电影
96K     媒体/电源管理的情况.png
292K    媒体/电源管理的情况.xcf
237K    媒体/目录图标
3.4M    媒体/科技产品图片
1.9M    媒体/老虎
1.6M    媒体/蜗牛与黄鹂鸟.mp3
617K    媒体/韩国熊猫狗
531M    媒体/音乐
2.1G    媒体/●飞行家族

$●  du -hs 媒体/电影/*
477M    媒体/电影/[1.29][BTPIG压缩组][美国德国][剧情神秘][K星异客][DVDRIP-R475M][英-中]3T
695M    媒体/电影/BTPIG压缩组@人类之子@呸咬手指.rmvb
451M    媒体/电影/BTPIG压缩组@人细鬼坏@呸咬手指.rmvb
37M     媒体/电影/KTV_南拳媽媽_What Can I Do.mpg
322M    媒体/电影/别惹蚂蚁.rmvb
3.1G    媒体/电影/●动画
1.3G    媒体/电影/●名侦探柯南
592M    媒体/电影/夺命感应@猪猪乐园@三井
556M    媒体/电影/好莱坞庄园@猪猪乐园@劳拉的星☆~.rmvb
702M    媒体/电影/宝贝计划.avi
459M    媒体/电影/影视帝国(bbs.cnxp.com).博物馆之夜(清晰TC-听译中文-音效差).Night.at.the.Museum.2006.R5.rmvb
460M    媒体/电影/怪物@猪猪乐园@笑面狼
3.4G    媒体/电影/●看完
390M    媒体/电影/[科学睡眠].~DVD-RMVB.中文字幕.[美国06最新R级奇幻喜剧大片].rm
517M    媒体/电影/血门徒.rmvb
1.4G    媒体/电影/谁和她睡觉了
234M    媒体/电影/[越狱.第二季].Prison.Break.Season2.EP18.HR_S-Files.rmvb
556M    媒体/电影/足球尤物@猪猪乐园@星期一天气晴
}}}
Find用法
Created 星期五 15/12/2006 14:32

最简单的写法: 
{{{
find -name '*.jpg' 
}}}
查找目录下没扩展名的文件。不包含'.'的。 
{{{
find . -type f ! -iname '*.*' 
}}}
列出所有长度为零的文件 
{{{
find . -empty -exec ls {} \; 
}}}
找出空目录,删除~~~~~~~~~ 
{{{
find -type d -empty -exec rmdir {} \; 
}}}

{{{
grep '^[^#]' xxxxxxx 
}}}
显示没有注释掉的有效行。 
grep -v也是取反的意思。 
去掉注释行和空行: 
{{{
grep -v -e ^# -e ^$ xxxxxxx
grep -v -E "(^$|^#)" xxxxxxx
}}}
搜索字符串,最简单的写法:-n是显示行号。 
{{{
grep -n RTC *.c *.h 
}}}
grep -r的写法不出来???????????????要不就可以不要gnome-search-tool了。 
{{{
grep -r include --include=*.c --include=*.h * 
}}}
麻烦哦。要这样带2级参数限制文件后缀 
{{{
find . -name '.DirIcon' -or -name 'djgame*' 
}}}
-or -o ,,都是或关系。 
-and -a 空缺,3种都是与关系,似乎没什么用。 

{{{
find $PWD -name ".DirIcon" -exec tar -cPvf 目录图标.tar.gz {} + 
}}}
搜索文件并打包。laborer说的方法。需要+的用法说明哦。
{{{
find . -exec grep -H 'Cash in W' {} \;
}}}
找当前目录下所有文件,搜索字符串。-H是同时显示匹配的文件名。
/***
|''Name:''|ForEachTiddlerPlugin|
|''Version:''|1.0.7 (2007-03-28)|
|''Source:''|http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin|
|''Author:''|UdoBorkowski (ub [at] abego-software [dot] de)|
|''Licence:''|[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]|
|''Copyright:''|&copy; 2005-2007 [[abego Software|http://www.abego-software.de]]|
|''TiddlyWiki:''|1.2.38+, 2.0|
|''Browser:''|Firefox 1.0.4+; Firefox 1.5; InternetExplorer 6.0|
!Description

Create customizable lists, tables etc. for your selections of tiddlers. Specify the tiddlers to include and their order through a powerful language.

''Syntax:'' 
|>|{{{<<}}}''forEachTiddler'' [''in'' //tiddlyWikiPath//] [''where'' //whereCondition//] [''sortBy'' //sortExpression// [''ascending'' //or// ''descending'']] [''script'' //scriptText//] [//action// [//actionParameters//]]{{{>>}}}|
|//tiddlyWikiPath//|The filepath to the TiddlyWiki the macro should work on. When missing the current TiddlyWiki is used.|
|//whereCondition//|(quoted) JavaScript boolean expression. May refer to the build-in variables {{{tiddler}}} and  {{{context}}}.|
|//sortExpression//|(quoted) JavaScript expression returning "comparable" objects (using '{{{<}}}','{{{>}}}','{{{==}}}'. May refer to the build-in variables {{{tiddler}}} and  {{{context}}}.|
|//scriptText//|(quoted) JavaScript text. Typically defines JavaScript functions that are called by the various JavaScript expressions (whereClause, sortClause, action arguments,...)|
|//action//|The action that should be performed on every selected tiddler, in the given order. By default the actions [[addToList|AddToListAction]] and [[write|WriteAction]] are supported. When no action is specified [[addToList|AddToListAction]]  is used.|
|//actionParameters//|(action specific) parameters the action may refer while processing the tiddlers (see action descriptions for details). <<tiddler [[JavaScript in actionParameters]]>>|
|>|~~Syntax formatting: Keywords in ''bold'', optional parts in [...]. 'or' means that exactly one of the two alternatives must exist.~~|

See details see [[ForEachTiddlerMacro]] and [[ForEachTiddlerExamples]].

!Revision history
* v1.0.7 (2007-03-28)
** Also support "pre" formatted TiddlyWikis (introduced with TW 2.2) (when using "in" clause to work on external tiddlers)
* v1.0.6 (2006-09-16)
** Context provides "viewerTiddler", i.e. the tiddler used to view the macro. Most times this is equal to the "inTiddler", but when using the "tiddler" macro both may be different.
** Support "begin", "end" and "none" expressions in "write" action
* v1.0.5 (2006-02-05)
** Pass tiddler containing the macro with wikify, context object also holds reference to tiddler containing the macro ("inTiddler"). Thanks to SimonBaird.
** Support Firefox 1.5.0.1
** Internal
*** Make "JSLint" conform
*** "Only install once"
* v1.0.4 (2006-01-06)
** Support TiddlyWiki 2.0
* v1.0.3 (2005-12-22)
** Features: 
*** Write output to a file supports multi-byte environments (Thanks to Bram Chen) 
*** Provide API to access the forEachTiddler functionality directly through JavaScript (see getTiddlers and performMacro)
** Enhancements:
*** Improved error messages on InternetExplorer.
* v1.0.2 (2005-12-10)
** Features: 
*** context object also holds reference to store (TiddlyWiki)
** Fixed Bugs: 
*** ForEachTiddler 1.0.1 has broken support on win32 Opera 8.51 (Thanks to BrunoSabin for reporting)
* v1.0.1 (2005-12-08)
** Features: 
*** Access tiddlers stored in separated TiddlyWikis through the "in" option. I.e. you are no longer limited to only work on the "current TiddlyWiki".
*** Write output to an external file using the "toFile" option of the "write" action. With this option you may write your customized tiddler exports.
*** Use the "script" section to define "helper" JavaScript functions etc. to be used in the various JavaScript expressions (whereClause, sortClause, action arguments,...).
*** Access and store context information for the current forEachTiddler invocation (through the build-in "context" object) .
*** Improved script evaluation (for where/sort clause and write scripts).
* v1.0.0 (2005-11-20)
** initial version

!Code
***/
//{{{

	
//============================================================================
//============================================================================
//		   ForEachTiddlerPlugin
//============================================================================
//============================================================================

// Only install once
if (!version.extensions.ForEachTiddlerPlugin) {

if (!window.abego) window.abego = {};

version.extensions.ForEachTiddlerPlugin = {
	major: 1, minor: 0, revision: 7, 
	date: new Date(2007,2,28), 
	source: "http://tiddlywiki.abego-software.de/#ForEachTiddlerPlugin",
	licence: "[[BSD open source license (abego Software)|http://www.abego-software.de/legal/apl-v10.html]]",
	copyright: "Copyright (c) abego Software GmbH, 2005-2007 (www.abego-software.de)"
};

// For backward compatibility with TW 1.2.x
//
if (!TiddlyWiki.prototype.forEachTiddler) {
	TiddlyWiki.prototype.forEachTiddler = function(callback) {
		for(var t in this.tiddlers) {
			callback.call(this,t,this.tiddlers[t]);
		}
	};
}

//============================================================================
// forEachTiddler Macro
//============================================================================

version.extensions.forEachTiddler = {
	major: 1, minor: 0, revision: 7, date: new Date(2007,2,28), provider: "http://tiddlywiki.abego-software.de"};

// ---------------------------------------------------------------------------
// Configurations and constants 
// ---------------------------------------------------------------------------

config.macros.forEachTiddler = {
	 // Standard Properties
	 label: "forEachTiddler",
	 prompt: "Perform actions on a (sorted) selection of tiddlers",

	 // actions
	 actions: {
		 addToList: {},
		 write: {}
	 }
};

// ---------------------------------------------------------------------------
//  The forEachTiddler Macro Handler 
// ---------------------------------------------------------------------------

config.macros.forEachTiddler.getContainingTiddler = function(e) {
	while(e && !hasClass(e,"tiddler"))
		e = e.parentNode;
	var title = e ? e.getAttribute("tiddler") : null; 
	return title ? store.getTiddler(title) : null;
};

config.macros.forEachTiddler.handler = function(place,macroName,params,wikifier,paramString,tiddler) {
	// config.macros.forEachTiddler.traceMacroCall(place,macroName,params,wikifier,paramString,tiddler);

	if (!tiddler) tiddler = config.macros.forEachTiddler.getContainingTiddler(place);
	// --- Parsing ------------------------------------------

	var i = 0; // index running over the params
	// Parse the "in" clause
	var tiddlyWikiPath = undefined;
	if ((i < params.length) && params[i] == "in") {
		i++;
		if (i >= params.length) {
			this.handleError(place, "TiddlyWiki path expected behind 'in'.");
			return;
		}
		tiddlyWikiPath = this.paramEncode((i < params.length) ? params[i] : "");
		i++;
	}

	// Parse the where clause
	var whereClause ="true";
	if ((i < params.length) && params[i] == "where") {
		i++;
		whereClause = this.paramEncode((i < params.length) ? params[i] : "");
		i++;
	}

	// Parse the sort stuff
	var sortClause = null;
	var sortAscending = true; 
	if ((i < params.length) && params[i] == "sortBy") {
		i++;
		if (i >= params.length) {
			this.handleError(place, "sortClause missing behind 'sortBy'.");
			return;
		}
		sortClause = this.paramEncode(params[i]);
		i++;

		if ((i < params.length) && (params[i] == "ascending" || params[i] == "descending")) {
			 sortAscending = params[i] == "ascending";
			 i++;
		}
	}

	// Parse the script
	var scriptText = null;
	if ((i < params.length) && params[i] == "script") {
		i++;
		scriptText = this.paramEncode((i < params.length) ? params[i] : "");
		i++;
	}

	// Parse the action. 
	// When we are already at the end use the default action
	var actionName = "addToList";
	if (i < params.length) {
	   if (!config.macros.forEachTiddler.actions[params[i]]) {
			this.handleError(place, "Unknown action '"+params[i]+"'.");
			return;
		} else {
			actionName = params[i]; 
			i++;
		}
	} 
	
	// Get the action parameter
	// (the parsing is done inside the individual action implementation.)
	var actionParameter = params.slice(i);


	// --- Processing ------------------------------------------
	try {
		this.performMacro({
				place: place, 
				inTiddler: tiddler,
				whereClause: whereClause, 
				sortClause: sortClause, 
				sortAscending: sortAscending, 
				actionName: actionName, 
				actionParameter: actionParameter, 
				scriptText: scriptText, 
				tiddlyWikiPath: tiddlyWikiPath});

	} catch (e) {
		this.handleError(place, e);
	}
};

// Returns an object with properties "tiddlers" and "context".
// tiddlers holds the (sorted) tiddlers selected by the parameter,
// context the context of the execution of the macro.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlersAndContext = function(parameter) {

	var context = config.macros.forEachTiddler.createContext(parameter.place, parameter.whereClause, parameter.sortClause, parameter.sortAscending, parameter.actionName, parameter.actionParameter, parameter.scriptText, parameter.tiddlyWikiPath, parameter.inTiddler);

	var tiddlyWiki = parameter.tiddlyWikiPath ? this.loadTiddlyWiki(parameter.tiddlyWikiPath) : store;
	context["tiddlyWiki"] = tiddlyWiki;
	
	// Get the tiddlers, as defined by the whereClause
	var tiddlers = this.findTiddlers(parameter.whereClause, context, tiddlyWiki);
	context["tiddlers"] = tiddlers;

	// Sort the tiddlers, when sorting is required.
	if (parameter.sortClause) {
		this.sortTiddlers(tiddlers, parameter.sortClause, parameter.sortAscending, context);
	}

	return {tiddlers: tiddlers, context: context};
};

// Returns the (sorted) tiddlers selected by the parameter.
//
// The action is not yet performed.
//
// @parameter see performMacro
//
config.macros.forEachTiddler.getTiddlers = function(parameter) {
	return this.getTiddlersAndContext(parameter).tiddlers;
};

// Performs the macros with the given parameter.
//
// @param parameter holds the parameter of the macro as separate properties.
//				  The following properties are supported:
//
//						place
//						whereClause
//						sortClause
//						sortAscending
//						actionName
//						actionParameter
//						scriptText
//						tiddlyWikiPath
//
//					All properties are optional. 
//					For most actions the place property must be defined.
//
config.macros.forEachTiddler.performMacro = function(parameter) {
	var tiddlersAndContext = this.getTiddlersAndContext(parameter);

	// Perform the action
	var actionName = parameter.actionName ? parameter.actionName : "addToList";
	var action = config.macros.forEachTiddler.actions[actionName];
	if (!action) {
		this.handleError(parameter.place, "Unknown action '"+actionName+"'.");
		return;
	}

	var actionHandler = action.handler;
	actionHandler(parameter.place, tiddlersAndContext.tiddlers, parameter.actionParameter, tiddlersAndContext.context);
};

// ---------------------------------------------------------------------------
//  The actions 
// ---------------------------------------------------------------------------

// Internal.
//
// --- The addToList Action -----------------------------------------------
//
config.macros.forEachTiddler.actions.addToList.handler = function(place, tiddlers, parameter, context) {
	// Parse the parameter
	var p = 0;

	// Check for extra parameters
	if (parameter.length > p) {
		config.macros.forEachTiddler.createExtraParameterErrorElement(place, "addToList", parameter, p);
		return;
	}

	// Perform the action.
	var list = document.createElement("ul");
	place.appendChild(list);
	for (var i = 0; i < tiddlers.length; i++) {
		var tiddler = tiddlers[i];
		var listItem = document.createElement("li");
		list.appendChild(listItem);
		createTiddlyLink(listItem, tiddler.title, true);
	}
};

abego.parseNamedParameter = function(name, parameter, i) {
	var beginExpression = null;
	if ((i < parameter.length) && parameter[i] == name) {
		i++;
		if (i >= parameter.length) {
			throw "Missing text behind '%0'".format([name]);
		}
		
		return config.macros.forEachTiddler.paramEncode(parameter[i]);
	}
	return null;
}

// Internal.
//
// --- The write Action ---------------------------------------------------
//
config.macros.forEachTiddler.actions.write.handler = function(place, tiddlers, parameter, context) {
	// Parse the parameter
	var p = 0;
	if (p >= parameter.length) {
		this.handleError(place, "Missing expression behind 'write'.");
		return;
	}

	var textExpression = config.macros.forEachTiddler.paramEncode(parameter[p]);
	p++;

	// Parse the "begin" option
	var beginExpression = abego.parseNamedParameter("begin", parameter, p);
	if (beginExpression !== null) 
		p += 2;
	var endExpression = abego.parseNamedParameter("end", parameter, p);
	if (endExpression !== null) 
		p += 2;
	var noneExpression = abego.parseNamedParameter("none", parameter, p);
	if (noneExpression !== null) 
		p += 2;

	// Parse the "toFile" option
	var filename = null;
	var lineSeparator = undefined;
	if ((p < parameter.length) && parameter[p] == "toFile") {
		p++;
		if (p >= parameter.length) {
			this.handleError(place, "Filename expected behind 'toFile' of 'write' action.");
			return;
		}
		
		filename = config.macros.forEachTiddler.getLocalPath(config.macros.forEachTiddler.paramEncode(parameter[p]));
		p++;
		if ((p < parameter.length) && parameter[p] == "withLineSeparator") {
			p++;
			if (p >= parameter.length) {
				this.handleError(place, "Line separator text expected behind 'withLineSeparator' of 'write' action.");
				return;
			}
			lineSeparator = config.macros.forEachTiddler.paramEncode(parameter[p]);
			p++;
		}
	}
	
	// Check for extra parameters
	if (parameter.length > p) {
		config.macros.forEachTiddler.createExtraParameterErrorElement(place, "write", parameter, p);
		return;
	}

	// Perform the action.
	var func = config.macros.forEachTiddler.getEvalTiddlerFunction(textExpression, context);
	var count = tiddlers.length;
	var text = "";
	if (count > 0 && beginExpression)
		text += config.macros.forEachTiddler.getEvalTiddlerFunction(beginExpression, context)(undefined, context, count, undefined);
	
	for (var i = 0; i < count; i++) {
		var tiddler = tiddlers[i];
		text += func(tiddler, context, count, i);
	}
	
	if (count > 0 && endExpression)
		text += config.macros.forEachTiddler.getEvalTiddlerFunction(endExpression, context)(undefined, context, count, undefined);

	if (count == 0 && noneExpression) 
		text += config.macros.forEachTiddler.getEvalTiddlerFunction(noneExpression, context)(undefined, context, count, undefined);
		

	if (filename) {
		if (lineSeparator !== undefined) {
			lineSeparator = lineSeparator.replace(/\\n/mg, "\n").replace(/\\r/mg, "\r");
			text = text.replace(/\n/mg,lineSeparator);
		}
		saveFile(filename, convertUnicodeToUTF8(text));
	} else {
		var wrapper = createTiddlyElement(place, "span");
		wikify(text, wrapper, null/* highlightRegExp */, context.inTiddler);
	}
};


// ---------------------------------------------------------------------------
//  Helpers
// ---------------------------------------------------------------------------

// Internal.
//
config.macros.forEachTiddler.createContext = function(placeParam, whereClauseParam, sortClauseParam, sortAscendingParam, actionNameParam, actionParameterParam, scriptText, tiddlyWikiPathParam, inTiddlerParam) {
	return {
		place : placeParam, 
		whereClause : whereClauseParam, 
		sortClause : sortClauseParam, 
		sortAscending : sortAscendingParam, 
		script : scriptText,
		actionName : actionNameParam, 
		actionParameter : actionParameterParam,
		tiddlyWikiPath : tiddlyWikiPathParam,
		inTiddler : inTiddlerParam, // the tiddler containing the <<forEachTiddler ...>> macro call.
		viewerTiddler : config.macros.forEachTiddler.getContainingTiddler(placeParam) // the tiddler showing the forEachTiddler result
	};
};

// Internal.
//
// Returns a TiddlyWiki with the tiddlers loaded from the TiddlyWiki of 
// the given path.
//
config.macros.forEachTiddler.loadTiddlyWiki = function(path, idPrefix) {
	if (!idPrefix) {
		idPrefix = "store";
	}
	var lenPrefix = idPrefix.length;
	
	// Read the content of the given file
	var content = loadFile(this.getLocalPath(path));
	if(content === null) {
		throw "TiddlyWiki '"+path+"' not found.";
	}
	
	var tiddlyWiki = new TiddlyWiki();

	// Starting with TW 2.2 there is a helper function to import the tiddlers
	if (tiddlyWiki.importTiddlyWiki) {
		var errorText = tiddlyWiki.importTiddlyWiki(content);
		if (errorText)
			throw "File '"+path+"' is not a TiddlyWiki.";
		tiddlyWiki.dirty = false;
		return tiddlyWiki;
	}
	
	// The legacy code, for TW < 2.2
	
	// Locate the storeArea div's
	var posOpeningDiv = content.indexOf(startSaveArea);
	var posClosingDiv = content.lastIndexOf(endSaveArea);
	if((posOpeningDiv == -1) || (posClosingDiv == -1)) {
		throw "File '"+path+"' is not a TiddlyWiki.";
	}
	var storageText = content.substr(posOpeningDiv + startSaveArea.length, posClosingDiv);
	
	// Create a "div" element that contains the storage text
	var myStorageDiv = document.createElement("div");
	myStorageDiv.innerHTML = storageText;
	myStorageDiv.normalize();
	
	// Create all tiddlers in a new TiddlyWiki
	// (following code is modified copy of TiddlyWiki.prototype.loadFromDiv)
	var store = myStorageDiv.childNodes;
	for(var t = 0; t < store.length; t++) {
		var e = store[t];
		var title = null;
		if(e.getAttribute)
			title = e.getAttribute("tiddler");
		if(!title && e.id && e.id.substr(0,lenPrefix) == idPrefix)
			title = e.id.substr(lenPrefix);
		if(title && title !== "") {
			var tiddler = tiddlyWiki.createTiddler(title);
			tiddler.loadFromDiv(e,title);
		}
	}
	tiddlyWiki.dirty = false;

	return tiddlyWiki;
};


	
// Internal.
//
// Returns a function that has a function body returning the given javaScriptExpression.
// The function has the parameters:
// 
//	 (tiddler, context, count, index)
//
config.macros.forEachTiddler.getEvalTiddlerFunction = function (javaScriptExpression, context) {
	var script = context["script"];
	var functionText = "var theFunction = function(tiddler, context, count, index) { return "+javaScriptExpression+"}";
	var fullText = (script ? script+";" : "")+functionText+";theFunction;";
	return eval(fullText);
};

// Internal.
//
config.macros.forEachTiddler.findTiddlers = function(whereClause, context, tiddlyWiki) {
	var result = [];
	var func = config.macros.forEachTiddler.getEvalTiddlerFunction(whereClause, context);
	tiddlyWiki.forEachTiddler(function(title,tiddler) {
		if (func(tiddler, context, undefined, undefined)) {
			result.push(tiddler);
		}
	});
	return result;
};

// Internal.
//
config.macros.forEachTiddler.createExtraParameterErrorElement = function(place, actionName, parameter, firstUnusedIndex) {
	var message = "Extra parameter behind '"+actionName+"':";
	for (var i = firstUnusedIndex; i < parameter.length; i++) {
		message += " "+parameter[i];
	}
	this.handleError(place, message);
};

// Internal.
//
config.macros.forEachTiddler.sortAscending = function(tiddlerA, tiddlerB) {
	var result = 
		(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue) 
			? 0
			: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
			   ? -1 
			   : +1; 
	return result;
};

// Internal.
//
config.macros.forEachTiddler.sortDescending = function(tiddlerA, tiddlerB) {
	var result = 
		(tiddlerA.forEachTiddlerSortValue == tiddlerB.forEachTiddlerSortValue) 
			? 0
			: (tiddlerA.forEachTiddlerSortValue < tiddlerB.forEachTiddlerSortValue)
			   ? +1 
			   : -1; 
	return result;
};

// Internal.
//
config.macros.forEachTiddler.sortTiddlers = function(tiddlers, sortClause, ascending, context) {
	// To avoid evaluating the sortClause whenever two items are compared 
	// we pre-calculate the sortValue for every item in the array and store it in a 
	// temporary property ("forEachTiddlerSortValue") of the tiddlers.
	var func = config.macros.forEachTiddler.getEvalTiddlerFunction(sortClause, context);
	var count = tiddlers.length;
	var i;
	for (i = 0; i < count; i++) {
		var tiddler = tiddlers[i];
		tiddler.forEachTiddlerSortValue = func(tiddler,context, undefined, undefined);
	}

	// Do the sorting
	tiddlers.sort(ascending ? this.sortAscending : this.sortDescending);

	// Delete the temporary property that holds the sortValue.	
	for (i = 0; i < tiddlers.length; i++) {
		delete tiddlers[i].forEachTiddlerSortValue;
	}
};


// Internal.
//
config.macros.forEachTiddler.trace = function(message) {
	displayMessage(message);
};

// Internal.
//
config.macros.forEachTiddler.traceMacroCall = function(place,macroName,params) {
	var message ="<<"+macroName;
	for (var i = 0; i < params.length; i++) {
		message += " "+params[i];
	}
	message += ">>";
	displayMessage(message);
};


// Internal.
//
// Creates an element that holds an error message
// 
config.macros.forEachTiddler.createErrorElement = function(place, exception) {
	var message = (exception.description) ? exception.description : exception.toString();
	return createTiddlyElement(place,"span",null,"forEachTiddlerError","<<forEachTiddler ...>>: "+message);
};

// Internal.
//
// @param place [may be null]
//
config.macros.forEachTiddler.handleError = function(place, exception) {
	if (place) {
		this.createErrorElement(place, exception);
	} else {
		throw exception;
	}
};

// Internal.
//
// Encodes the given string.
//
// Replaces 
//	 "$))" to ">>"
//	 "$)" to ">"
//
config.macros.forEachTiddler.paramEncode = function(s) {
	var reGTGT = new RegExp("\\$\\)\\)","mg");
	var reGT = new RegExp("\\$\\)","mg");
	return s.replace(reGTGT, ">>").replace(reGT, ">");
};

// Internal.
//
// Returns the given original path (that is a file path, starting with "file:")
// as a path to a local file, in the systems native file format.
//
// Location information in the originalPath (i.e. the "#" and stuff following)
// is stripped.
// 
config.macros.forEachTiddler.getLocalPath = function(originalPath) {
	// Remove any location part of the URL
	var hashPos = originalPath.indexOf("#");
	if(hashPos != -1)
		originalPath = originalPath.substr(0,hashPos);
	// Convert to a native file format assuming
	// "file:///x:/path/path/path..." - pc local file --> "x:\path\path\path..."
	// "file://///server/share/path/path/path..." - FireFox pc network file --> "\\server\share\path\path\path..."
	// "file:///path/path/path..." - mac/unix local file --> "/path/path/path..."
	// "file://server/share/path/path/path..." - pc network file --> "\\server\share\path\path\path..."
	var localPath;
	if(originalPath.charAt(9) == ":") // pc local file
		localPath = unescape(originalPath.substr(8)).replace(new RegExp("/","g"),"\\");
	else if(originalPath.indexOf("file://///") === 0) // FireFox pc network file
		localPath = "\\\\" + unescape(originalPath.substr(10)).replace(new RegExp("/","g"),"\\");
	else if(originalPath.indexOf("file:///") === 0) // mac/unix local file
		localPath = unescape(originalPath.substr(7));
	else if(originalPath.indexOf("file:/") === 0) // mac/unix local file
		localPath = unescape(originalPath.substr(5));
	else // pc network file
		localPath = "\\\\" + unescape(originalPath.substr(7)).replace(new RegExp("/","g"),"\\");	
	return localPath;
};

// ---------------------------------------------------------------------------
// Stylesheet Extensions (may be overridden by local StyleSheet)
// ---------------------------------------------------------------------------
//
setStylesheet(
	".forEachTiddlerError{color: #ffffff;background-color: #880000;}",
	"forEachTiddler");

//============================================================================
// End of forEachTiddler Macro
//============================================================================


//============================================================================
// String.startsWith Function
//============================================================================
//
// Returns true if the string starts with the given prefix, false otherwise.
//
version.extensions["String.startsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.startsWith = function(prefix) {
	var n =  prefix.length;
	return (this.length >= n) && (this.slice(0, n) == prefix);
};



//============================================================================
// String.endsWith Function
//============================================================================
//
// Returns true if the string ends with the given suffix, false otherwise.
//
version.extensions["String.endsWith"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.endsWith = function(suffix) {
	var n = suffix.length;
	return (this.length >= n) && (this.right(n) == suffix);
};


//============================================================================
// String.contains Function
//============================================================================
//
// Returns true when the string contains the given substring, false otherwise.
//
version.extensions["String.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
String.prototype.contains = function(substring) {
	return this.indexOf(substring) >= 0;
};

//============================================================================
// Array.indexOf Function
//============================================================================
//
// Returns the index of the first occurance of the given item in the array or 
// -1 when no such item exists.
//
// @param item [may be null]
//
version.extensions["Array.indexOf"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.indexOf = function(item) {
	for (var i = 0; i < this.length; i++) {
		if (this[i] == item) {
			return i;
		}
	}
	return -1;
};

//============================================================================
// Array.contains Function
//============================================================================
//
// Returns true when the array contains the given item, otherwise false. 
//
// @param item [may be null]
//
version.extensions["Array.contains"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.contains = function(item) {
	return (this.indexOf(item) >= 0);
};

//============================================================================
// Array.containsAny Function
//============================================================================
//
// Returns true when the array contains at least one of the elements 
// of the item. Otherwise (or when items contains no elements) false is returned.
//
version.extensions["Array.containsAny"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAny = function(items) {
	for(var i = 0; i < items.length; i++) {
		if (this.contains(items[i])) {
			return true;
		}
	}
	return false;
};


//============================================================================
// Array.containsAll Function
//============================================================================
//
// Returns true when the array contains all the items, otherwise false.
// 
// When items is null false is returned (even if the array contains a null).
//
// @param items [may be null] 
//
version.extensions["Array.containsAll"] = {major: 1, minor: 0, revision: 0, date: new Date(2005,11,20), provider: "http://tiddlywiki.abego-software.de"};
//
Array.prototype.containsAll = function(items) {
	for(var i = 0; i < items.length; i++) {
		if (!this.contains(items[i])) {
			return false;
		}
	}
	return true;
};


} // of "install only once"

// Used Globals (for JSLint) ==============
// ... DOM
/*global 	document */
// ... TiddlyWiki Core
/*global 	convertUnicodeToUTF8, createTiddlyElement, createTiddlyLink, 
			displayMessage, endSaveArea, hasClass, loadFile, saveFile, 
			startSaveArea, store, wikify */
//}}}


/***
!Licence and Copyright
Copyright (c) abego Software ~GmbH, 2005 ([[www.abego-software.de|http://www.abego-software.de]])

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.

Neither the name of abego Software nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
***/

FrameBuffer
Created 星期一 26/02/2007

grub的vga参数表,启用framebuffer
写法:vga=xxx 
这个xxx请参考下面的表 
*<<slider chkSlider升级新版 [[grub的vga参数表]] grub的vga参数表 "grub的vga参数表">>

zhcon需要framebuffer
zhcon --utf8。运行才识别utf8的local系统。

mplayer在tty下面的运行

mplayer -vo的参数测试:
|!参数|!效果说明|
|yuv4mpeg|只有声音。|
|aa/caca|竟然都可以播放。只是大概分不清谁是谁了。字符模式,鬼才认到人。看个大概形状而已。|
|ggi|卡,而且不断出错就没正常视频了。 |
|fbdev/fbdev2|正常。|
|gif89a/tga/png/pnm|这些图片格式的,当然没视频输出了。声音还是有的。后来看目录,都转图片文件了,一堆一堆的。 |
|md5sum/null| 没敢测试。 |

其他的都没连接。 
================================================== 
mplayer的强制全屏显示
{{{
mplayer -vo fbdev2 -zoom -fs -x 1024 -y 768 test.rmvb 
}}}
<<forEachTiddler where 'tiddler.tags.contains("Game")' sortBy 'tiddler.created' descending>>
Gnix oag的启动
Created 星期五 27/10/2006 10:14

在已有Linux系统的情况下,设置的方法:

在现有系统的/boot/grup/menu.lst里面修改:
{{{
title Ubuntu Linux 7.04
kernel (hd0,1)/feisty-boot/vmlinuz boot=gnix_oag ramdisk_size=1048576 root=/dev/ram rw quiet splash  debian-installer/locale=zh_CN fd_dir=feisty-boot
initrd (hd0,1)/feisty-boot/initrd.gz
}}}
使用hda2作为文件放置分区:
{{{
$●  grep sda2 /etc/mtab 
/dev/sda2 /home reiserfs rw 0 0
}}}
启动引导程序, 启动的iso文件:
{{{
$●  l /home/feisty-boot/
feisty-desktop-i386.iso*  initrd.gz*  vmlinuz*
}}}
swap分区可以自动使用现有的物理swap分区
![[欢迎]]

[img[logo|distributor-logo.png]]

!标签-分类
[[Ubuntu 标签]]
[[Shell 标签]]
[[Opera 标签]]
[[Subversion 标签]]
[[Wiki 标签]]
[[Game 标签]]
----
<<forEachTiddler where 'tiddler.tags.contains("Media")' sortBy 'tiddler.created' descending>>
<<forEachTiddler where 'tiddler.tags.contains("Opera")' sortBy 'tiddler.created' descending>>
Opera-irc-style
Created 星期四 08/02/2007
{{{
/usr/share/opera/styles$●  sed '/{.*\/$/,/^}/!d' im.css
div.highlight { /*叫名高亮:上下包括线*/
        padding:2px;
        border:solid #8BB3D1;
        border-width:1px 0;
        background: #EFF2F4;
}
.highlight {    /*叫名高亮:四周虚线*/
        display: table-cell;
        border: 1px dotted #552;
        padding: 1px;
        background-color: #ffffe1;
}
.self { /*自己的名字显示:粗体,紫色底,白色字*/
color: white; 
font-weight:bolder; 
text-align: right; 
background: #802080;
}
.self-message { /*自己发出的信息:粗体红色字*/
color: red;
font-weight:bolder;
}
}}}

[img[实例|./pic/opera-irc-style.png]]
Opera-下载菜单
Created 星期六 10/02/2007
[img[opera-菜单扩展|./pic/opera-菜单扩展.png]]
[img[opera-右键菜单扩展|./pic/opera-右键菜单扩展.png]]
Proxy的Button
Created 星期三 07/03/2007

opera:/button/Enable%20proxy%20servers,,,,%22Checkbox%20Skin%22%20|Disable%20proxy%20servers,,,,%22Checkbox%20Skin.Selected%22

opera:/button/Enable%20proxy%20servers|Disable%20proxy%20servers
QT 程序都用 xim 算了,一劳永逸。以前都是 ''QT_IM_MODULE=xim /usr/bin/skype'' 这样执行的。
{{{
/etc/X11/xinit/xinput.d$●  grep xim scim
QT_IM_MODULE="xim"
}}}


那烂2.6.20-14-generic的休眠,把系统搞惨。都不自动挂载SD卡了。
{{{
21:16:05-exp~$●  dmesg|tail
....
[ 4052.464000] mmcblk0: mmc0:cd48 SD512 500224KiB 
[ 4052.464000]  mmcblk0: p1
21:20:07-exp~$●  l /dev/mmcblk0
mmcblk0    mmcblk0p1  
21:20:07-exp~$●  pmount /dev/mmcblk0p1 
}}}
!!~/.vim/plugin/Search_Word.vim.html
@@color(#8080ff):" au! QuickFixCmdPre *.[ch] call Search_Word()@@
@@color(#ffff00):func@@ Search_Word@@color(#ffff00):()@@
  @@color(#ffff00):let@@ w @@color(#ffff00):=@@ @@color(#00ffff):expand@@@@color(#ffff00):(@@@@color(#ff6060):"<cword>"@@@@color(#ffff00):)@@>     @@color(#8080ff):" 在当前光标位置抓词@@
  @@color(#ffff00):exe@@ @@color(#ff6060):"vimgrep "@@ w @@color(#ff6060):" *.c *.h"@@
  @@color(#ffff00):exe@@ @@color(#ff6060):'copen'@@
@@color(#ffff00):endfun@@
<<forEachTiddler where 'tiddler.tags.contains("Shell")' sortBy 'tiddler.created' descending>>
舒适的个人网络笔记
Eexpress Wiki
<<forEachTiddler where 'tiddler.tags.contains("Subversion")' sortBy 'tiddler.created' descending>>
Svnserve实例
Created 星期一 02/10/2006 09:02

千辛万苦测试出来的,就没找到一个详细说明anthz文件写法的。开了一台哑巴机器,在自己机器上面ssh过去,再svn回来。  似乎是没事折腾。呵呵。 

使用svnserve -d时候的各种认证文件写法。基本是常规写法,特殊的是红色部分。 

A机器: 
$ cat /home/svn/tmp/conf/svnserve.conf |grep -v ^# 
[general] 
anon-access = none 
auth-access = write 
password-db = passwd 
authz-db = authz 
realm = Eexp' Repository 

$ cat /home/svn/tmp/conf/passwd |grep -v ^# 
[users] 
eexp = eexp 
test = test 

$ cat /home/svn/tmp/conf/authz |grep -v ^# 
[groups] 
entontech = eexp,test 
[tmp:/] 
eexp = rw 
test = r 
* = 

其中,[tmp:/]的写法,必须是这样。不能使用全路径,而且手册里面也没有详细说明。当然可能有其他办法可以使用。只是我只有这样才测试成功。 

$ svnserve -d -r /home/svn/ 
只能限制输出路径到根一级的版本库。这里是tmp的上级目录/home/svn。 

B机器: 
$ svn co svn://10.23.1.18/tmp --username test 
认证领域:<svn://10.23.1.18:3690> Eexp' Repository 
“test”的密码: 
取出修订版 2。
Svn备份
Created 星期一 02/10/2006 09:12

$ svnadmin dump /home/svn/lj12-source/>/media/mmcdisk/lj12-source-repository 
* Dumped revision 0. 
* Dumped revision 1. 
* Dumped revision 2. 
* Dumped revision 3. 
* Dumped revision 4. 
* Dumped revision 5. 
* Dumped revision 6.
Svn笔记
Created 星期三 27/09/2006 09:59

exp@exp-laptop:~$ sudo mkdir /home/svn
exp@exp-laptop:~$ cd /home/svn/
exp@exp-laptop:/home/svn$ ll
总用量 0
drwxr-xr-x 7 root root 224 2006-09-27 09:54 lj12/

在 Ubuntu 菜单上选择“系统->系统管理->用户和组”; 
切换到“组”标签; 
点击“添加组”按钮; 
组名为“subversion”; 
将您自己和“www-data”(Apache 用户)加入组成员中; 
点击“OK”以确认修改,关闭该程序。

exp@exp-laptop:/home/svn$ cat /etc/group|grep subversion
subversion:x:1001:www-data,exp
exp@exp-laptop:/home/svn$ sudo chown -R root:subversion lj12/
exp@exp-laptop:/home/svn$ sudo chmod -R g+rws lj12/
exp@exp-laptop:/home/svn$ ll
总用量 0
drwxrwsr-x 7 root subversion 224 2006-09-27 09:54 lj12/
exp@exp-laptop:/home/svn$ ll lj12
总用量 8.0K
drwxrwsr-x 2 root subversion 128 2006-09-27 09:54 conf/
drwxrwsr-x 2 root subversion  48 2006-09-27 09:54 dav/
drwxrwsr-x 5 root subversion 256 2006-09-27 09:54 db/
-r--rwSr-- 1 root subversion   2 2006-09-27 09:54 format
drwxrwsr-x 2 root subversion 360 2006-09-27 09:54 hooks/
drwxrwsr-x 2 root subversion 104 2006-09-27 09:54 locks/
-rw-rwSr-- 1 root subversion 229 2006-09-27 09:54 README.txt
exp@exp-laptop:/home/svn$ cd ..
exp@exp-laptop:/home$ ll
总用量 18K
drwxr-xr-x 61 exp  exp     2.4K 2006-09-27 09:56 exp/
drwxrwx---  5 root plugdev  16K 1970-01-01 08:00 media/
drwxr-xr-x  3 root root      72 2006-09-27 09:54 svn/
exp@exp-laptop:/home$ cd /home/exp/工程/源码/
exp@exp-laptop:~/工程/源码$ esvn
exp@exp-laptop:~/工程/源码$ svn import /home/exp/工程/源码/ file:///home/svn/lj12/ -m 9-18版本。9-27建立。


exp@exp-laptop:~/工程/源码$ svn add -N 4428.c 4428.h adc.C adc.h application.C application.h cmd_input.c cmd_input.h en.c en.h format.c format.h getPD.c getPD.h ini.c irq.C irq.h kbi.c kbi.h lcd.c lcd.h main.c main.c~ mem.C mem.h rtc.C rtc.h sci.C sci.h spi.c spi.h struct.h tim.C tim.h 

清空了当前目录。

exp@exp-laptop:~/工程/源码$ svn co file:///home/svn/lj12/
A    lj12/tim.h
A    lj12/en.c
A    lj12/application.C
A    lj12/getPD.c
A    lj12/kbi.c
A    lj12/en.h
A    lj12/getPD.h
A    lj12/kbi.h
A    lj12/sci.C
A    lj12/mem.C
A    lj12/ini.c
A    lj12/adc.C
A    lj12/tim.C
A    lj12/spi.c
A    lj12/rtc.h
A    lj12/spi.h
A    lj12/irq.h
A    lj12/4428.c
A    lj12/lcd.c
A    lj12/4428.h
A    lj12/lcd.h
A    lj12/application.h
A    lj12/cmd_input.c
A    lj12/sci.h
A    lj12/mem.h
A    lj12/main.c
A    lj12/cmd_input.h
A    lj12/rtc.C
A    lj12/format.c
A    lj12/struct.h
A    lj12/irq.C
A    lj12/adc.h
A    lj12/format.h
取出修订版 1。
Touchpad 触摸板
Created 星期五 06/10/2006 03:15

Fn+F9 切换触摸屏

触摸板已经模拟了4个角的点击。3出不来??
>~RTCornerButton       = 2
>~RBCornerButton       = 3
>~LTCornerButton       = 0
>~LBCornerButton       = 0

在 /etc/X11/xorg.conf 里面增加了这些:
{{{
Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        Driver          "synaptics"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"
#        Option          "HorizScrollDelta"      "0"
        Option          "SHMConfig"             "on"

Option          "TapButton1"            "3"
Option          "TapButton3"            "1"
#       Option          "HorizScrollDelta"      "100"
#enable horiz scroll of touchpad
EndSection
}}}
细节设置,可以看帮助:
man synaptics
synclient

或者使用:
qsynaptics
<<forEachTiddler where 'tiddler.tags.contains("Ubuntu")' sortBy 'tiddler.created' descending>>
<<forEachTiddler where 'tiddler.tags.contains("Wiki")' sortBy 'tiddler.created' descending>>
eexpress
/***
|''Name:''|WikiBar|
|''Version:''|2.0.0 beta3|
|''Source:''|[[AiddlyWiki|http://aiddlywiki.sourceforge.net]]|
|''Author:''|[[Arphen Lin|mailto:arphenlin@gmail.com]]|
|''Type:''|toolbar macro command extension|
|''Required:''|TiddlyWiki 2.0.0 beta6|
!Description
WikiBar is a toolbar that gives access to most of TiddlyWiki's formatting features with a few clicks. It's a handy tool for people who are not familiar with TiddlyWiki syntax.
Besides, with WikiBar-addons, users can extend the power of WikiBar.
!Support browser
*Firefox 1.5
!Revision history
*v2.0.0 beta3 (2005/12/30)
** remove macros (replaced by TWMacro addon)
** add wikibar command in toolbar automatically
** rename DOIT to HANDLER
** rename TIP to TOOLTIP
*v2.0.0 beta2 (2005/12/21)
** re-design Wikibar addon framework
*v2.0.0 beta1 (2005/12/14)
** Note:
*** WikiBarPlugin is renamed to WikiBar
** New Features:
*** support TiddlyWiki 2.0.0 template mechanism
*** new wikibar data structure
*** new wikibar-addon framework for developers
**** support dynamic popup menu generator
*** support most new macros added in TiddlyWiki 2.0.0
*** multi-level popup menu
*** fix wikibar tab stop
*** remove paletteSelector
** Known Bugs:
*** popup-menu and color-picker can't be closed correctly
*** some macros can't be displayed correctly in previewer
*** text in previewer will be displayed italic
*v1.2.0 (2005/11/21)
**New Features:
***User defined color palettes supported
####Get color palettes from [[ColorZilla Palettes|http://www.iosart.com/firefox/colorzilla/palettes.html]].
####Save the palette file(*.gpl) as a new tiddler and tag it with 'ColorPalettes', then you can use it in WikiBar.
***WikiBar style sheet supported
***Click on document to close current colorPicker, paletteSelector or aboutWikibar
*v1.1.1 (2005/11/03)
**Bugs fixed:
***'Not enough parameters!' message is displayed when the parameter includes '%+number', ex: 'hello%20world!'
*v1.1.0 (2005/11/01)
**Bugs fixed:
***WikiBar overruns (reported by by GeoffS <gslocock@yahoo.co.uk>)
**New features:
***Insert a color code at the cursor. (Thanks to RunningUtes <RunningUtes@gmail.com>)
***Enable gradient macro. (Thanks to RunningUtes <RunningUtes@gmail.com>)
***Insert tiddler comment tags {{{/% ... %/}}}. (new feature supported by TiddlyWiki 1.2.37)
***Insert DateFormatString for {{{<<today>>}}} macro. (new feature supported by TiddlyWiki 1.2.37)
**Enhanced:
***Allow optional parameters in syntax.
**Bugs:
***'Not enough parameters!' message is displayed when the parameter includes '%+number', ex: 'hello%20world!'
*v1.0.0 (2005/10/30)
**Initial release
!Code
***/
//{{{
config.macros.wikibar = {major: 2, minor: 0, revision: 0, beta: 3, date: new Date(2005,12,30)};
config.macros.wikibar.handler = function(place,macroName,params,wikifier,paramString,tiddler){
  if(!(tiddler instanceof Tiddler))  {return;}
	story.setDirty(tiddler.title,true);
  place.id = 'wikibar'+tiddler.title;
  place.className = 'toolbar wikibar';
};
function wikibar_install(){
  config.commands.wikibar = {
  	text: 'wikibar',
  	tooltip: 'wikibar on/off',
  	handler: function(e,src,title) {
      if(!e){ e = window.event; }
      var theButton = resolveTarget(e);
      theButton.id = 'wikibarButton'+title;
      wikibarPopup.remove();
      wikibar_installAddons(theButton, title);
      wikibar_createWikibar(title);
      return(false);
    }
  };
  config.shadowTiddlers['EditTemplate'] = wikibar_addWikibarCommand(config.shadowTiddlers['EditTemplate']);
  var tiddler = store.getTiddler('EditTemplate');
  if(tiddler){
    tiddler.text = wikibar_addWikibarCommand(tiddler.text);
  }
}
function wikibar_installAddons(theButton, title){
 	var tiddlers = store.getTaggedTiddlers('wikibarAddons');
	if(!tiddlers)	  { return; }
	theButton.addons=[];
  for(var i=0; i<tiddlers.length; i++){
    try{
      eval(tiddlers[i].text);
      try{
        wikibar_addonInstall(title);
        wikibar_addonInstall = null;
        theButton.addons.push({ok:true, name:tiddlers[i].title});
      }catch(ex){
        theButton.addons.push({ok:false, name:tiddlers[i].title, error:ex});
      }
    }catch(ex){
      theButton.addons.push({ok:false, name:tiddlers[i].title, error:ex});
    }
  }
}
function wikibar_addWikibarCommand(tiddlerText){
  var div = document.createElement('div');
  div.style.display = 'none';
  div.innerHTML = tiddlerText;
  for(var i=0; i<div.childNodes.length; i++){
    var o=div.childNodes[i];
    if(o.tagName==='DIV'){
      if(o.className=='toolbar'){
        var macroText = o.getAttribute('macro').trim();
        if(macroText.search('wikibar')<=0){
          macroText += ' wikibar';
          o.setAttribute('macro', macroText);
        }
        break;
      }
    }
  }
  return div.innerHTML.replace(/\"/g, "\'");
}
function wikibar_processSyntaxParams(theSyntax, params){
  try{
    var pcr = 'AplWikibarPcr';
    var rx=null;
    var allParams=null;
    if(params){
      if(typeof(params)=='object'){
        for(var i=0; i<params.length; i++){
          if(params[i]){
            params[i] = params[i].replace(new RegExp('%','g'), pcr).trim();
            rx = '(\\[%'+(i+1)+'\\])' + '|' + '(%'+(i+1)+')';
            theSyntax = theSyntax.replace(new RegExp(rx,'g'), params[i] );
          }
        }
        allParams = params.join(' ').trim();
      }else{
        allParams = params.replace(new RegExp('%','g'), pcr).trim();
        rx = /(\[%1{1}\])|(%1{1})/g;
        theSyntax = theSyntax.replace(rx, allParams);
      }
    }
    if(allParams){
      theSyntax = theSyntax.replace(new RegExp('%N{1}','g'), allParams);
    }
    rx=/\[%(([1-9]{1,}[0-9]{0,})|(N{1}))\]/g;
    theSyntax = theSyntax.replace(rx, '');
    rx=/%(([1-9]{1,}[0-9]{0,})|(N{1}))/g;
    if( theSyntax.match(rx) ){
      throw 'Not enough parameters! ' + theSyntax;
    }
    theSyntax=theSyntax.replace(new RegExp(pcr,'g'), '%');
    return theSyntax;
  } catch(ex){
    return null;
  }
}
function wikibar_resolveEditItem(tiddlerWrapper, itemName){
  if(tiddlerWrapper.hasChildNodes()){
    var c=tiddlerWrapper.childNodes;
    for(var i=0; i<c.length; i++){
      var txt=wikibar_resolveEditItem(c[i], itemName);
      if(!txt){
        continue;
      }else{
        return txt;
      }
    }
  }
  return ((tiddlerWrapper.getAttribute && tiddlerWrapper.getAttribute('edit')==itemName)? tiddlerWrapper : null);
}
function wikibar_resolveEditItemValue(tiddlerWrapper, itemName){
  var o = wikibar_resolveEditItem(tiddlerWrapper, itemName);
  return (o? o.value.replace(/\r/mg,'') : null);
}
function wikibar_resolveTiddlerEditorWrapper(obj){
  if(obj.id=='tiddlerDisplay'){return null;}
  if((obj.getAttribute && obj.getAttribute('macro')=='edit text')){return obj;}
  return wikibar_resolveTiddlerEditorWrapper(obj.parentNode);
}
function wikibar_resolveTiddlerEditor(obj){
  if(obj.hasChildNodes()){
    var c = obj.childNodes;
    for(var i=0; i<c.length; i++){
      var o=wikibar_resolveTiddlerEditor(c[i]);
      if(o){ return o;}
    }
  }
  return ((obj.getAttribute && obj.getAttribute('edit')=='text')? obj : null);
}
function wikibar_resolveTargetButton(obj){
  if(obj.id && obj.id.substring(0,7)=='wikibar'){ return null; }
  if(obj.tiddlerTitle){
    return obj;
  }else{
    return wikibar_resolveTargetButton(obj.parentNode);
  }
}
function wikibar_isValidMenuItem(tool){
  if(!tool){  return false; }
  if(tool.TYPE=='MENU' || tool.TYPE=='MAIN_MENU'){
    for(var key in tool){
      if(key.substring(0,8)=='DYNAITEM'){ return true; }
      if(wikibar_isValidMenuItem(tool[key])){ return true; }
    }
    return false;
  }else{
    return (tool.HANDLER? true : false);
  }
}
function wikibar_editFormat(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){ return; }
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var endText  = '';
	var fullText = editor.value;
	if(se>ss && ss>=0){
	  frontText  = fullText.substring(0, ss);
	  endText    = fullText.substring(se, fullText.length);
	}
	else if(ss===0 && (se===0 || se == fullText.length) ){
    endText    = fullText;
	}
	else if(se==ss && ss>0){
    frontText  = fullText.substring(0, ss);
    endText    = fullText.substring(se, fullText.length);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editFormatByWord(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){return;}
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var selText  = '';
	var endText  = '';
	var fullText = editor.value;
	if(se>ss && ss>=0){
	  frontText  = fullText.substring(0, ss);
	  selText	   = fullText.substring(ss,se);
	  endText    = fullText.substring(se, fullText.length);
	}
	else if(ss===0 && (se===0 || se == fullText.length) ){
    endText    = fullText;
	}
	else if(se==ss && ss>0){
    frontText  = fullText.substring(0, ss);
    endText    = fullText.substring(se, fullText.length);
	  if(!( fullText.charAt(ss-1).match(/\W/gi) || fullText.charAt(ss).match(/\W/gi) )){
      var m = frontText.match(/\W/gi);
      if(m){
        ss = frontText.lastIndexOf(m[m.length-1])+1;
      }
      else{
        ss = 0;
      }
      m = endText.match(/\W/gi);
      if(m){
        se += endText.indexOf(m[0]);
      }
      else{
        se = fullText.length;
      }
      frontText = fullText.substring(0, ss);
  	  endText   = fullText.substring(se, fullText.length);
  	  selText   = fullText.substring(ss,se);
	  }
	}
	if(selText.length>0){
		repText = repText.replace('user_text', selText);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editFormatByCursor(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){ return; }
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var endText  = '';
	var fullText = editor.value;
	if(se>ss && ss>=0){
	  frontText  = fullText.substring(0, ss);
	  endText    = fullText.substring(se, fullText.length);
	}
	else if(ss===0 && (se===0 || se == fullText.length) ){
    endText    = fullText;
	}
	else if(se==ss && ss>0){
    frontText  = fullText.substring(0, ss);
    endText    = fullText.substring(se, fullText.length);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editFormatByLine(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){ return; }
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var selText  = '';
	var endText  = '';
	var fullText = editor.value;
	if(se>ss && ss>=0){
		if(this.byBlock){
	    frontText  = fullText.substring(0, ss);
	    selText		 = fullText.substring(ss,se);
	    endText    = fullText.substring(se, fullText.length);
		}
		else{
	  	se = ss;
		}
	}
  if(ss===0 && (se===0 || se == fullText.length) ){
    var m=fullText.match(/(\n|\r)/g);
    if(m){
      se = fullText.indexOf(m[0]);
    }else{
      se = fullText.length;
    }
    selText    = fullText.substring(0, se);
    endText    = fullText.substring(se, fullText.length);
	}
	else if(se==ss && ss>0){
    frontText  = fullText.substring(0, ss);
    endText    = fullText.substring(se, fullText.length);
    m = frontText.match(/(\n|\r)/g);
    if(m){
      ss = frontText.lastIndexOf(m[m.length-1])+1;
    }
    else{
      ss = 0;
    }
    m = endText.match(/(\n|\r)/g);
    if(m){
      se += endText.indexOf(m[0]);
    }
    else{
      se = fullText.length;
    }
    frontText = fullText.substring(0, ss);
	  selText   = fullText.substring(ss,se);
	  endText   = fullText.substring(se, fullText.length);
	}
	if(selText.length>0){
		repText = repText.replace('user_text', selText);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	if(this.byBlock){
    if( (frontText.charAt(frontText.length-1)!='\n') && ss>0 ){
    	repText = '\n' + repText;
    }
    if( (endText.charAt(0)!='\n') || se==fullText.length){
    	repText += '\n';
    }
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editFormatByTableCell(param){
  var editor = param.button.editor;
  var params = param.params;
  clearMessage();
  if(!editor){ return; }
  var repText = wikibar_processSyntaxParams(this.syntax, params);
  if(repText===null){ return; }
	var st = editor.scrollTop;
	var ss = editor.selectionStart;
	var se = editor.selectionEnd;
	var frontText= '';
	var selText  = '';
	var endText  = '';
	var fullText = editor.value;
	if(ss===0 || ss==fullText.length){
		throw 'not valid cell!';
	}
	se=ss;
  frontText  = fullText.substring(0, ss);
  endText    = fullText.substring(se, fullText.length);
  i=frontText.lastIndexOf('\n');
  j=frontText.lastIndexOf('|');
  if(i>j || j<0){
  	throw 'not valid cell!';
  }
	ss = j+1;
  i=endText.indexOf('\n');
  j=endText.indexOf('|');
  if(i<j || j<0){
  	throw 'not valid cell!';
  }
  se += j;
  frontText = fullText.substring(0, ss-1);
  selText   = fullText.substring(ss,se);
  endText   = fullText.substring(se+1, fullText.length);
	if(this.key.substring(0,5)=='align'){
		selText = selText.trim();
		if(	selText=='>' || selText=='~' ||	selText.substring(0,8)=='bgcolor(')	{return; }
	}
	if(selText.length>0){
		repText = repText.replace('user_text', selText);
	}
	if(repText.indexOf('user_text')>=0 && this.hint){
		repText = repText.replace('user_text', this.hint);
	}
	editor.value = frontText + repText + endText;
	editor.selectionStart = ss;
	editor.selectionEnd   = ss + repText.length - 2;
	editor.scrollTop      = st;
	editor.focus();
}
function wikibar_editSelectAll(param){
  var editor = param.button.editor;
	editor.selectionStart = 0;
	editor.selectionEnd   = editor.value.length;
	editor.scrollTop      = 0;
	editor.focus();
}
function wikibar_doPreview(param){
  var theButton = param.button;
  var editor = param.button.editor;
  var wikibar = theButton.parentNode;
  if(!wikibar)  { return; }
  title = theButton.tiddlerTitle;
  var editorWrapper = wikibar_resolveTiddlerEditorWrapper(editor);
  var tiddlerWrapper = editorWrapper.parentNode;
  var previewer = document.getElementById('previewer'+title);
  if(previewer){
    previewer.parentNode.removeChild(previewer);
    editorWrapper.style.display = 'block';
    visible=true;
  }else{
    previewer = document.createElement('div');
    previewer.id = 'previewer'+title;
    previewer.className = 'viewer previewer';
    previewer.style.height = (editor.offsetHeight) + 'px';
    wikify(editor.value, previewer);
    tiddlerWrapper.insertBefore(previewer, editorWrapper);
    editorWrapper.style.display = 'none';
    visible=false;
  }
  var pv=null;
  for(var i=0; i<wikibar.childNodes.length; i++){
    try{
      var btn = wikibar.childNodes[i];
      if(btn.toolItem.key == 'preview'){ pv=btn; }
      if(btn.toolItem.key != 'preview'){
        btn.style.display = visible ? '': 'none';
      }
    }catch(ex){}
  }
  if(!pv) { return; }
  if(visible){
    pv.innerHTML = '<font face=\"verdana\">&infin;</font>';
    pv.title = 'preview current tiddler';
  }
  else{
    pv.innerHTML = '<font face=\"verdana\">&larr;</font>';
    pv.title = 'back to editor';
  }
}
function wikibar_doListAddons(param){
  clearMessage();
  var title = param.button.tiddlerTitle;
  var wikibarButton = document.getElementById('wikibarButton'+title);
  var ok=0, fail=0;
  for(var i=0; i<wikibarButton.addons.length; i++){
    var addon=wikibarButton.addons[i];
    if(addon.ok){
      displayMessage('[ o ] '+addon.name);
      ok++;
    }
    else{
      displayMessage('[ x ] '+addon.name + ': ' + addon.error);
      fail++;
    }
  }
  displayMessage('---------------------------------');
  displayMessage(ok + ' ok ; ' + fail + ' failed');
}
function wikibar_getColorCode(param){
  var cbOnPickColor = function(colorCode, param){
    param.params = colorCode;
    param.button.toolItem.doMore(param);
  };
  wikibarColorTool.openColorPicker(param.button, cbOnPickColor, param);
}
function wikibar_getLinkUrl(param){
  var url= prompt('Please enter the link target', (this.param? this.param : ''));
  if (url && url.trim().length>0){
    param.params = url;
    this.doMore(param);
  }
}
function wikibar_getTableRowCol(param){
  var rc= prompt('Please enter (rows x cols) of the table', '2 x 3');
  if (!rc || (rc.trim()).length<=0){ return; }
  var arr = rc.toUpperCase().split('X');
  if(arr.length != 2)   { return; }
  for(var i=0; i<arr.length; i++){
    if(isNaN(arr[i].trim()))  { return; }
  }
  var rows = parseInt(arr[0].trim(), 10);
  var cols = parseInt(arr[1].trim(), 10);
  var txtTable='';
  for(var r=0; r<rows; r++){
    for(var c=0; c<=cols; c++){
      if(c===0){
        txtTable += '|';
      }else{
        txtTable += ' |';
      }
    }
    txtTable += '\n';
  }
  if(txtTable.trim().length>0){
    param.params = txtTable.trim();
    this.doMore(param);
  }
}
function wikibar_getMacroParam(param){
  var p = prompt('Please enter the parameters of macro \"' + this.key + '\":' +
                 '\nSyntax: ' + this.syntax +
                 '\n\nNote: '+
                 '\n%1,%2,... - parameter needed'+
                 '\n[%1] - optional parameter'+
                 '\n%N   - more than one parameter(1~n)'+
                 '\n[%N] - any number of parameters(0~n)'+
                 '\n\nPS:'+
                 '\n1. Parameters should be seperated with space character'+
                 '\n2. Use \" to wrap the parameter that includes space character, ex: \"hello world\"'+
                 '\n3. Input the word(null) for the optional parameter ignored',
                 (this.param? this.param : '') );
  if(!p)  { return; }
  p=p.readMacroParams();
  for(var i=0; i<p.length; i++){
    var s=p[i].trim();
    if(s.indexOf(' ')>0){ p[i]="'"+s+"'"; }
    if(s.toLowerCase()=='null'){ p[i]=null; }
  }
  param.params = p;
  this.doMore(param);
}
function wikibar_getMorePalette(unused){
  clearMessage();
  displayMessage('Get more color palettes(*.gpl) from ColorZilla Palettes site', 'http:\/\/www.iosart.com/firefox/colorzilla/palettes.html');
  displayMessage('Save it as a new tiddler with \"ColorPalettes\" tag');
}
function wikibar_createWikibar(title){
  var theWikibar = document.getElementById('wikibar' + title);
  if(theWikibar){
    if(theWikibar.hasChildNodes()){
      theWikibar.style.display = (theWikibar.style.display=='block'? 'none':'block');
      return;
    }
  }
  var tiddlerWrapper = document.getElementById('tiddler'+title);
  var theTextarea = wikibar_resolveTiddlerEditor(tiddlerWrapper);
  if(!theTextarea){
    clearMessage();
    displayMessage('WikiBar only works in tiddler edit mode now');
    return;
  }else{
    if(!theTextarea.id){ theTextarea.id = 'editor'+title; }
    if(!theTextarea.parentNode.id){ theTextarea.parentNode.id='editorWrapper'+title;  }
  }
  if(theWikibar){
    theWikibar = document.getElementById('wikibar'+title);
  }else{
    var editorWrapper = wikibar_resolveTiddlerEditorWrapper(theTextarea);
    theWikibar = createTiddlyElement(tiddlerWrapper, 'div', 'wikibar'+title, 'toolbar');
    addClass(theWikibar, 'wikibar');
    var previewer = document.getElementById('previewer'+title);
    if(previewer){
      tiddlerWrapper.insertBefore(theWikibar, previewer);
    }else{
      tiddlerWrapper.insertBefore(theWikibar, editorWrapper);
    }
  }
  wikibar_createMenu(theWikibar,wikibarStore,title,theTextarea);
  if(config.options['chkWikibarSetEditorHeight'] && config.options['txtWikibarEditorRows']){
    theTextarea.rows = config.options['txtWikibarEditorRows'];
  }
  setStylesheet(
    '.wikibar{text-align:left;visibility:visible;margin:2px;padding:1px;}.previewer{overflow:auto;display:block;border:1px solid;}#colorPicker{position:absolute;display:none;z-index:10;margin:0px;padding:0px;}#colorPicker table{margin:0px;padding:0px;border:2px solid #000;border-spacing:0px;border-collapse:collapse;}#colorPicker td{margin:0px;padding:0px;border:1px solid;font-size:11px;text-align:center;cursor:auto;}#colorPicker .header{background-color:#fff;}#colorPicker .button{background-color:#fff;cursor:pointer;cursor:hand;}#colorPicker .button:hover{padding-top:3px;padding-bottom:3px;color:#fff;background-color:#136;}#colorPicker .cell{padding:4px;font-size:7px;cursor:crosshair;}#colorPicker .cell:hover{padding:10px;}.wikibarPopup{position:absolute;z-index:10;border:1px solid #014;color:#014;background-color:#cef;}.wikibarPopup table{margin:0;padding:0;border:0;border-spacing:0;border-collapse:collapse;}.wikibarPopup .button:hover{color:#eee;background-color:#014;}.wikibarPopup .disabled{color:#888;}.wikibarPopup .disabled:hover{color:#888;background-color:#cef;}.wikibarPopup tr .seperator hr{margin:0;padding:0;background-color:#cef;width:100%;border:0;border-top:1px dashed #014;}.wikibarPopup tr .icon{font-family:verdana;font-weight:bolder;}.wikibarPopup tr .marker{font-family:verdana;font-weight:bolder;}.wikibarPopup td{font-size:0.9em;padding:2px;}.wikibarPopup input{border:0;border-bottom:1px solid #014;margin:0;padding:0;font-family:arial;font-size:100%;background-color:#fff;}',
  	'WikiBarStyleSheet');
}
function wikibar_createMenu(place,toolset,title,editor){
  if(!wikibar_isValidMenuItem(toolset)){return;}
  if(!(toolset.TYPE=='MAIN_MENU' || toolset.TYPE=='MENU')){ return; }
    for(var key in toolset){
      if(key.substring(0,9)=='SEPERATOR'){
        wikibar_createMenuSeperator(place);
        continue;
      }
      if(key.substring(0,8)=='DYNAITEM'){
        var dynaTools = toolset[key](title,editor);
        if(dynaTools.TYPE && dynaTools.TYPE=='MENU'){
          wikibar_createMenuItem(place,dynaTools,null,editor,title);
        }else{
          dynaTools.TYPE = 'MENU';
          wikibar_createMenu(place, dynaTools, title, editor);
        }
        continue;
      }
      if((toolset[key].TYPE!='MENU' && toolset[key].TYPE!='MAIN_MENU') && !toolset[key].HANDLER){continue;}
      wikibar_createMenuItem(place,toolset,key,editor,title);
    }
}
function wikibar_createMenuItem(place,toolset,key,editor,title){
  if(!key){
    var tool = toolset;
  }else{
    tool = toolset[key];
    tool.key = key;
  }
  if(!wikibar_isValidMenuItem(tool)){return;}
  var toolIsOnMainMenu = (toolset.TYPE=='MAIN_MENU');
  var toolIsMenu = (tool.TYPE=='MENU');
  var theButton;
  if(toolIsOnMainMenu){
    theButton = createTiddlyButton(
                  place,
                  '',
                  (tool.TOOLTIP? tool.TOOLTIP : ''),
                  (toolIsMenu? wikibar_onClickMenuItem : wikibar_onClickItem),
                  'button');
    theButton.innerHTML = (tool.CAPTION? tool.CAPTION : key);
    theButton.isOnMainMenu = true;
    addClass(theButton, (toolIsMenu? 'menu' : 'item'));
  	place.appendChild( document.createTextNode('\n') );
    if(!toolIsMenu){
      if(config.options['chkWikibarPopmenuOnMouseOver']){
        theButton.onmouseover = function(e){ wikibarPopup.remove(); };
      }
    }
  }else{
    theButton=createTiddlyElement(place, 'tr',key,'button');
    theButton.title = (tool.TOOLTIP? tool.TOOLTIP : '');
    theButton.onclick = (toolIsMenu? wikibar_onClickMenuItem : wikibar_onClickItem);
    var tdL = createTiddlyElement(theButton, 'td','','marker');
    var td = createTiddlyElement(theButton, 'td');
    var tdR = createTiddlyElement(theButton, 'td','','marker');
    td.innerHTML = (tool.CAPTION? tool.CAPTION : key);
    if(toolIsMenu){
      tdR.innerHTML='&nbsp;&nbsp;&rsaquo;';
    }
    if(tool.SELECTED){
      tdL.innerHTML = '&radic; ';
      addClass(theButton, 'selected');
    }
    if(tool.DISABLED){
      addClass(theButton, 'disabled');
    }
  }
  theButton.tiddlerTitle = title;
  theButton.toolItem = tool;
  theButton.editor = editor;
  theButton.tabIndex = 999;
  if(toolIsMenu){
    if(config.options['chkWikibarPopmenuOnMouseOver']){
      theButton.onmouseover = wikibar_onClickMenuItem;
    }
  }
}
function wikibar_createMenuSeperator(place){
  if(place.id.substring(0,7)=='wikibar')  { return; }
  var onclickSeperator=function(e){
  	if(!e){ e = window.event; }
  	e.cancelBubble = true;
    if (e.stopPropagation){ e.stopPropagation();  }
  	return(false);
  };
  var theButton=createTiddlyElement(place,'tr','','seperator');
  var td = createTiddlyElement(theButton, 'td','','seperator');
  td.colSpan=3;
  theButton.onclick=onclickSeperator;
	td.innerHTML = '<hr>';
}
function wikibar_genWikibarAbout(){
  var toolset={};
  toolset.version = {
    CAPTION: '<center>WikiBar ' +
              config.macros.wikibar.major + '.' +
              config.macros.wikibar.minor + '.' +
              config.macros.wikibar.revision +
              (config.macros.wikibar.beta? ' beta '+config.macros.wikibar.beta : '') +
              '</center>',
    HANDLER: function(){}
  };
  toolset.SEPERATOR = {};
  toolset.author = {
    CAPTION: '<center>Arphen Lin<br>arphenlin@gmail.com</center>',
    TOOLTIP: 'send mail to the author',
    HANDLER: function(){ window.open('mailto:arphenlin@gmail.com'); }
  };
  toolset.website = {
    CAPTION: '<center>aiddlywiki.sourceforge.net</center>',
    TOOLTIP: 'go to the web site of WikiBar',
    HANDLER: function(){ window.open('http:\/\/aiddlywiki.sourceforge.net/'); }
  };
  return toolset;
}
function wikibar_genWikibarOptions(title, editor){
  var toolset={};
  toolset.popOnMouseOver = {
    CAPTION:'popup menu on mouse over',
    SELECTED: config.options['chkWikibarPopmenuOnMouseOver'],
    HANDLER: function(param){
      config.options['chkWikibarPopmenuOnMouseOver'] = !config.options['chkWikibarPopmenuOnMouseOver'];
      saveOptionCookie('chkWikibarPopmenuOnMouseOver');
      var title = param.button.tiddlerTitle;
      var wikibar = document.getElementById('wikibar'+title);
      if(wikibar){ wikibar.parentNode.removeChild(wikibar); }
      wikibar_createWikibar(title);
    }
  };
  toolset.setEditorSize = {
    CAPTION:'set editor height: <input id=\"txtWikibarEditorRows\" type=text size=1 MAXLENGTH=3 value=\"' +
            (config.options['txtWikibarEditorRows']? config.options['txtWikibarEditorRows']:editor.rows) + '\"> ok',
    HANDLER: function(param){
      var input = document.getElementById('txtWikibarEditorRows');
      if(input){
        var rows = parseInt(input.value, 10);
        if(!isNaN(rows)){
          var editor = param.button.editor;
          editor.rows = rows;
        }else{
          rows=config.maxEditRows;
        }
        config.options['txtWikibarEditorRows'] = rows;
        saveOptionCookie('txtWikibarEditorRows');
        config.maxEditRows = rows;
      }
    }
  };
  toolset.setEditorSizeOnLoadingWikibar = {
    CAPTION:'set editor height on loading wikibar',
    SELECTED: config.options['chkWikibarSetEditorHeight'],
    HANDLER: function(param){
      config.options['chkWikibarSetEditorHeight'] = !config.options['chkWikibarSetEditorHeight'];
      saveOptionCookie('chkWikibarSetEditorHeight');
      if(config.options['chkWikibarSetEditorHeight']){
        var rows = config.options['txtWikibarEditorRows'];
        if(!isNaN(rows)){ rows = 15; }
        var editor = param.button.editor;
        editor.rows = rows;
        config.options['txtWikibarEditorRows'] = rows;
        saveOptionCookie('txtWikibarEditorRows');
      }
    }
  };
  toolset.SEPERATOR = {};
  toolset.update = {
    CAPTION: 'check for updates',
    DISABLED: true,
    HANDLER: function(){}
  };
  return toolset;
}
function wikibar_genPaletteSelector(){
  try{
  	var cpTiddlers = store.getTaggedTiddlers('ColorPalettes');
  	if(!cpTiddlers) { return; }
  	var palettes=[];
  	palettes.push(wikibarColorTool.defaultPaletteName);
  	for(var i=0; i<cpTiddlers.length; i++){
  		palettes.push(cpTiddlers[i].title.trim());
  	}
    var toolset={};
    for(i=0; i<palettes.length; i++){
      toolset[palettes[i]] = {
        TOOLTIP: palettes[i],
        SELECTED: (palettes[i]==wikibarColorTool.paletteName),
        HANDLER: wikibar_doSelectPalette
      };
    }
    return toolset;
  }catch(ex){ return null; }
}
function wikibar_onClickItem(e){
	if(!e){ e = window.event; }
	var theTarget = resolveTarget(e);
	if(theTarget.tagName=='INPUT'){
    e.cancelBubble = true;
    if (e.stopPropagation){ e.stopPropagation(); }
    return;
	}
	var theButton = wikibar_resolveTargetButton(theTarget);
	if(!theButton){ return(false);  }
  	var o = theButton.toolItem;
    if(!o) { return; }
    var param = {
      event: e,
      button: theButton
    };
    if(o.HANDLER){ o.HANDLER(param);  }
  if(o.DISABLED){
    e.cancelBubble = true;
    if (e.stopPropagation){ e.stopPropagation(); }
  }
	return(false);
}
function wikibar_onClickMenuItem(e){
	if(!e){ e = window.event; }
	var theButton = wikibar_resolveTargetButton(resolveTarget(e));
	if(!theButton){ return(false);  }
	e.cancelBubble = true;
	if (e.stopPropagation){ e.stopPropagation(); }
    var title = theButton.tiddlerTitle;
    var editor = theButton.editor;
    var tool = theButton.toolItem;
    if(!tool) { return; }
    var popup = wikibarPopup.create(this);
  	if(popup){
      wikibar_createMenu(popup,tool,title,editor);
      if(!popup.hasChildNodes()){
        wikibarPopup.remove();
      }else{
        wikibarPopup.show(popup, false);
      }
    }
	return(false);
}
var wikibarColorTool = {
  defaultPaletteName : 'default',
  defaultColumns : 16,
  defaultPalette : [
    '#FFF','#DDD','#CCC','#BBB','#AAA','#999','#666','#333','#111','#000','#FC0','#F90','#F60','#F30','#C30','#C03',
    '#9C0','#9D0','#9E0','#E90','#D90','#C90','#FC3','#FC6','#F96','#F63','#600','#900','#C00','#F00','#F36','#F03',
    '#CF0','#CF3','#330','#660','#990','#CC0','#FF0','#C93','#C63','#300','#933','#C33','#F33','#C36','#F69','#F06',
    '#9F0','#CF6','#9C3','#663','#993','#CC3','#FF3','#960','#930','#633','#C66','#F66','#903','#C39','#F6C','#F09',
    '#6F0','#9F6','#6C3','#690','#996','#CC6','#FF6','#963','#630','#966','#F99','#F39','#C06','#906','#F3C','#F0C',
    '#3F0','#6F3','#390','#6C0','#9F3','#CC9','#FF9','#C96','#C60','#C99','#F9C','#C69','#936','#603','#C09','#303',
    '#0C0','#3C0','#360','#693','#9C6','#CF9','#FFC','#FC9','#F93','#FCC','#C9C','#969','#939','#909','#636','#606',
    '#060','#3C3','#6C6','#0F0','#3F3','#6F6','#9F9','#CFC','#9CF','#FCF','#F9F','#F6F','#F3F','#F0F','#C6C','#C3C',
    '#030','#363','#090','#393','#696','#9C9','#CFF','#39F','#69C','#CCF','#C9F','#96C','#639','#306','#90C','#C0C',
    '#0F3','#0C3','#063','#396','#6C9','#9FC','#9CC','#06C','#369','#99F','#99C','#93F','#60C','#609','#C3F','#C0F',
    '#0F6','#3F6','#093','#0C6','#3F9','#9FF','#699','#036','#039','#66F','#66C','#669','#309','#93C','#C6F','#90F',
    '#0F9','#6F9','#3C6','#096','#6FF','#6CC','#366','#069','#36C','#33F','#33C','#339','#336','#63C','#96F','#60F',
    '#0FC','#6FC','#3C9','#3FF','#3CC','#399','#033','#39C','#69F','#00F','#00C','#009','#006','#003','#63F','#30F',
    '#0C9','#3FC','#0FF','#0CC','#099','#066','#3CF','#6CF','#09C','#36F','#0CF','#09F','#06F','#03F','#03C','#30C'
  ],
	colorPicker : null,
  pickColorHandler: null,
  userData: null
};
wikibarColorTool.paletteName = wikibarColorTool.defaultPaletteName;
wikibarColorTool.columns = wikibarColorTool.defaultColumns;
wikibarColorTool.palette = wikibarColorTool.defaultPalette;
wikibarColorTool.onPickColor = function(e){
	if (!e){ e = window.event; }
	var theCell = resolveTarget(e);
	if(!theCell){ return(false); }
    color = theCell.bgColor.toLowerCase();
    if(!color)  { return; }
    wikibarColorTool.displayColorPicker(false);
    if(wikibarColorTool.pickColorHandler){
      wikibarColorTool.pickColorHandler(color, wikibarColorTool.userData);
    }
	return(false);
};
wikibarColorTool.onMouseOver = function(e){
	if (!e){ e = window.event; }
	var theButton = resolveTarget(e);
	if(!theButton){ return(false);  }
  	if(!wikibarColorTool)  { return; }
    color = theButton.bgColor.toUpperCase();
    if(!color)  { return; }
    td=document.getElementById('colorPickerInfo');
  	if(!td) { return; }
  	td.bgColor = color;
  	td.innerHTML = '<span style=\"color:#000;\">'+color+'</span>&nbsp;&nbsp;&nbsp;' +
  	               '<span style=\"color:#fff;\">'+color+'</span>';
	e.cancelBubble = true;
	if (e.stopPropagation){ e.stopPropagation(); }
	return(false);
};
wikibarColorTool.openColorPicker = function(theTarget, pickColorHandler, userData){
  wikibarColorTool.skipClickDocumentEvent = true;
  wikibarColorTool.pickColorHandler = pickColorHandler;
  wikibarColorTool.userData = userData;
  wikibarColorTool.moveColorPicker(theTarget);
};
wikibarColorTool.convert3to6HexColor = function(c){
  c=c.trim();
  var rx=/^\#(\d|[a-f])(\d|[a-f])(\d|[a-f])$/gi;
  return (rx.test(c)? c.replace(rx, '#$1$1$2$2$3$3') : c);
};
wikibarColorTool.numToHexColor = function (n){
  if(typeof(n)=='number' && (n>=0 && n<=255)) {
  		s = n.toString(16).toLowerCase();
  		return ((s.length==1)? '0'+s : s);
  }else{
	 return null;
	}
};
wikibarColorTool.renderColorPalette = function(){
	if(wikibarColorTool.paletteName==wikibarColorTool.defaultPaletteName){
		wikibarColorTool.palette=wikibarColorTool.defaultPalette;
		wikibarColorTool.columns=wikibarColorTool.defaultColumns;
		return;
	}
	tiddlerText = (store.getTiddlerText(wikibarColorTool.paletteName, '')).trim();
	if(tiddlerText.length<=0) { return; }
	var cpContents = tiddlerText.split('\n');
	var colors=[];
	columns = wikibarColorTool.defaultColumns;
	var tmpArray=null;
	errCount=0;
	for(var i=0; i<cpContents.length; i++){
		cpLine=cpContents[i].trim();
    if( (!cpLine) || (cpLine.length<=0) || (cpLine.charAt(0) == '#') ){ continue; }
		if(cpLine.substring(0,8).toLowerCase()=='columns:'){
			tmpArray = cpLine.split(':');
			try{
				columns = parseInt(tmpArray[1],10);
			}catch(ex){
				columns = wikibarColorTool.defaultColumns;
			}
		}else{
			tmpArray = cpLine.replace('\t', ' ').split(/[ ]{1,}/);
			try{
				color='';
				for(var j=0; j<3; j++){
          c=parseInt(tmpArray[j].trim(), 10);
          if(isNaN(c)){
						break;
          }else{
						c=wikibarColorTool.numToHexColor(c);
						if(!c) {break;}
            color+=c;
					}
				}
				if(color.length==6){
					colors.push('#'+color);
				}	else {
					throw 'error';
				}
			}catch(ex){
			}
		}
	}
	if(colors.length>0){
		wikibarColorTool.palette = colors;
		wikibarColorTool.columns = columns;
	}else{
		throw 'renderColorPalette(): No color defined in the palette.';
	}
};
wikibarColorTool.displayColorPicker = function(visible){
  if(wikibarColorTool.colorPicker){
    wikibarColorTool.colorPicker.style.display = (visible? 'block' : 'none');
  }
};
wikibarColorTool.moveColorPicker = function(theTarget){
  if(!wikibarColorTool.colorPicker){
  	wikibarColorTool.createColorPicker();
  }
	var cp = wikibarColorTool.colorPicker;
	var rootLeft = findPosX(theTarget);
  var rootTop = findPosY(theTarget);
  var popupLeft = rootLeft;
  var popupTop = rootTop;
  var popupWidth = cp.offsetWidth;
  var winWidth = findWindowWidth();
  if(popupLeft + popupWidth > winWidth){
	  popupLeft = winWidth - popupWidth;
	}
  cp.style.left = popupLeft + 'px';
  cp.style.top = popupTop + 'px';
  wikibarColorTool.displayColorPicker(true);
};
wikibarColorTool.createColorPicker = function(unused, palette){
  if(palette){	wikibarColorTool.paletteName=palette; }
	wikibarColorTool.renderColorPalette();
	wikibarColorTool.colorPicker = document.createElement('div');
	wikibarColorTool.colorPicker.id = 'colorPicker';
	document.body.appendChild(wikibarColorTool.colorPicker);
  var theTable = document.createElement('table');
  wikibarColorTool.colorPicker.appendChild(theTable);
  var theTR = document.createElement('tr');
	theTable.appendChild(theTR);
	var theTD = document.createElement('td');
	theTD.className = 'header';
	theTD.colSpan = wikibarColorTool.columns;
	theTD.innerHTML = wikibarColorTool.paletteName;
  theTR.appendChild(theTD);
  for(var i=0; i<wikibarColorTool.palette.length; i++){
    if((i%wikibarColorTool.columns)===0){
      theTR = document.createElement('tr');
      theTable.appendChild(theTR);
    }
    theTD = document.createElement('td');
    theTD.className = 'cell';
    theTD.bgColor = wikibarColorTool.convert3to6HexColor(wikibarColorTool.palette[i]);
    theTD.onclick = wikibarColorTool.onPickColor;
    theTD.onmouseover = wikibarColorTool.onMouseOver;
    theTR.appendChild(theTD);
  }
  rest = wikibarColorTool.palette.length % wikibarColorTool.columns;
  if(rest>0){
    theTD = document.createElement('td');
		theTD.colSpan = wikibarColorTool.columns-rest;
    theTD.bgColor = '#000000';
    theTR.appendChild(theTD);
  }
  theTR = document.createElement('tr');
	theTable.appendChild(theTR);
	theTD = document.createElement('td');
	theTD.colSpan = wikibarColorTool.columns;
	theTD.id = 'colorPickerInfo';
  theTR.appendChild(theTD);
};
wikibarColorTool.onDocumentClick = function(e){
	if (!e){ e = window.event; }
	if(wikibarColorTool.skipClickDocumentEvent) {
	  wikibarColorTool.skipClickDocumentEvent = false;
    return true;
	}
	if((!e.eventPhase) || e.eventPhase == Event.BUBBLING_PHASE || e.eventPhase == Event.AT_TARGET){
    wikibarColorTool.displayColorPicker(false);
  }
	return true;
};
function wikibar_doSelectPalette(param){
	clearMessage();
	var theButton = param.button;
	if(!theButton.toolItem.key)  { return; }
	var palette = theButton.toolItem.key;
	var oldPaletteName = wikibarColorTool.paletteName;
	if(oldPaletteName != palette){
		try{
			wikibarColorTool.createColorPicker(theButton, palette);
			displayMessage('Palette \"'+palette+'\" ('+ wikibarColorTool.palette.length +' colors) is selected');
		}catch(ex){
			errMsg = ex;
			if(errMsg.substring(0,18)=='renderColorPalette'){
				displayMessage('Invalid palette \"' + palette + '\", please check it out!');
				wikibarColorTool.createColorPicker(theButton, oldPaletteName);
			}
		}
	}
}
var wikibarPopup = {
  skipClickDocumentEvent: false,
	stack: []
};
wikibarPopup.resolveRootPopup = function(o){
  if(o.isOnMainMenu){  return null; }
  if(o.className.substring(0,12)=='wikibarPopup'){  return o;}
  return wikibarPopup.resolveRootPopup(o.parentNode);
};
wikibarPopup.create = function(root){
  for(var i=0; i<wikibarPopup.stack.length; i++){
    var p=wikibarPopup.stack[i];
    if(p.root==root){
      wikibarPopup.removeFrom(i+1);
      return null;
    }
  }
  var rootPopup = wikibarPopup.resolveRootPopup(root);
  if(!rootPopup){
    wikibarPopup.remove();
  }else{
    wikibarPopup.removeFromRootPopup(rootPopup);
  }
	var popup = createTiddlyElement(document.body,'div','wikibarPopup'+root.toolItem.key,'wikibarPopup');
	var pop = createTiddlyElement(popup,'table','','');
	wikibarPopup.stack.push({rootPopup: rootPopup, root: root, popup: popup});
	return pop;
};
wikibarPopup.show = function(unused,slowly){
	var curr = wikibarPopup.stack[wikibarPopup.stack.length-1];
	var overlayWidth = 1;
  var rootLeft, rootTop, rootWidth, rootHeight, popupLeft, popupTop, popupWidth;
  if(curr.rootPopup){
  	rootLeft = findPosX(curr.rootPopup);
  	rootTop = findPosY(curr.root);
  	rootWidth = curr.rootPopup.offsetWidth;
  	popupLeft = rootLeft + rootWidth - overlayWidth;
  	popupTop = rootTop;
  }else{
  	rootLeft = findPosX(curr.root);
  	rootTop = findPosY(curr.root);
  	rootHeight = curr.root.offsetHeight;
  	popupLeft = rootLeft;
  	popupTop = rootTop + rootHeight;
  }
	var winWidth = findWindowWidth();
	popupWidth = curr.popup.offsetWidth;
	if(popupLeft + popupWidth > winWidth){
		popupLeft = rootLeft - popupWidth + overlayWidth;
	}
	curr.popup.style.left = popupLeft + 'px';
	curr.popup.style.top = popupTop + 'px';
	curr.popup.style.display = 'block';
	addClass(curr.root, 'highlight');
	if(config.options.chkAnimate){
		anim.startAnimating(new Scroller(curr.popup,slowly));
	}else{
		window.scrollTo(0,ensureVisible(curr.popup));
	}
};
wikibarPopup.remove = function(){
	if(wikibarPopup.stack.length > 0){
		wikibarPopup.removeFrom(0);
  }
};
wikibarPopup.removeFrom = function(from){
	for(var t=wikibarPopup.stack.length-1; t>=from; t--){
		var p = wikibarPopup.stack[t];
		removeClass(p.root,'highlight');
		p.popup.parentNode.removeChild(p.popup);
  }
	wikibarPopup.stack = wikibarPopup.stack.slice(0,from);
};
wikibarPopup.removeFromRootPopup = function(from){
  for(var t=0; t<wikibarPopup.stack.length; t++){
    var p = wikibarPopup.stack[t];
    if(p.rootPopup==from){
      wikibarPopup.removeFrom(t);
      break;
    }
  }
};
wikibarPopup.onDocumentClick = function(e){
	if (!e){ e = window.event; }
	if(wikibarPopup.skipClickDocumentEvent){
	 wikibarPopup.skipClickDocumentEvent=false;
	 return true;
	}
	if((!e.eventPhase) || e.eventPhase == Event.BUBBLING_PHASE || e.eventPhase == Event.AT_TARGET){
		wikibarPopup.remove();
	}
	return true;
};
var wikibarStore = {
  TYPE: 'MAIN_MENU',
  help:{
    TYPE:'MENU',
    CAPTION: '<font face=\"verdana\">?</font>',
    TOOLTIP:     'about WikiBar',
    options:{
      TYPE:'MENU',
      DYNAITEM: wikibar_genWikibarOptions
    },
    about:{
      TYPE:'MENU',
      DYNAITEM: wikibar_genWikibarAbout
    }
  },
  preview:{
    TOOLTIP:     'preview this tiddler',
    CAPTION: '<font face=\"verdana\">&infin;</font>',
    HANDLER: wikibar_doPreview
  },
	line:{
		TOOLTIP:    'horizontal line',
		CAPTION: '<font face=\"verdana\">&mdash;</font>',
		syntax: '\n----\n',
		HANDLER: wikibar_editFormatByCursor
	},
	crlf:{
		TOOLTIP:    'new line',
		CAPTION: '<font face=\"verdana\">&para;</font>',
		syntax: '\n',
		HANDLER: wikibar_editFormatByCursor
	},
	selectAll:{
		TOOLTIP:    'select all',
		CAPTION: '<font face=\"verdana\">&sect;</font>',
		HANDLER: wikibar_editSelectAll
	},
	deleteSelected:{
		TOOLTIP:    'delete selected',
		CAPTION: '<font face=\"verdana\">&times;</font>',
		syntax: '',
		HANDLER: wikibar_editFormat
	},
  textFormat:{
    TYPE: 'MENU',
    CAPTION: 'text',
    TOOLTIP: 'text formatters',
    ignore:{
			TOOLTIP:     'ignore wiki word',
			CAPTION: 'ignore wikiWord',
			syntax:  '~user_text',
			hint:    'wiki_word',
			HANDLER:    wikibar_editFormatByWord
		},
		bolder:{
			TOOLTIP:     'bolder text',
			CAPTION: '<strong>bolder</strong>',
			syntax:  "''user_text''",
			hint:		 'bold_text',
			HANDLER:    wikibar_editFormatByWord
		},
		italic:{
			TOOLTIP:    'italic text',
			CAPTION: '<em>italic</em>',
			syntax: '\/\/user_text\/\/',
			hint:		'italic_text',
			HANDLER: wikibar_editFormatByWord
		},
		underline:{
			TOOLTIP:    'underline text',
			CAPTION: '<u>underline</u>',
			syntax: '__user_text__',
			hint:		'underline_text',
			HANDLER: wikibar_editFormatByWord
		},
		strikethrough:{
			TOOLTIP:    'strikethrough text',
			CAPTION: '<strike>strikethrough</strike>',
			syntax: '==user_text==',
			hint:		'strikethrough_text',
			HANDLER: wikibar_editFormatByWord
		},
		superscript:{
			TOOLTIP:    'superscript text',
			CAPTION: 'X<sup>superscript</sup>',
			syntax: '^^user_text^^',
			hint:		'superscript_text',
			HANDLER: wikibar_editFormatByWord
		},
		subscript:{
			TOOLTIP:    'subscript text',
			CAPTION: 'X<sub>subscript</sub>',
			syntax: '~~user_text~~',
			hint:		'subscript_text',
			HANDLER: wikibar_editFormatByWord
		},
		comment:{
			TOOLTIP:    'comment text',
			CAPTION: 'comment text',
			syntax: '/%user_text%/',
			hint:		'comment_text',
			HANDLER: wikibar_editFormatByWord
		},
		monospaced:{
			TOOLTIP:    'monospaced text',
			CAPTION: '<code>monospaced</code>',
			syntax: '{{{user_text}}}',
			hint:		'monospaced_text',
			HANDLER: wikibar_editFormatByWord
		}
  },
  paragraph:{
    TYPE: 'MENU',
    TOOLTIP: 'paragarph formatters',
    list:{
      TYPE: 'MENU',
      TOOLTIP: 'list tools',
      bullet:{
  			TOOLTIP:    'bullet point',
  			syntax: '*user_text',
  			hint:		'bullet_text',
  			HANDLER: wikibar_editFormatByLine
  		},
  		numbered:{
  			TOOLTIP:    'numbered list',
  			syntax: '#user_text',
  			hint:		'numbered_text',
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    heading:{
      TYPE: 'MENU',
      heading1:{
  		  CAPTION:'<h1>Heading 1</h1>',
  			TOOLTIP:    'Heading 1',
  			syntax: '!user_text',
  			hint:		'heading_1',
  			HANDLER: wikibar_editFormatByLine
  		},
  		heading2:{
  		  CAPTION:'<h2>Heading 2<h2>',
  			TOOLTIP:    'Heading 2',
  			syntax: '!!user_text',
  			hint:		'heading_2',
  			HANDLER: wikibar_editFormatByLine
  		},
  		heading3:{
  		  CAPTION:'<h3>Heading 3</h3>',
  			TOOLTIP:    'Heading 3',
  			syntax: '!!!user_text',
  			hint:		'heading_3',
  			HANDLER: wikibar_editFormatByLine
  		},
  		heading4:{
  		  CAPTION:'<h4>Heading 4</h4>',
  			TOOLTIP:    'Heading 4',
  			syntax: '!!!!user_text',
  			hint:		'heading_4',
  			HANDLER: wikibar_editFormatByLine
  		},
  		heading5:{
  		  CAPTION:'<h5>Heading 5</h5>',
  			TOOLTIP:    'Heading 5',
  			syntax: '!!!!!user_text',
  			hint:		'heading_5',
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    comment:{
      TYPE: 'MENU',
      commentByLine:{
  			CAPTION:'comment by line',
  			TOOLTIP:    'line comment',
  			syntax: '/%user_text%/',
  			hint:		'comment_text',
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByBlock:{
  			CAPTION:'comment by block',
  			TOOLTIP:    'block comment',
  			syntax: '/%\nuser_text\n%/',
  			hint:		'comment_text',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    monospaced:{
      TYPE: 'MENU',
  		monosByLine:{
  			CAPTION: 	'monospaced by line',
  			TOOLTIP:    'line monospaced',
  			syntax: '{{{\nuser_text\n}}}',
  			hint:		'monospaced_text',
  			HANDLER: wikibar_editFormatByLine
  		},
  		monosByBlock:{
  			CAPTION: 	'monospaced by block',
  			TOOLTIP:    'block monospaced',
  			syntax: '{{{\nuser_text\n}}}',
  			hint:		'monospaced_text',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    quote:{
      TYPE: 'MENU',
  		quoteByLine:{
  			CAPTION: 	'quote by line',
  			TOOLTIP:    'line quote',
  			syntax: '>user_text',
  			hint:		'quote_text',
  			HANDLER: wikibar_editFormatByLine
  		},
  		quoteByBlcok:{
  			CAPTION: 	'quote by block',
  			TOOLTIP:    'block quote',
  			syntax: '<<<\nuser_text\n<<<',
  			hint:		'quote_text',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    plugin:{
      TYPE: 'MENU',
      code:{
  			CAPTION: 	'code area',
  			TOOLTIP:    'block monospaced for plugin',
  			syntax: '\n\/\/{{{\nuser_text\n\/\/}}}\n',
  			hint:		'monospaced_plugin_code',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByLine:{
  			CAPTION: 	'comment by line',
  			TOOLTIP:    'line comment',
  			syntax: '\/\/user_text',
  			hint:		'plugin_comment',
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByBlock:{
  			CAPTION: 	'comment by block',
  			TOOLTIP:    'block comment',
  			syntax: '\/\***\nuser_text\n***\/',
  			hint:		'plugin_comment',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    },
    css:{
      TYPE: 'MENU',
      code:{
  			CAPTION: 	'code area',
  			TOOLTIP:    'block monospaced for css',
  			syntax: '\n\nuser_text\n\n',
  			hint:		'monospaced_css_code',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByLine:{
  			CAPTION: 	'comment by line',
  			TOOLTIP:    'line comment',
  			syntax: '',
  			hint:		'css_comment',
  			HANDLER: wikibar_editFormatByLine
  		},
  		commentByBlock:{
  			CAPTION: 	'comment by block',
  			TOOLTIP:    'block comment',
  			syntax: '',
  			hint:		'css_comment',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    }
  },
  color:{
    TYPE: 'MENU',
    TOOLTIP: 'color tools',
    highlight:{
		  CAPTION:'highlight text',
			TOOLTIP:    'highlight text',
			syntax: '@@user_text@@',
			hint:		'highlight_text',
			HANDLER: wikibar_editFormatByWord
		},
		color:{
		  CAPTION:'text color',
			TOOLTIP:    'text color',
			hint:		'your_text',
			syntax: '@@color(%1):user_text@@',
			HANDLER:   wikibar_getColorCode,
			doMore: wikibar_editFormatByWord
		},
		bgcolor:{
		  CAPTION:'background color',
			TOOLTIP:    'background color',
			hint:		'your_text',
			syntax: '@@bgcolor(%1):user_text@@',
			HANDLER: wikibar_getColorCode,
			doMore: wikibar_editFormatByWord
		},
		colorcode:{
      CAPTION:'color code',
      TOOLTIP:    'insert color code',
      syntax: '%1',
      HANDLER: wikibar_getColorCode,
      doMore: wikibar_editFormatByCursor
    },
    'color palette':{
      TYPE:'MENU',
      DYNAITEM: wikibar_genPaletteSelector,
  		SEPERATOR:{},
  		morePalette:{
  		  CAPTION:'more palettes',
  		  TOOLTIP:'get more palettes',
  		  HANDLER: wikibar_getMorePalette
  		}
    }
  },
  link:{
    TYPE: 'MENU',
    TOOLTIP: 'insert link',
    wiki:{
		  CAPTION:'wiki link',
			TOOLTIP:    'wiki link',
			syntax: '[[user_text]]',
			hint:		'wiki_word',
			HANDLER: wikibar_editFormatByWord
		},
		pretty:{
			CAPTION: 	'pretty link',
			TOOLTIP:    'pretty link',
			syntax: '[[user_text|%1]]',
			hint:		'pretty_word',
			param:	'PrettyLink Target',
			HANDLER:   wikibar_getLinkUrl,
			doMore: wikibar_editFormatByWord
		},
		url:{
			TOOLTIP:    'url link',
			syntax: '[[user_text|%1]]',
			hint:		'your_text',
			param:	'http:\/\/...',
			HANDLER:   wikibar_getLinkUrl,
			doMore: wikibar_editFormatByWord
		},
		image:{
			TOOLTIP:    'image link',
			syntax: '[img[user_text|%1]]',
			hint:		'alt_text',
			param:	'image/icon.jpg',
			HANDLER:   wikibar_getLinkUrl,
			doMore: wikibar_editFormatByWord
		}
  },
  macro:{},
  more:{
    TYPE: 'MENU',
    TOOLTIP: 'more tools',
    table:{
      TYPE: 'MENU',
      TOOLTIP: 'table',
      table:{
  		  CAPTION:'create table',
  			TOOLTIP:    'create a new table',
  			syntax: '\n%1\n',
  			HANDLER: wikibar_getTableRowCol,
  			doMore: wikibar_editFormatByWord
  		},
  		header:{
  			TOOLTIP:    'table header text',
  			syntax: '|user_text|c',
  			hint:		'table_header',
  			HANDLER: wikibar_editFormatByWord
  		},
  		cell:{
  			TOOLTIP:    'create a tabel cell',
  			syntax: '|user_text|',
  			hint:		'your_text',
  			HANDLER: wikibar_editFormatByWord
  		},
  		columnHeader:{
  		  CAPTION:'column header',
  			TOOLTIP:    'create a column header cell',
  			syntax: '|!user_text|',
  			hint:		'column_header',
  			HANDLER: wikibar_editFormatByWord
  		},
  	  cell:{
  	    TYPE: 'MENU',
        CAPTION: 'cell options',
    		bgcolor:{
    			CAPTION: 	'background color',
    			TOOLTIP:    'cell bgcolor',
    			syntax: '|bgcolor(%1):user_text|',
    			hint:		'your_text',
    			HANDLER: wikibar_getColorCode,
    			doMore: wikibar_editFormatByTableCell
    		},
    		alignLeft:{
    			CAPTION: 	'align left',
    			TOOLTIP:    'left align cell text',
    			syntax: '|user_text|',
    			hint:		'your_text',
    			HANDLER: wikibar_editFormatByTableCell
    		},
    		alignCenter:{
    			CAPTION: 	'align center',
    			TOOLTIP:    'center align cell text',
    			syntax: '| user_text |',
    			hint:		'your_text',
    			HANDLER: wikibar_editFormatByTableCell
    		},
    		alignRight:{
    			CAPTION: 	'align right',
    			TOOLTIP:    'right align cell text',
    			syntax: '| user_text|',
    			hint:		'your_text',
    			HANDLER: wikibar_editFormatByTableCell
    		}
    	}
    },
    html:{
      TYPE: 'MENU',
      html:{
  			CAPTION: 	'<html>',
  			TOOLTIP:    'html tag',
  			syntax: '<html>\nuser_text\n</html>',
  			hint:		'html_content',
  			byBlock: true,
  			HANDLER: wikibar_editFormatByLine
  		}
    }
  },
  addon:{
    TYPE: 'MENU',
    TOOLTIP:'3rd party tools',
    'about addons':{
      TOOLTIP: 'list loaded addons',
      HANDLER: wikibar_doListAddons
    },
    SEPERATOR:{}
  }
};
addEvent(document, 'click', wikibarColorTool.onDocumentClick);
addEvent(document, 'click', wikibarPopup.onDocumentClick);
wikibar_install();
//}}}
与crontab不同。这个是@@color(#ff3333):执行完就自动删除@@的,时间格式更加灵活。
{{{
$●  at 22:39 today
warning: commands will be executed using /bin/sh
at> /usr/local/bin/msg 测试
at> <EOT>	← Ctrl-D结束	
job 7 at Thu May 24 22:39:00 2007
}}}
使用''atq'' (at -''l'') 检查下。可以''atrm'' 7 (at -''d'' 7) 删除。
{{{
$●  atq
7       Thu May 24 22:39:00 2007 a exp
}}}
如果提示没atd的服务。{{{Can't open /var/run/atd.pid to signal atd. No atd running?}}}
{{{
sudo /etc/init.d/atd start
}}}
老不记得,bc只能操作文件。
{{{
echo 58*7.7|bc
}}}

使用系统的crontab提醒工作还是比较方便的,而且用户都是直接使用自己的计划表文件。如下命令,先编辑添加,后面查看安排。
{{{
$● crontab -e 
$● crontab -l 
# m h dom mon dow command 
11 20 * * * export DISPLAY=:0 && /usr/bin/gqview
}}}
@@color(blue):''export DISPLAY=:0 &&''@@是关键。

为了方便提醒,作了个bash。
{{{
$●  cat msg
#!/bin/bash

aplay /home/exp/媒体/事件声音/Auf-wiedersehen.wav
export DISPLAY=:0 && zenity --info --title="计划任务" --text="""$*"""
}}}
这样就可以方便的使用提醒功能。比如,每天晚上9:30作什么。
{{{
30 21 * * * /usr/local/bin/msg 查看网络日志
}}}
//只是这crontab的执行部分,必须指定全路径。这点麻烦。//
@@color(#cc0000):''录像''@@,很小的文件,保存在当前模式目录下的demos目录。还要找方法,转录成avi或者其他的。
命令是''autorecord(F12)/stoprecord''。
{{{
$●  find ~/.etwolf -name *.dm_84
./noquarter/demos/2006-11-22-021424-rfarm_b1.dm_84
./etpro/demos/2007-05-14-163353-goldrush.dm_84
./jaymod/demos/2007-03-06-221201-oasis.dm_84
./jaymod/demos/2007-05-18-111933-mlb_daybreak.dm_84
}}}

@@color(#ff3333):''截图''@@,也是不同模式下的screenshots目录。命令是screenshot(JPEG)。
{{{
$●  find ~/.etwolf/ -name *.tga
/home/exp/.etwolf/jaymod/screenshots/shot0000.tga
}}}
festival 自带了一个text2wave。专门作录音的。
{{{
echo "Manipulate EPROM load files" | text2wave -o  tts.wav
}}}
!鼠标选择文字,执行此CLI,xclip取得所选文字,使用festival读出来。
{{{
$●  cat /usr/local/bin/festival-xclip
#!/bin/bash
xclip -o | festival --tts
}}}
老早的笔记。
# /etc/fstab: static file system information. 
# 
# <file system> <mount point> <type> <options> <dump> <pass> 
proc /proc proc defaults 0 0 
/dev/hda3 / reiserfs notail 0 1 
/dev/hda2 /home ext3 defaults 0 2 
/dev/hda4 none swap sw 0 0 
/dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0 
/dev/sda /media/usb0 auto rw,user,noauto 0 0 
/dev/hda1 /media/win_c ntfs nls=utf8,umask=0222 0 0 
/dev/hda5 /media/win_d ntfs nls=utf8,umask=0222 0 0 
/dev/hda6 /media/win_e vfat utf8,umask=000 0 0 
LABEL=USB-FAT /media/USB-FAT vfat rw,user,utf8,auto,sync,umask=0 0 0 
LABEL=USB-EXT3 /media/USB-EXT3 ext3 rw,user,auto,sync 0 0 

#sync:所有IO操作都要同步。 
#LABEL=:使用卷标指向磁盘。 

//SERVER/共享目录 /media/服务器下共享目录 smbfs uid=1000,iocharset=utf8,codepage=cp936 0 0
[img[1|./pic/fvwm1.png]]
[img[2|./pic/fvwm2.png]]
21:09:40-exp~/项目/Digital-Pad/src$●  pkg-config --libs gtk+-2.0-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0 -lcairo -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 

21:09:55-exp~/项目/Digital-Pad/src$●  pkg-config --cflags gtk+-2.0-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  

gcc -Wall -g callbacks.c `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0`
|!depth|!640x480|!800x600|!1024x768|!1280x1024|
|8bit|769|771| 773|775|
|15bit|784|787|790|793|
|16bit|785|788|791|794|
|24bit|786|789|792|795|
保留颜色语法高亮是最重要的。要不vim的html输出就没意义了。

先建立一个html2wiki.sed
{{{
s/<a href="/[[/g
s/">http/|http/g
s/<\/a>/]]/g

s/<font \|<\/font>/@@/g
s/color="/color(/g
s/">/):/g

/<pre>\|<\/pre>/ d
/<body\|<\/body>/ d
/<html>\|<\/html>/ d
/<head>\|<\/head>/ d
/<meta/ d

s/<title>/!!/g
s/<\/title>//g

s/\/\//\/ \//g
s/<b>\|<\/b>\|<B>\|<\/B>/''/g
#&amp;><"
s/\t/>/g
#s/^ */>/g
s/ \{8\}/>/g
}}}
然后,建立一个bash。
{{{
$●  cat '/home/exp/应用/脚本/html2wiki.bash' 
#!/bin/bash 

vim -c ":syntax on|:colorscheme morning|:TOhtml" -c ":w|:qa" $1 

file $1.html|grep HTML 
[ $? != 0 ] && exit; 
sed -f ~/应用/脚本/html2wiki.sed $1.html>$1.wiki
}}}
直接这样运行。
{{{
$●  html2wiki.bash 4428.c
}}}
得到的wiki文件,可以直接粘贴到tiddlywiki的编辑里面。如下图
[img[html2wiki|./pic/html2wiki.png]]
所有 JPG 图片,转成宽度640的,结果名字附加 "r-" 的前缀。
{{{
for i in *.JPG; do convert """$i""" -scale 640 """r-$i"""; done
}}}
常规: 
|7|8|9|0|
|u|i|o|p|
|j|k|l|;|
|m|,|.|/|

Fn:是模拟成
|~KP_Home|~KP_Up|~KP_Prior|*|
|~KP_Left|~KP_Begin|~KP_Right|-|
|~KP_End|~KP_Down|~KP_Next|+|
|~KP_Insert|comma|~KP_Delete|/|

Fn+~NumLK开: 
|7|8|9|*|
|4|5|6|-|
|1|2|3|+|
|0|,|.|/|
${string:offset:length} 
${#string} 长度 
${string#wildchar} 去掉头部匹配 
${string%wildchar} 去掉尾部匹配 
${string/search/replace}
2007-3-03 周六, 下午1:38
!截取视频文件。撩头去尾。
{{{
$●  mencoder '/home/exp/媒体/电影/●动画/[2006.12.31]加菲猫2双猫记( 大陆公映上译配音)[2006年美国动画](帝国出品)/影视帝国(bbs.cnxp.com).加菲猫2双猫记(上译配音国语无字).Garfield.II.2006.rmvb' -ss 01:05:00 -endpos 62 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=1200 -oac mp3lame -o 加菲猫-片段.mpeg4 
}}}

其中@@color(red):''-ss 01:05:00 -endpos 62''@@,是设置起始和结束的参数。容易理解吧。我设置的这段时间,是双猫记中最经典的那段哦,帅帅最喜欢看的那段。执行的时候,一顿猛扫,CPU占了一半,还算飞快的就搞好了。 
{{{
$●  ll 加菲猫-片段.mpeg4 
-rw-r--r-- 1 exp exp 9.9M 2007-03-03 13:28 加菲猫-片段.mpeg4
}}}
[img[加菲猫-片段|./pic/加菲猫-片段.png]]

!转录光盘。
{{{
$● mencoder vcd://2 -o 小熊维尼之长鼻怪大冒险-1.mpeg4 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=900 -oac mp3lame 
$● mencoder dvd://2 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=1200 -oac mp3lame -o 飞行家族.mpeg4
}}}
Friday, 23. February 2007, 15:39:00
{{{
mid3iconv  -e GBK *.mp3
}}}
下了一个电影,有CD1/2两个avi。找到的srt却是一个独立的。看CD2的时候,麻烦点。只好这样。大概算算CD1的时间,然后:
$●  mplayer \[____\].200.Pounds.Beauty.2006.DVDRip.XviD.AC3.CD2-eSH4Re.avi ''@@color(#cc0000):-subdelay 3280@@''
在播放的时间,用z/x微调时间轴,每次0.1秒。用左右箭头反复在片头测试几次,就调整好了。
r/t是调整字幕的显示位置。

另外,如果是sub字幕,使用 @@color(#cc0000):''j''@@ 按键选择不同的语言。
使用unicode字体,按"j"开关切换字幕。
{{{
$●  ll ~/.mplayer/subfont*
lrwxrwxrwx 1 exp exp 71 2007-03-26 00:25 subfont.ttf -> /home/exp/安装/备份/●可用字体/ChineseName/经典繁颜体.TTF
lrwxrwxrwx 1 exp exp 66 2007-03-25 23:22 subfont.ttf-园体 -> /home/exp/.fonts/●可用字体/YuanTi/VeraSansYuanTi-Regular.ttf
}}}
srt字幕文件也使用utf8
{{{
$●  enca [___].Garfield.2004.DVDRip.XviD.iNT-TLF.[VeryCD.com].srt
Universal transformation format 8 bits; UTF-8
  CRLF line terminators
}}}
CLI播放时,指定utf8。
{{{
$●  grep subcp /home/exp/.mplayer/config 
subcp=utf8
}}}
播放时,指定下utf8,
{{{
$●  mplayer \[___\].Garfield.2004.DVDRip.XviD.iNT-TLF.\[VeryCD.com\].avi
}}}
[img[mp字幕|./pic/mp字幕.png]]
!!~/.mplayer/config.html
{{{
monitoraspect=16:10
# 编码,都使用 "enconv *.srt" 转换成utf8的。才有字体渲染。
subcp=utf8
ontop=yes
# OSD/字幕显示所占用屏幕的比率。要不字体太大。
subfont-osd-scale=3
subfont-text-scale=4
# 使用o热键切换OSD状态。
osdlevel=1
# 图像底部增加50个像素的边界,产生黑边,显示字幕。rmvb变色。[=w:h:x:y:o]。其中o表示OSD,为0,字幕在上,为1,字幕在低。
# vf=expand=0:-50:0:0:0
}}}
安装了nvidia-glx-new以后,如果降级安装nvidia-glx_1.0.9755+2.6.20.4-13.14_i386.deb,或者源的nvidia-glx(9631)版本。会导致不能启动nvidia驱动,只能使用nv驱动。可以这样解决。
{{{
sudo rm /lib/linux-restricted-modules/.nvidia_new_installed
}}}
有人协作测试,真是好。多亏了matri。__TiddlySaver.jar__ 之前一直不行。就是不会写java嘛。
{{{
$●  cat ~/.java.policy 

grant codeBase "file:${user.home}/eexpress-wiki/*" {
    permission java.io.FilePermission "${user.home}${/}eexpress-wiki${/}*", "read,write";
};
}}}
gnome的快捷栏启动图标就修改成:
__''opera @@color(#cc0000):-newpage@@ /home/exp/eexpress-wiki/eexpress-wiki.html''__
给聊天窗口添加一个清除按钮。
Csineneo帮忙搞定的。
{{{
~/.opera/toolbar$●  grep 清除 standard_toolbar\ \(1\).ini 
Button4, "清除聊天内容"=Focus chat input & Insert,"/Clear" & Refresh display & Send message
}}}
安装,注意启用cups服务。
{{{
apt-get install cups-pdf
}}}
设置打印的保存目录。修改是立刻有效的。
{{{
$●  grep '^Out' /etc/cups/cups-pdf.conf
Out ${HOME}/下载
}}}
*pdftk可以作很多的格式转换。
合并文件,执行很复杂的方式。如下:2个文件里面的不同页面,加部分旋转,合并到一个文件。
{{{
pdftk A=in1.pdf B=in2.pdf cat B1-12E B25W A14-end output out1.pdf
}}}
@@color(#ff3333):合并/分割/旋转/加密/解密/填表/水印/盖章/修改信息/释放附件/插入html页面/修复@@
----
*pdfimages可以搜索输出pdf里面的图片。支持(.ppm, .pbm, .jpg)的图片。
安装''qt3-qtconfig''包。使用''qtconfig-qt3''设置qt3的字体。就可以使用喜欢的园体显示QT的程序。

[img[设置园体后的效果|./pic/qt3-config-effect.png]]

zhan的键盘在tty下面乱了。竟然还有这样的配置方式。
{{{
sudo dpkg-reconfigure console-setup
}}}
3种方式看磁盘分区。
{{{
$●  l /dev/disk/
by-id/  by-path/  by-uuid/
$●  ll /dev/disk/by-uuid/
总用量 0
lrwxrwxrwx 1 root root 10 2007-04-04 08:34 7CF7-3F85 -> ../../hda3
lrwxrwxrwx 1 root root 10 2007-04-04 08:33 9835b4fd-f902-4e5e-8f54-31382ea4b92e -> ../../hda2
lrwxrwxrwx 1 root root 10 2007-04-04 08:33 db3a6076-1ff5-4dd0-8e0d-c70ad79912cf -> ../../hda1
lrwxrwxrwx 1 root root 10 2007-04-04 08:33 e5377cbe-8577-48fc-941e-a1932e2d1d44 -> ../../hda4
}}}
[img[vim截图|./pic/vim.png]]
**主配置文件
{{{
$●  cat ~/.vimrc
" 开启语法高亮
syntax on 
" 设置文字编码自动识别
set encoding=utf-8
set fencs=utf-8,cp936,gb18030,gbk,gb2312
" 使用鼠标
set mouse=a
" 设置高亮搜索
set hlsearch
" 输入字符串就显示匹配点
set incsearch
" 输入的命令显示出来,看的清楚些。
set showcmd
" Tlist的内部变量。函数列表。
let Tlist_Use_Right_Window=1
let Tlist_File_Fold_Auto_Close=1
" 打开当前目录文件列表
map <F3> :tabnew .<CR>

" 函数和变量列表
map <F4> :Tlist<CR>
" 搜索当前词,并打开quickfix窗口
map <F5> :call Search_Word()<CR>
" 全能补全
inoremap <F8> <C-x><C-o>
" 没事,鼠标画线玩的。
" noremap <F9> :call ToggleSketch()<CR>
" 关闭窗口,保存文件
map <leader>w :w<CR>
map <leader>q :q!<CR>

" 启动函数变量快速浏览的时间设置
set updatetime=100
" 设置日记的缺省目录
"let g:calendar_diary="~/文档/日记"
"let g:calendar_navi_label = '←,今天(t),→'
"let g:calendar_mruler = '一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月'
"let g:calendar_wruler = '日 一 二 三 四 五 六'
}}}
**当前使用的插件。
|AutoExplorer.vim| 是help里面摘录的,用于鼠标点击,显示当前函数/变量的定义。|
|EnhancedCommentify.vim| 使用\x(\X\c\C),方便是反转注视的。|
|mark.vim| 用\m翻转,多彩色显示当前词。方便查找变量。|
|Search_Word.vim| 自己写的,在工程里面快速查找当前词的。使用QuickFix窗口,支持跳转。|
|taglist.vim| 方便浏览当前文件的函数的。绑定到F4了。|
{{{
$●  l ~/.vim/plugin/
AutoExplorer.vim  EnhancedCommentify.vim  mark.vim  Search_Word.vim  taglist.vim
}}}
**自修改编写的自动变量浏览功能。<<slider chkSlider升级新版 [[AutoExplorer]] AutoExplorer内容 "AutoExplorer内容">> 
**绑定到F5的当前词搜索功能。<<slider chkSlider升级新版 [[Search_Word]] Search_Word内容 "Search_Word内容">>
**关于tags的建立。需要安装 ''exuberant-ctags'' 的包。否则“自动变量浏览”和“全能补全”都无效。
{{{
~/project/lj12-source$●  ctags -R .
}}}
|标题 在行尾放一个c|c
|!用!开头的是标题样式|bgcolor(#ffff00):@@color(blue):使用标准的彩色语法设置颜色@@|正常显示|
| 正常 |>| ''跨行''使用>表示 |
|| !表格对齐 |>|
| ''跨列'' 在下面用~表示 |缺省是靠左边,没有空格|>|
|~| 前面空格:右对齐|>|
|~|  前后空格:居中 |>|

{{{
mplayer 谭咏麟-10.微笑革命.wma -vc null -vo null -ao pcm:file=谭咏麟-10.微笑革命.mp3
}}}
怎么mencoder写不出呢。。。。
增加了切换鼠标的方向,以及窗口按钮的左右位置。
{{{
~/应用/脚本$●  cat swap-交换鼠标按键.bash 
#!/bin/bash

but=`xmodmap -pp|head -n 1|cut -d ' ' -f 3`
((but++))
ret=""
ret=`xmodmap -pp|grep "3.*1"`
if [ -z "$ret" ]
then
        prefix="xmodmap -e \"pointer = 3 2 1 4 5 6 7 8 9"
        xsetroot -cursor_name right_ptr
        gconftool-2 -s /apps/metacity/general/button_layout close,maximize,minimize:menu -t string
else
        prefix="xmodmap -e \"pointer = 1 2 3 4 5 6 7 8 9"
        xsetroot -cursor_name left_ptr
        gconftool-2 -s /apps/metacity/general/button_layout menu:minimize,maximize,close -t string
fi
cmd=${prefix%${but}*}'"'
eval $cmd
}}}
混合安装了kde,结果kdm关机画面阴魂不散。
{{{
$●  sudo update-alternatives --config usplash-artwork.so
Password:

There are 2 alternatives which provide `usplash-artwork.so'.

  Selection    Alternative
-----------------------------------------------
          1    /usr/lib/usplash/usplash-theme-Ubuntu.so
*+        2    /usr/lib/usplash/usplash-theme-kUbuntu.so

Press enter to keep the default[*], or type selection number: 1
Using `/usr/lib/usplash/usplash-theme-Ubuntu.so' to provide `usplash-artwork.so'.
}}}
修改发行版本的图标
Created 星期一 26/02/2007
{{{
cd /usr/share/icons/gnome/scalable/places
sudo rm distributor-logo.svg
sudo ln -s /home/exp/媒体/start-here.svg distributor-logo.svg
killall gnome-panel
}}}
//突发奇想,增加了同时切换窗口的关闭等按钮的位置,更加顺手。//

!!~/应用/脚本/swap-交换鼠标按键.bash.html
@@color(#8080ff):#!/bin/bash@@

@@color(#00ffff):but@@=@@color(#ff40ff):`xmodmap -pp@@@@color(#ffff00):|@@@@color(#ff40ff):head -n @@@@color(#ff6060):1@@@@color(#ffff00):|@@@@color(#ff40ff):cut -d @@@@color(#ffff00):'@@@@color(#ff6060): @@@@color(#ffff00):'@@@@color(#ff40ff): -f @@@@color(#ff6060):3@@@@color(#ff40ff):`@@
@@color(#ff40ff):((@@but++@@color(#ff40ff):))@@
@@color(#00ffff):ret@@=@@color(#ffff00):""@@
@@color(#00ffff):ret@@=@@color(#ff40ff):`xmodmap -pp@@@@color(#ffff00):|@@@@color(#ffff00):grep@@@@color(#ff40ff): @@@@color(#ffff00):"@@@@color(#ff6060):3.*1@@@@color(#ffff00):"@@@@color(#ff40ff):`@@
@@color(#ffff00):if@@ @@color(#ffff00):[@@ @@color(#ffff00):-z@@ @@color(#ffff00):"@@@@color(#ff40ff):$ret@@@@color(#ffff00):"@@ @@color(#ffff00):]@@
@@color(#ffff00):then@@
>@@color(#00ffff):prefix@@=@@color(#ffff00):"@@@@color(#ff6060):xmodmap -e @@@@color(#ff40ff):\"@@@@color(#ff6060):pointer = 3 2 1 4 5 6 7 8 9@@@@color(#ffff00):"@@
>xsetroot -cursor_name right_ptr
>''gconftool-2 -s /apps/metacity/general/button_layout close,maximize,minimize:menu -t string''
@@color(#ffff00):else@@
>@@color(#00ffff):prefix@@=@@color(#ffff00):"@@@@color(#ff6060):xmodmap -e @@@@color(#ff40ff):\"@@@@color(#ff6060):pointer = 1 2 3 4 5 6 7 8 9@@@@color(#ffff00):"@@
>xsetroot -cursor_name left_ptr
>''gconftool-2 -s /apps/metacity/general/button_layout menu:minimize,maximize,close -t string''
@@color(#ffff00):fi@@
@@color(#00ffff):cmd@@=@@color(#ff40ff):${@@@@color(#ff40ff):prefix@@@@color(#ffff00):%@@@@color(#ff40ff):${@@@@color(#ff40ff):but@@@@color(#ff40ff):}@@*@@color(#ff40ff):}@@@@color(#ffff00):'@@@@color(#ff6060):"@@@@color(#ffff00):'@@
@@color(#ffff00):eval@@ @@color(#ff40ff):$cmd@@
>直接修改/etc/resolv.conf,当然也可以直接使用网络管理器修改。
nameserver --208.67.220.220--
nameserver --208.67.222.222--

>另外,为了避免DNS在DHCP自动获取地址后被覆盖,您还需要这么做:
sudo cp /etc/resolv.conf /etc/resolv.conf.''auto''
sudo gedit /etc/dhcp3/dhclient.conf
>将以下行添加到末尾
''prepend'' domain-name-servers --208.67.222.222--,--208.67.220.220--;
*改善 Bash 的命令历史管理功能: 

Bash 的默认配置会存在一个问题,如果同时打开两个(或两个以上的)控制台,那么在这两个控制台中执行的命令并不会互相分享到 history 中。有的命令历史甚至最终会被覆盖掉。要解决这个问题,可把下列内容添加到 ~/.bashrc 或 ~/.bash_profile 文件中:

shopt -s histappend
PROMPT_COMMAND='history -a'

第一句的作用是将命令追加到 history 中。第二句是在显示命令提示符时,保存 history。
@@color(#ff3333):只有新开的控制台,才可享用哦。@@
*设置智能的自动完成功能: 

在 Bash 中我们已经可以通过按 Tab 键来享用自动完成的特性。通过下面的设置,则可以使用 Up 和 Down 键来选择命令后所跟的参数。在 .inputrc(如果该文件不存在,则创建一个)中加入下列内容:

"\e[A": history-search-backward
"\e[B": history-search-forward
set show-all-if-ambiguous on

前两句使用 Up 和 Down 在 history 中进行搜索。后一句是按 Tab 显示自动完成。如果结合 Ctrl - R,则更加好用。
依照:http://ubuntuforums.org/showthread.php?t=205449
$●  aplay -l
**** PLAYBACK硬件设备列表 ****
卡 0: Intel [HDA Intel], 设备 0: AD198x Analog [AD198x Analog]
  子设备: 0/1
  子设备:#0: subdevice #0
卡 0: Intel [HDA Intel], 设备 6: Si3054 Modem [Si3054 Modem]
  子设备: 1/1
  子设备:#0: subdevice #0
''调整声道(alsamixer)无效。''
$●  lspci -v|grep Audio
00:1b.0 Audio device: Intel Corporation 82801G (@@color(#cc0000):''ICH7''@@ Family) High Definition Audio Controller (rev 02)
在http://www.alsa-project.org/alsa-doc/index.php?vendor=vendor-Intel#matrix网页看到ICH7的驱动是''hda-intel''
$●  sudo modprobe snd-hda-intel
无输出。
$●  sv /etc/modules
增加snd-hda-intel到尾部

--搞糊涂了。$●  lsmod|grep snd_hda_intel有。????--
--$●  locate snd-hda-intel--
--/lib/modules/2.6.17-6-generic-xen0/kernel/sound/pci/hda/snd-hda-intel.ko--
--/lib/modules/2.6.20-13-generic/kernel/sound/pci/hda/snd-hda-intel.ko--
--/lib/modules/2.6.20-14-generic/kernel/sound/pci/hda/snd-hda-intel.ko--
--/lib/modules/2.6.20-15-generic/kernel/sound/pci/hda/snd-hda-intel.ko--
@@color(#990000):there is no difference between _ and - in module  names.@@

$●  cat /lib/linux-sound-base/noALSA.modprobe.conf|grep snd-hda
blacklist snd-hdaintel
这个名字似乎不对?
修改试试。
!CLI的星际译王。
{{{
$● sdcv tired 
发现 2 条记录和 tired 相似。 
-->朗道英汉字典5.0 
-->tired 

*[taiәd] 
a. 疲累的, 疲乏的, 厌倦的 
相关词组: 
feel tired out 

-->XDICT英汉辞典 
-->tired 

[ˊtaiәd] 
a. 疲劳的,累的;厌倦的,厌烦的
}}}
----
!转换音乐格式的。sox soxmix
{{{
$●  sox g2ipmsg.mid g2ipmsg.wav
}}}
----
!F1按键坏了,换一个,用F9代替算了。玩游戏,vote的时候,老是需要F1/F2的。 

**看下F9的键值。 
{{{
$●  xmodmap -pke|grep 'F9 ' 
keycode  75 = F9 XF86_Switch_VT_9
}}}
**让此物理按键产生F1的效果。 
{{{
$●  xmodmap -e "keycode  75 = F1"
}}}
**验证一下。 
{{{
$●  xmodmap -pke|grep F1
}}}
----
!scim和软件冲突的时候,屏蔽scim的CLI前缀。
{{{
XMODIFIERS=@im=none QT_IM_MODULE=xim
}}}
----
!会话-启动会话的几个位置
{{{
.config/autostart
/usr/share/gnome/autostart
/etc/xdg/autostart
}}}
----
!强制弹出被锁住的光盘。
{{{
$● sudo umount /media/cdrom0/ -l
$● eject
}}}
----
!找端口
{{{
$●  lsof -l|grep '\<7.631\>'
rhythmbox  6562     1000   21u     unix 0xd4e97980              79631 socket
}}}
{{{
$●  lsof -i
COMMAND  PID USER   FD   TYPE DEVICE SIZE NODE NAME
opera   4789  exp   23u  IPv4  13605       TCP 192.168.100.100:49916->kornbluth.freenode.net:ircd (ESTABLISHED)
}}}
{{{
$●  cat /etc/services |grep 631
ipp             631/tcp                         # Internet Printing Protocol
ipp             631/udp
}}}
{{{
$●  netstat -tup|grep 916
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 192.168.100.100:49916   kornbluth.freenode:ircd ESTABLISHED4789/opera          
}}}
!SCIM里面删除用户定义的词组
输入的时候,选中词组,按ctrl-d。
----
卸载这个库。
{{{
c   kdelibs4c2a                       - core libraries and binaries for all KDE appl
}}}
开关触摸板
Created 星期一 02/10/2006 09:09
{{{
#!/bin/bash 


ts=`synclient -l|grep TouchpadOff` 
ts=${ts#*= } 
if(("$ts" == 0)) 
then 
synclient TouchpadOff=1 
else 
synclient TouchpadOff=0 
fi
}}}
-------------------------------------------------------------------
前提是xorg.conf里面开了
{{{
Option          "SHMConfig"             "on"
}}}
Fn+F9 切换触摸屏
引用:
{{{
<<<包裹多行
>多层
}}}

代码:
{{{
{{{包裹}}}
}}}
分析某图片网站的格式,当前页面的缩略图,省得在点击,放大。
!!~/应用/脚本/fetch_web_pic.bash.html
@@color(#0000ff):#!/bin/bash@@

@@color(#0000ff):#echo $1>~/tmp@@
@@color(#0000ff):# $1 必须完整路径。@@
@@color(#a52a2a):''cd''@@ /home/media/restricted-picture/
@@color(#a52a2a):''[''@@ @@color(#a52a2a):''!''@@ @@color(#a52a2a):''-f''@@ @@color(#a020f0):$1@@ @@color(#a52a2a):'']''@@ @@color(#a52a2a):''&amp;&amp;''@@ @@color(#a52a2a):''exit''@@@@color(#a52a2a):'';''@@
@@color(#0000ff):# 取得网页标题作为保存目录。@@
@@color(#008b8b):t@@=@@color(#6a5acd):`cat @@@@color(#a020f0):$1@@@@color(#a52a2a):''|''@@@@color(#a52a2a):''sed''@@@@color(#6a5acd): @@@@color(#a52a2a):'''''@@@@color(#ff00ff):s/title>\|TITLE>/\n/g@@@@color(#a52a2a):'''|''@@@@color(#a52a2a):''grep''@@@@color(#6a5acd): @@@@color(#a52a2a):'''''@@@@color(#ff00ff):</$@@@@color(#a52a2a):'''|''@@@@color(#6a5acd):tr -d @@@@color(#a52a2a):'''''@@@@color(#ff00ff):</@@@@color(#a52a2a):'''''@@@@color(#6a5acd):`@@
@@color(#a52a2a):''[''@@ @@color(#a52a2a):''-z''@@ @@color(#a52a2a):''"''@@@@color(#a020f0):$t@@@@color(#a52a2a):''"''@@ @@color(#a52a2a):'']''@@ @@color(#a52a2a):''&amp;&amp;''@@ @@color(#a52a2a):''exit''@@@@color(#a52a2a):'';''@@
@@color(#a52a2a):''echo''@@@@color(#ff00ff): @@@@color(#a020f0):$t@@@@color(#a52a2a):''|''@@enca@@color(#a52a2a):''|''@@@@color(#a52a2a):''grep''@@ @@color(#a52a2a):'''''@@@@color(#ff00ff):UTF-8@@@@color(#a52a2a):'''''@@
@@color(#0000ff):# 如果不是UTF-8的标题,就转换一下。@@
@@color(#a52a2a):''[''@@ @@color(#a020f0):$?@@ @@color(#a52a2a):''!=''@@ @@color(#ff00ff):0@@ @@color(#a52a2a):'']''@@ @@color(#a52a2a):''&amp;&amp;''@@ @@color(#008b8b):t@@=@@color(#6a5acd):`echo @@@@color(#a020f0):$t@@@@color(#a52a2a):''|''@@@@color(#6a5acd):iconv -f GBK -t utf8@@@@color(#a52a2a):''|''@@@@color(#6a5acd):tr -d @@@@color(#6a5acd):\n@@@@color(#6a5acd):`@@
@@color(#0000ff):#t=`cat $1|tr [A-Z] [a-z]|sed '/<title>.*<\/title>/!d'|sed 's/<title>\|<\/title>/ /g'|iconv -f GBK -t utf8|tr -d \n`@@
@@color(#0000ff):#echo find title = $t; exit@@
@@color(#a52a2a):''[''@@ @@color(#a52a2a):''-z''@@ @@color(#a52a2a):''"''@@@@color(#a020f0):$t@@@@color(#a52a2a):''"''@@ @@color(#a52a2a):'']''@@ @@color(#a52a2a):''&amp;&amp;''@@ @@color(#a52a2a):''exit''@@@@color(#a52a2a):'';''@@
@@color(#a52a2a):''mkdir''@@ @@color(#a52a2a):''"''@@@@color(#a020f0):$t@@@@color(#a52a2a):''"''@@
@@color(#0000ff):# 2>>~/tmp@@
@@color(#0000ff):#echo "$t">>~/tmp@@
@@color(#0000ff):#exit@@
@@color(#a52a2a):''cd''@@ @@color(#a52a2a):''"''@@@@color(#a020f0):$t@@@@color(#a52a2a):''"''@@
@@color(#0000ff):# 取得全部图片地址,使用多线程下载。@@
@@color(#0000ff):#怡红快绿@@
@@color(#a52a2a):''echo''@@@@color(#ff00ff): @@@@color(#a52a2a):''"''@@@@color(#a020f0):$t@@@@color(#a52a2a):''"|''@@@@color(#a52a2a):''grep''@@ @@color(#a52a2a):'''''@@@@color(#6a5acd):怡红快绿@@@@color(#a52a2a):'''''@@
@@color(#a52a2a):''if''@@ @@color(#a52a2a):''[''@@ @@color(#a020f0):$?@@ @@color(#a52a2a):''==''@@ @@color(#ff00ff):0@@ @@color(#a52a2a):'']''@@
@@color(#a52a2a):''then''@@
>@@color(#a52a2a):''echo''@@@@color(#ff00ff): yhkl@@
>@@color(#a52a2a):''for''@@ i @@color(#a52a2a):''in''@@ @@color(#6a5acd):`cat @@@@color(#a020f0):$1@@@@color(#a52a2a):''|''@@@@color(#6a5acd): tr @@@@color(#6a5acd):\"@@@@color(#6a5acd): @@@@color(#a52a2a):'''''@@@@color(#ff00ff):\n@@@@color(#a52a2a):'''|''@@@@color(#6a5acd): @@@@color(#a52a2a):''grep''@@@@color(#6a5acd): thumb_ @@@@color(#a52a2a):''|''@@@@color(#a52a2a):''sed''@@@@color(#6a5acd): @@@@color(#a52a2a):'''''@@@@color(#ff00ff):s/thumb_/ /@@@@color(#a52a2a):'''''@@@@color(#6a5acd):`@@
>@@color(#a52a2a):''do''@@
@@color(#0000ff):#       echo $i@@
>axel @@color(#a020f0):$i@@
>@@color(#a52a2a):''done''@@
@@color(#a52a2a):''fi''@@
@@color(#0000ff):#大乃图@@
@@color(#a52a2a):''echo''@@@@color(#ff00ff): @@@@color(#a52a2a):''"''@@@@color(#a020f0):$t@@@@color(#a52a2a):''"|''@@@@color(#a52a2a):''grep''@@ @@color(#a52a2a):'''''@@@@color(#6a5acd):大乃图@@@@color(#a52a2a):'''''@@
@@color(#a52a2a):''if''@@ @@color(#a52a2a):''[''@@ @@color(#a020f0):$?@@ @@color(#a52a2a):''==''@@ @@color(#ff00ff):0@@ @@color(#a52a2a):'']''@@
@@color(#a52a2a):''then''@@
>@@color(#a52a2a):''echo''@@@@color(#ff00ff): dntu@@
>@@color(#a52a2a):''for''@@ i @@color(#a52a2a):''in''@@ @@color(#6a5acd):`cat @@@@color(#a020f0):$1@@@@color(#a52a2a):''|''@@@@color(#6a5acd): tr @@@@color(#6a5acd):\'@@@@color(#6a5acd): @@@@color(#a52a2a):'''''@@@@color(#ff00ff):\n@@@@color(#a52a2a):'''|''@@@@color(#6a5acd): @@@@color(#a52a2a):''grep''@@@@color(#6a5acd): @@@@color(#a52a2a):''"''@@@@color(#ff00ff):dns.*jpg$@@@@color(#a52a2a):''"''@@@@color(#6a5acd): `@@
>@@color(#a52a2a):''do''@@
>@@color(#008b8b):j@@=@@color(#a52a2a):''"''@@@@color(#ff00ff):[[http:/ /www.dntu.net/upload/dnpic/|http:/ /www.dntu.net/upload/dnpic/]]@@@@color(#a52a2a):''"''@@@@color(#a020f0):${@@@@color(#a020f0):i@@@@color(#a52a2a):''#''@@*S@@color(#a020f0):}@@
@@color(#0000ff):#       echo $j@@
>axel @@color(#a020f0):$j@@
>@@color(#a52a2a):''done''@@
@@color(#a52a2a):''fi''@@
@@color(#0000ff):#[[http:/ /www.dntu.net/upload/dnpic/2007322224938552.jpg|http:/ /www.dntu.net/upload/dnpic/2007322224938552.jpg]] 目标@@
@@color(#0000ff):#[[http:/ /www.dntu.net/upload/dns/S2007322224938552.jpg|http:/ /www.dntu.net/upload/dns/S2007322224938552.jpg]] 链接@@

{{{
$●  dog fetch_web_pic.bash 
cd /home/media/restricted-picture/
[ ! -f $1 ] && exit;
t=`cat $1|sed 's/title>\|TITLE>/\n/g'|grep '</$'|tr -d '</'`
[ -z "$t" ] && exit;
echo $t|enca|grep 'UTF-8'
[ $? != 0 ] && t=`echo $t|iconv -f GBK -t utf8|tr -d \n`
[ -z "$t" ] && exit;
mkdir "$t"
cd "$t"
echo "$t"|grep '怡红快绿'
if [ $? == 0 ]
then
        echo yhkl
        for i in `cat $1| tr \" '\n'| grep thumb_ |sed 's/thumb_//'`
        do
        axel $i
        done
fi
echo "$t"|grep '大乃图'
if [ $? == 0 ]
then
        echo dntu
        for i in `cat $1| tr \' '\n'| grep "dns.*jpg$" `
        do
        j="http://www.dntu.net/upload/dnpic/"${i#*S}
        axel $j
        done
fi
}}}
直接取opera的缓冲页面。
{{{
~/.opera/menu$●  grep 使用axel下载全部关联图片 standard_menu.ini 
Item, "EE::使用axel下载全部关联图片"    = Execute program, "fetch_web_pic.bash", "%s"
}}}
!无线路由设置
Created 星期一 08/01/2007

essid修改。

无线设置:访问控制:允许MAC列表修改。
0013026b1324

WAN设置:广域网接口(WAN)配置,修改为pppoe拨号。
"~CSD1220520" * "6641672447"

系统服务:DMZ主机设置。
192.168.18.1

!无线网络信息
Created 星期五 08/12/2006 08:46
{{{
$●  iwlist eth1 scan
eth1      Scan completed :
          Cell 01 - Address: 00:E0:4C:FD:9C:B1
                    ESSID:"Entontech"
                    Protocol:IEEE 802.11bg
                    Mode:Master
the node is the synchronisation master or acts as an Access Point
                    Channel:6
                    Encryption key:on
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                              48 Mb/s; 54 Mb/s
                    Quality=96/100  Signal level=-31 dBm  Noise level=-31 dBm
                    Extra: Last beacon: 88ms ago
}}}
{{{
$●  iwconfig eth1
eth1      IEEE 802.11g  ESSID:"Entontech"  
          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:E0:4C:FD:9C:B1   
node connects to a network composed of many Access Points,  with roaming
          Bit Rate:54 Mb/s   Tx-Power:13 dBm   
          Retry limit:15   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=96/100  Signal level=-32 dBm  Noise level=-33 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:1   Missed beacon:0
}}}
在网络连接的小图标显示无信号的时候,需要硬件关闭网卡电源,再开,才可以看到信号。??
在联网那里,DHCP设置不成功。而无线路由里面明明看到了DHCP开通。
关闭过eth1以后,碰到ping不通的情况。需要设置一次。在联网那里设置没用??
{{{
00:12:05-exp~$●  ping 192.168.18.1
PING 192.168.18.1 (192.168.18.1) 56(84) bytes of data.

--- 192.168.18.1 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1008ms

00:12:17-exp~$●  sudo iwconfig eth1 essid "Alpha" key s:1234567890123
00:12:26-exp~$●  ping 192.168.18.1
PING 192.168.18.1 (192.168.18.1) 56(84) bytes of data.
64 bytes from 192.168.18.1: icmp_seq=1 ttl=255 time=4.17 ms
64 bytes from 192.168.18.1: icmp_seq=2 ttl=255 time=1.81 ms

--- 192.168.18.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 1.813/2.996/4.179/1.183 ms
00:12:32-exp~$●  iwlist eth1 rate 
eth1      12 available bit-rates :
          1 Mb/s
          2 Mb/s
          5.5 Mb/s
          11 Mb/s
          6 Mb/s
          9 Mb/s
          12 Mb/s
          18 Mb/s
          24 Mb/s
          36 Mb/s
          48 Mb/s
          54 Mb/s
          Current Bit Rate:54 Mb/s
00:24:20-exp~$●  iwlist eth1 frequency
eth1      17 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 12 : 2.467 GHz
          Channel 13 : 2.472 GHz
          Channel 149 : 5.745 GHz
          Channel 153 : 5.765 GHz
          Channel 157 : 5.785 GHz
          Channel 161 : 5.805 GHz
          Current Frequency=2.437 GHz (Channel 6)
}}}
!无线网卡
Created 星期一 02/10/2006 09:51
{{{
[17207390.664000] eth1: Coming out of suspend...
[17207390.680000] PCI: Enabling device 0000:02:00.0 (0000 -> 0002)
[17207390.680000] ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 16 (level, low) -> IRQ 169
[17207394.120000] ipw3945: Detected geography ABG (13 802.11bg channels, 4 802.11a channels)
[17207439.804000] eth1: Going into suspend...
[17207439.916000] ACPI: PCI interrupt for device 0000:02:00.0 disabled
[17207450.568000] eth1: Coming out of suspend...
[17207450.584000] PCI: Enabling device 0000:02:00.0 (0000 -> 0002)
[17207450.584000] ACPI: PCI Interrupt 0000:02:00.0[A] -> GSI 16 (level, low) -> IRQ 169
}}}
无线网卡。按键开关很正常。
{{{
$●  sdcv festival
发现 2 条记录和 festival 相似。
-->朗道英汉字典5.0
-->festival

*['festәvәl]
a. 节日的, 喜庆的, 快乐的
n. 节日, 庆祝, 欢宴

-->XDICT英汉辞典
-->festival

[ˊfestәvl]
a. 节日的,喜庆的,快乐的
n. 节日,庆祝及祭祀,欢宴
}}}
就是觉得,为什么不做成独立的文件,而要分成2个。
<<<
script -t 2>demo.timing -a demo.session
该指令中的 -t 选项指明输出录制的时间数据,而 -a 选项则输出录制的文件。你可以将指令中的 demo 换成自己设置的名称。当终端中返回“Script started, file is demo.session”的信息时,你就可以进行需要录制的操作了。
如果需要结束录制过程,则输入 exit 即可。
要播放已录制完成的终端会话,可以使用指令:scriptreplay demo.timing demo.session
关于 script 及 scriptreplay 的更多信息,可以使用 man script 或 man scriptreplay 查询。
<<<
欢迎来到 eexpress 的 WIKI 网络笔记。这是一个基于 tiddlywiki 的 Ajax 网页。
<<tabs tabsClass
"Ubuntu 标签" "Ubuntu 标签" "Ubuntu 标签"
"Shell 标签" "Shell 标签" "Shell 标签"
"Opera 标签" "Opera 标签" "Opera 标签"
"Subversion 标签" "Subversion 标签" "Subversion 标签"
"Wiki 标签" "Wiki 标签" "Wiki 标签"
"Game 标签" "Game 标签" "Game 标签"
"Media 标签" "Media 标签" "Media 标签"
>>
安装的服务不清除干净。nnd,一把删除
{{{
$●  as mldonkey-server
i   mldonkey-server                   - Door to the 'donkey' network
$●  ar mldonkey-server
$●  l /etc/rc?.d/*key-server
/etc/rc0.d/K20mldonkey-server@  /etc/rc4.d/S98mldonkey-server@
/etc/rc1.d/K20mldonkey-server@  /etc/rc5.d/S98mldonkey-server@
/etc/rc2.d/S98mldonkey-server@  /etc/rc6.d/K20mldonkey-server@
/etc/rc3.d/S98mldonkey-server@
$●  sudo rm `ls /etc/rc?.d/*mldonkey-server`
$●  sudo rm /etc/init.d/mldonkey-server
$●  locate mldonkey
/var/cache/apt/archives/mldonkey-server_2.8.2-2_i386.deb
/var/lib/dpkg/info/mldonkey-server.list
/var/lib/dpkg/info/mldonkey-server.postrm
/home/exp/.mldonkey
....''用户目录保留''
/etc/default/mldonkey-server
/usr/share/app-install/desktop/mldonkey-gui.desktop
}}}
最后,保留包和包信息。删除最后2个。nnd,这系统根本不维护__/usr/share/app-install/desktop/__目录了。
{{{
$●  cat ed2kopera 
#!/bin/sh
echo dllink $* | nc -q 1 localhost 4000
}}}
xcompmgr - sample X compositing manager
transset 0.5	#前者先启动。设置窗口透明。
{{{
~/应用/脚本$●  cat 设置窗口透明度 
#!/bin/bash

p=`zenity --scale --title=设置窗口的透明度 --value=8 --max-value=10`
[ $p == 10 ] && transset 1 && exit
transset 0.$p
}}}
主要是自动取名,适合作成面板图标按钮。使用ctrl-c结束录音。自动调整了Mic的声道音量。
{{{
#!/bin/bash 

NOW=`date '+%Y-%m-%d-%H-%M-%S'` 
FNAME=记事-${NOW}
EXT=wav

SCRDIR=${HOME}/下载/ 
if [ ! -d "${SCRDIR}" ]; then 
   mkdir -p "${SCRDIR}" 
fi 
amixer set Mic 90%
cmd="sound-recorder ${SCRDIR}${FNAME}.${EXT}"
eval gnome-terminal -x $cmd
amixer set Mic 10%
}}}
{{{
$●  cat ~/.opera/styles/user/user.css
html,body,*{ 
font-family:"Vera Sans YuanTi"!important;
}
}}}
菜单里面设置样式,指向这个css文件。
[img[菜单里面设置样式|./pic/opera-user.css.png]]
配置Wine
Created 星期一 23/10/2006 22:13

{{{
$●  ll ~/.wine/drive_c/windows/fonts
总用量 0
lrwxrwxrwx 1 exp exp 51 2006-10-23 22:08 simfang.ttf -> /home/exp/安装/备份/●可用字体/simfang.ttf
lrwxrwxrwx 1 exp exp 50 2006-10-23 22:08 simhei.ttf -> /home/exp/安装/备份/●可用字体/simhei.ttf
lrwxrwxrwx 1 exp exp 50 2006-10-23 22:08 simkai.ttf -> /home/exp/安装/备份/●可用字体/simkai.ttf
lrwxrwxrwx 1 exp exp 49 2006-10-23 22:08 SIMLI.TTF -> /home/exp/安装/备份/●可用字体/SIMLI.TTF
lrwxrwxrwx 1 exp exp 50 2006-10-23 22:08 SIMSUN.TTF -> /home/exp/安装/备份/●可用字体/SIMSUN.TTF
lrwxrwxrwx 1 exp exp 50 2006-10-23 22:08 SIMYOU.TTF -> /home/exp/安装/备份/●可用字体/SIMYOU.TTF
}}}
{{{
$●  mkdir /tmp/ksocket-exp
}}}
==以下可视情况省略===

{{{
$●  cd ~/.wine; diff system.reg  system.reg-old|grep MS
< "MS Sans Serif"="SIMSUN.TTC"
< "MS Serif"="SIMSUN.TTC"
> "MS Sans Serif"="sserife.fon"
> "MS Serif"="serife.fon"
< "MS Sans Serif"="SIMSUN.TTC"
< "MS Serif"="SIMSUN.TTC"
> "MS Sans Serif"="sserife.fon"
> "MS Serif"="serife.fon"
}}}
{{{
$●  cat /usr/share/X11/locale/zh_CN.UTF-8/XLC_LOCALE | grep GBK -A 4
#  fs3 class (Chinese Han Character GBK)
# fs3    {
#        charset {
#                name    GBK-0:GLGR
#        }
#        font    {
#                primary GBK-0:GLGR
#                substitute GB13000.1993-1:GLGR
#        }
# }
}}}