Categories
hardware Software

[Arduino 應用 source code] 固定一段時間自動移動虛擬滑鼠 不讓電腦進入鎖屏(anti screen saver) Arduino Pro micro Atmega32U4

Categories
DATABASE

[小測試] 使用不同種類的 Key-Value database 效能比較 / Berkeley DB / Redis / Memcache …

Categories
Copy_N_Paste Software

[memo] BBEditor color scheme / theme location

Path : /Users/username/Library/Application Support/BBEdit/Color Schemes

git:

Monster dark.bbColorScheme: Monster dark.bbColorScheme

Categories
Programming/php

[PHP] php 由 pipe (stdin) 讀進檔案 再做處理, 類似 C 的 pipe line 方法

$cnt = 0;
$fp = fopen('php://stdin','r');
while ($line = stream_get_line($fp, 65535, "\n")) {
  echo "LINE #" . (++$cnt) . ": " . $line . "\n";
}

Categories
Apple

Mac / enable MacBook double-tap to drag ,開啟 點兩下拖移功能 方便~

新的 macOS 把這功能 default 設成不開啟, 需要特別打開

Categories
System/Linux/Unix*

[memo] 用 shell awk 加總 column

ls -l `find /mnt/tslog/archive/ -name "*20190[1..6]*" -type f` | awk '{sum += $5} END {print sum}'
160038650315

ls -l `find /mnt/tslog_bak -name "*20190[1..6]*" -type f` | awk '{sum += $5} END {print sum}'
160038650315

ls -l `find /mnt/tslog_backup2 -name "*20190[1..6]*" -type f` | awk '{sum += $5} END {print sum}'
160038650315

Categories
System/Linux/Unix*

[memo] 常用 ubuntu 升級套件指令 / ubuntu upgrade commands

# 更新
apt update

# 列出可 upgrade 的 package
apt list –upgradable

# 只 upgrade 這些 packages
apt –only-upgrade install XXXXX

Categories
JOB

Protected: CBOA info

This content is password protected. To view it please enter your password below:

Categories
Programming/php

[memo] php.ini , short_open_tag

php 程式檔案開頭使用 <? 簡寫

須在 php.ini 設定 short_open_tag = On

Categories
System/Linux/Unix*

[memo] Ubuntu : ctrl-L not work , 按 ctrl-L 不會清除螢幕 , TERM , .bashrc .profile 問題 , Ubuntu 8.04.4 LTS

這個版本的 .bashrc 不 work , 要用 .profile
lsb_release  -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04.4 LTS
Release: 8.04
Codename: hardy
—-
$ cat .profile
export EDITOR=vi
export PATH=/sbin:$PATH
export LANG=
export TERM=xterm
export http_proxy=
export https_proxy=