simple access counter
2008年08月05日 (php)
source
<html>
<head>
<title>simple access counter</title>
</head>
<body>
<?php
$f=fopen("count.txt","r+");
$count=fgets($f,10);
$count=(int)$count;
$count++;
rewind($f);
fputs($f,$count);
fclose($f);
echo("welcome to my web. you are #$count visiter.\n");
?>
</body>
</html>
command
% vim simpleaccesscounter.php % echo 0 > count.txt % chmod 666 count.txt
PR
Xdefaults colors
2008年08月05日 (X)
| 色番号 | 説明 |
|---|---|
| color0 | black |
| color1 | red |
| color2 | green |
| color3 | yellow |
| color4 | blue |
| color5 | magenta |
| color6 | cyan |
| color7 | white |
| color8 | bright black |
| color9 | bright red |
| color10 | bright green |
| color11 | bright yellow |
| color12 | bright blue |
| color13 | bright magenta |
| color14 | bright cyan |
| color15 | bright white |
| colorUL | underlined character color |
| colorBD | bold character color |
| colorIT | italic character color |
| colorRV | reverse video background color |
my vimrc 080805
2008年08月05日 (vim)
source
colorscheme torte
nmap <C-v> <C-v>
"highlight CursorM guibg=red guifg=NONE
"set columns=80
"set lines=30
"set autowrite
set noautowrite
set autoindent
"set noautoindent
"set backup
set nobackup
"set compatible
set nocompatible
"set hlsearch
set nohlsearch
set ignorecase
"set noignorecase
set number
"set nonumber
"set list
set nolist
set showmatch
"set noshowmatch
set showmode
"set noshowmode
set smartcase
"set nosmartcase
set smartindent
"set nosmartindent
set smarttab
"set nosmarttab
"set textmode
set notextmode
"set wrap
set nowrap
"set visualbell
set novisualbell
"set errorbells
set noerrorbells
"set backupdir=>/tmp
set backspace=1
"set backspace=2
set fileencodings=utf-8,euc-jp,cp932
set fileformats=unix,dos,mac
set history=1000
set iminsert=0
set imsearch=0
set matchpairs=(:),{:},<:>,[:]
set matchtime=1
set shiftwidth=4
set softtabstop=4
set switchbuf=useopen
set tabstop=4
set undolevels=1000
"set virtualedit=insert
set virtualedit=block
"set virtualedit=all
source ~/.vim/plugins/*.vim
syntax on
~/.vimrc
visualbell errorbell
2008年08月05日 (vim)
command
:set visualbell # visualbell on :set novisualbell # visualbell off :set errorbells # errorbell on :set noerrorbells # errorbell off
note
cf. :help errorbells :help visualbell
sample_while.sh
2008年08月04日 (shellscript)
source
#!/bin/sh
#sample while
i=0
while [ $i -lt 10 ]
do
echo $i
i=`expr $i + 1`
done