2026年1月5日 星期一

[Game] Rimworld enable Dev mode (for Mac)

In Finder Press Command+Shift+Dot to open hidden folder

/Users/[user name]/Library/Application Support/RimWorld/Config/DevModeDisable

Delete "DevModeDisable" file.

2025年10月3日 星期五

Asterisk & FreePBX Feature Codes

Asterisk & FreePBX Feature Codes


Feature Codes enable you to control what happens to your phone extension and calls to it and voicemail.  Here are the the feature codes:

Blacklist

*30 – Blacklist a number
*32 – Blacklist the last caller
*31 – Remove a number from the blacklist

Call Forward

*72 – Call Forward All Activate
*73 – Call Forward All Deactivate
*74 – Call Forward All Prompting Deactivate
*90 – Call Forward Busy Activate
*91 – Call Forward Busy Deactivate
*92 – Call Forward Busy Prompting Deactivate
*52 – Call Forward No Answer/Unavailable Activate
*53 – Call Forward No Answer/Unavailable Deactivate
*740 – Call Forward Toggle

Call Waiting

*70 – Call Waiting – Activate
*71 – Call Waiting – Deactivate

Core

*8 – Asterisk General Call Pickup (When you are part of a call group)
** – Directed Call Pickup (When you are part of a call group)
*2 – (When in a call) Asterisk Attended Transfer
## – (When in a call) Asterisk Blind Transfer
** – (When in a call) Asterisk Disconnect Code
*1 – (When in a call) Asterisk Toggle Call Recording
7777 – Simulate Incoming Call
*12 – User Logoff
*11 – User Logon

Day Night Mode - When enabled

*28x –  where x is a number from 0 to 9.  A PIN may be required to activate.

Dictation

*35 – Email completed dictation
*34 – Perform dictation

Do-Not-Disturb (DND)

*78 – DND Activate
*79 – DND Deactivate
*76 – DND Toggle

Follow Me

*21 – Findme / Follow Me Toggle

Info Services

*69 – Call Trace
# – Directory
*43 – Echo Test
*65 – Speak Your Extension Number
*60 – Speaking Clock

Paging and Intercom

*80 – Intercom prefix
*54 – User Intercom Allow
*55 – User Intercom Disallow

Phonebook Directory

*411 – Phonebook dial-by-name directory

Queues

*45 – Queue Toggle

Recordings

*99 – Check Recording
*2968 – Edit Recording: Additional_Support_Announcement
*2969 – Edit Recording: ServiceAnnouncement
*77 – Save Recording

Speed Dial Functions

*75 – Set user speed dial
*0 – Speeddial prefix

Voicemail

*98 – Dial Voicemail
*97 – My Voicemail

2025年8月29日 星期五

[python]pip install fcntl (Win10)

建立一個 fcntl.py文件,
並將其存放Python的安装路徑Lib目錄下,

C:\Users\[name]\AppData\Local\Programs\Python\Python311\Lib


fcntl.py

=============================
def fcntl(fd, op, arg=0):
    return 0

def ioctl(fd, op, arg=0, mutable_flag=True):
    if mutable_flag:
        return 0
    else:
        return ""

def flock(fd, op):
    return

def lockf(fd, operation, length=0, start=0, whence=0):
    return
=============================

2024年3月31日 星期日

Ubuntu Libreoffice add Chinese language

 
sudo apt-get install libreoffice sudo apt-get install libreoffice-l10n-zh-tw libreoffice-help-zh-tw
 
如要新增簡體中文則輸入下方指令:
sudo apt-get install libreoffice-l10n-zh-cn libreoffice-help-zh-cn
 
 

2024年3月12日 星期二

Ubuntu GIMP add Chinese language

Command:

sudo apt-get install language-pack-gnome-zh-hant

2023年11月26日 星期日

[Ubuntu]install rtl88x2bu driver

Ubuntu 22.04 install rtl88x2bu driver:

sudo apt update
sudo apt install git dkms build-essential

git clone https://github.com/cilynx/rtl88x2bu.git

cd rtl88x2bu

VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf)

sudo rsync -rvhP ./ /usr/src/rtl88x2bu-${VER}
sudo dkms add -m rtl88x2bu -v ${VER}
sudo dkms build -m rtl88x2bu -v ${VER}
sudo dkms install -m rtl88x2bu -v ${VER}
sudo modprobe 88x2bu

2023年7月27日 星期四

Ibus 加入嘸蝦米輸入法

基於Ibus輸入法框架

步驟一:安裝Rime輸入法套件

sudo apt install ibus-rime


步驟二:設置Rime輸入法

開啟IBus偏好設定,並加入Rime。



步驟三:部署Rime輸入法

切換輸入法到Rime,並點選輸入法Icom,選擇『部署』




步驟四:加入嘸蝦米字根
除了 README.md 外的所有檔案放到該路徑底下 ~/.config/ibus/rime/

引用Github amoshyc的連接
https://github.com/amoshyc/myliu


步驟五:重新部署Rime輸入法
重新部署Rime輸入法即可。

安裝Evolution和設定Office 365郵件帳戶

安裝Evolution 指令:

sudo apt-get remove evolution
sudo apt-get update
sudo apt-get install evolution
sudo apt-get install evolution-ews

設定Office 365郵件帳戶:

新增O365郵件帳戶--

Host URL:
https://outlook.office365.com/EWS/Exchange.asmx

--------------------------------------------------------------

Authentication:
OAuth2(office365)

--------------------------------------------------------------

Overide Office365 OAuth2 Settings (勾選)

2023年2月13日 星期一

Ubuntu 22.04找不到ttyUSB0

接上CH340 USB serial時,

使用gtkterm或putty 系統找不到ttyUSB0 。

移除下列

sudo apt remove brltty
 

並重新開機即可。


2023年1月10日 星期二

小米路由 R2D 修改Samba支援WAN

一、編輯

vi /etc/config/firewall


config zone

option name 'wan'

option network 'wan'

修改 option input ‘ACCEPT’


新增rule如下:
config rule
option name 'Open Samba on WAN'
option src 'wan'
option proto 'tcp udp'
option dest_port '137 139 445'
option target 'ACCEPT'

config redirect
option name 'wan samba'
option src 'wan'
option src_dport '137 139 445'
option dest 'lan'
option proto 'tcp udp'

================================================
二、編輯
vi /etc/samba/smb.conf.template

修改 interfaces = br-lan wan
        #bind interfaces yes

以上修改完,重開機即可。

2022年12月13日 星期二

小米路由 R2D 簡易修改Samba設置

如果只修改 /etc/samba/samba.conf

重啟後便會失效。

因此修改 /etc/init.d/samba

vi /etc/init.d/samba

找到[homes] 下方,新增二筆[HDD-disk] [USB-disk]

===========================

[homes]

comment = Home Directories
browsable = no
read only = no
create mode = 0750

[HDD-disk]                                                                      
        path = /userdisk/data                                                   
        read only = no                                                          
        guest ok = yes                                                          
        create mask = 0777                                                      
        directory mask = 0777                                                   
        browseable = yes                                                        
        force user = root                                                       
[USB-disk]                                                                      
        path = /extdisks/                                                   
        read only = no                                                          
        guest ok = yes                                                          
        create mask = 0777                                                      
        directory mask = 0777                                                   
        browseable = yes                                                        
        force user = root 

=============================

重啟Samba
/etc/init.d/samba restart

此時Samba磁碟就會出現HDD-disk和USB-disk資料夾。
可以探訪編輯硬碟所有資料。










2022年12月2日 星期五

老毛子Padavan 印表機分享(HP1020)

下載HP1020驅動並上傳至路由器,

http://oleg.wl500g.info/hplj/

或是telent至路由器,wget去下載HP1020驅動至 /etc/storage/。

wget http://oleg.wl500g.info/hplj/sihp1020.dl



編輯腳本,添加下面這一行‧

cat /etc/storage/sihp1020.dl > /dev/usb/lp0




2021年3月5日 星期五

Yandex Browser -- re-add or restore Google Search

修改Yandex Browser 搜索引擎的語系。

設定>>搜索引擎設置>>新增

名稱:google.tw

關鍵字:google_zh_tw

鏈路參數設置:https://www.google.com.tw/search?q=%s



2016年1月7日 星期四

[ubuntu]install gtkterm (rs-232)

minicom之外的選擇

sudo apt-get install gtkterm

不想使用root權限的使用方法如下: 


1. tty屬於“dialout”群組,比如用户名是test,
先命令查看下用户所屬的组别
groups test 


2.如果没有所屬“dialout”,新增用户進去該群組
sudo gpasswd --add test dialout 


3.reboot~

2015年11月11日 星期三

[Android] Nibiru H1 螢幕加入虛擬三鍵

如題,H1下方的三鍵實在不靈敏.

加入虛擬按鍵的方式如下:

1.手機需取得Root權限。

2.使用"ES檔案瀏覽器",並開啟"Root工具箱".

3.在ROOT根目錄下,開啟system文件夾內build.prop的文件.

4.編輯build.prop,在最後一行加入qemu.hw.mainkeys=0

5.儲存修改的設定並重開機即可.

6.若需要取消虛擬按鍵,把qemu.hw.mainkeys=0更改為qemu.hw.mainkeys=1

2015年7月9日 星期四

[Ubuntu]Test your Ubuntu computer. Ubuntu燒機軟體

安裝stress測試工具指令:

sudo apt-get install stress


stress測試項目如下:
CPU的指令參數    -c
記憶體指令參數   -m
硬碟指令參數    -d
測試時間指令參數   -t

測試1個CPU線程

stress -c 1

測試4個CPU線程

stress -c 4

使用3個程序來測試記憶體,預設1個程序為250MB(總共750MB)

stress -m 3

使用3個程序來測試記憶體,每個程序為500MB (等於1.5G的Ram)


stress -m 3 --vm-bytes 500M

使用1個程序來測試硬碟存取,預設1個程序為1GB資料存取

stress -d 1

使用2個程序來測試硬碟存取,並設定每1個程序為512MB資料存取(總共1GB)

stress -d 2 --hdd-bytes 512M

燒機測試使用4線程CPU、2個程序測試記憶體、1個程序來測試硬碟存取

stress -c 4 -m 2 -d 1

設定測試時間為一小時

stress -c 4 -m 2 -d 1 -t 3600s
stress -c 4 -m 2 -d 1 -t 60M


[Ubuntu] install ARP-scan

install arp-scan command:

sudo apt-get install arp-scan


arp-scan command:

sudo arp-scan --interface=eth0 192.168.168.0/24

or

sudo arp-scan 192.168.168.0/24


2015年5月23日 星期六

[Ubuntu]Ubuntu15.04的fcitx輸入法安裝嘸蝦米(boshiamy)

14.04以前的安fcitx輸入法:

sudo apt-get install fcitx
sudo apt-get install im-config
sudo add-apt-repository ppa:fcitx-team/nightly
sudo apt-get update
im-config
-------------------------------------------------------------------
嘸蝦米套件:
sudo apt-get install fcitx-table-boshiamy

新酷音:
sudo apt-get install fcitx-chewing




向ibus說byebye~~~~
sudo apt-get remove ibus

sudo apt-get install unity-control-center

2015年5月22日 星期五

Ubuntu 14.04.2 Server + BIND DNS Server + SIP DNS SRV settings

step 1.

Download Ubuntu Server 14.04.2 and install this system.
http://www.ubuntu.com/download/server


Installation process
To select the “DNS Server” service function.



step 2.

Install Webmin On Ubuntu 14.04 LTS using official repository
Add the webmin official repository:
Edit file /etc/apt/sources.list,

sudo nano /etc/apt/sources.list
 
Add the following lines:
 
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Add the GPG key:
 
sudo wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc

Update the sources list:
 
sudo apt-get update

Install webmin using the following command:
 
sudo apt-get install webmin

Allow the webmin default port “10000” via firewall, if you want to access the webmin console from a remote system.
 
sudo ufw allow 10000

Access Webmin console

Open up your browser and navigate to the URL https://ip-address:10000/. The following screen should appear. Enter the user name and password to log in to webmin console.


step 3.

使用 Webmin方式來設定DNS Server

設定 Bind 8 可以接受外部連線及轉送查詢的伺服器。
「伺服器」->「BIND 8 DNS 伺服器」->「Edit Config File」->/etc/bind/named.conf.options
在此檔中加入
 
listen-on port 53 { any; };
forwarders {
        163.168.168.59;   //base DNS IP
        8.8.8.8;  //google DNS IP

        };
    allow-query {
        any;
        };




設定區域預設值

「伺服器」->「BIND 8 DNS 伺服器」->「區域預設值」
「預設的區域設定」->「允許從 ... 的查詢」點擊「監聽」及輸入 [any]
 






建立一個新的主控區域-正向
輸入管理網域名稱 test.local

 

建立 Address 紀錄(位址)




 增加 Address 紀錄
 

step 4.

使用nslookup指令查詢

nslookup
server "DNS Server IP"
set type=srv
_sip._udp.test.local
 






[Game] Rimworld enable Dev mode (for Mac)

In Finder Press Command+Shift+Dot to open hidden folder /Users/[user name]/Library/Application Support/RimWorld/Config/DevModeDisable Dele...