Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

205 total results found

Words

Learning English

Prerequisites (必備條件) Bottleneck (瓶頸) Achieve (達到;實現) Bare Metal (實體機;裸機) Overhead (執行成本, 負擔成本) Outline (簡述/草稿/大綱) Technique (技術;技巧;方法)

grep

SHELL

教學網站 http://www.cyberciti.biz/faq/grep-regular-expressions/ https://www.ubuntupit.com/practical-grep-command-for-linux-enthusiasts/ 文字過濾 使用 . (period) 表示一個任意字元 $ grep dev.sda /etc/fstab /dev/sda3 / reiserfs noatime,ro 1 1 ...

校時與時區設定

Linux Administration

Chrony Built-in on CentOS CHAPTER 18. CONFIGURING NTP USING THE CHRONY SUITE CentOS / RHEL 7 : Configuring NTP using chrony How do I check Linux system’s current NTP configuration Install yum install chrony Config: /etc/chrony.conf # NTP Public Ser...

ntp

檔案上傳

BookStack

Storage Options 編輯 .env STORAGE_TYPE=local_secure 其他不同類型的儲存方式 local s3 Changing Upload Limits PHP post_max_size = 20M upload_max_filesize = 20M Nginx  如果使用官方教學的 Docker 方式安裝,不需要再設定 Nginx。 http { #... client_max_body_size 100m; ...

Regex 正規表示式

SHELL

教學網站 https://likegeeks.com/regex-tutorial-linux/ http://overapi.com/regex https://regexper.com/#%2F.echo%24%2F (視覺化正規表示式) The Greatest Regex Trick Ever 基本搜尋 # 搜尋字串區分大小寫 echo "This is a test" | sed -n '/test/p' echo "This is a test" | awk '/test/{pr...

Sample Scripts

SHELL

Auto-rar.sh 解壓縮多個分割檔案 (*.part0XX.rar) #!/bin/bash echo "-> Started: "`date +%m/%d/%y\ %H:%M\ %Z` echo "-> As:"`whoami` i=1 ARCHIVES="$@" for f in $ARCHIVES; do PARTCHECK=$(expr "$f" : ".*\([Pp][Aa][Rr][Tt][0-9]\+\.[Rr][Aa][Rr]\)") RARC...

sed

SHELL

教學網站 http://www.tecmint.com/linux-sed-command-tips-tricks/ https://www.cyberciti.biz/faq/how-to-use-sed-to-find-and-replace-text-in-files-in-linux-unix-shell/ sed 更多使用範例 Complete Sed Command Guide Sed - An Introduction and Tutorial by Bruce Barnett Lea...

awk

SHELL

教學網站 http://techarena51.com/index.php/advance-text-processing-examples-awk/ https://linuxhandbook.com/awk-command-tutorial/ Running Awk in parallel to process 256M records 搜尋字串 awk '/^this/{print $0}' #與 sed -n '/^this/p' 相同 移除重複資料的行 我們經常使用 ...

test

SHELL

字串或文字的比對 Str1 = str2 | 當str1與str2相同時, 傳回True Str1 != str2| 當str1與str2不同時, 傳回True Str1 < Str2 Str1 <= Str2 Str1 > Str2 Str1 >= Str2 Str | 當str不是空字符時, 傳回True -n str | 當str的長度大於0時, 傳回True -z str | 當str的長度是0時, 傳回True 數字(整數) 比對 Int1 -e...

範例與常用技巧

SHELL

檔頭常用宣告 # quickly syntax set -euo pipefail # let script exit if a command fails set -o errexit # OR set -e # let script exit if an unsed variable is used set -o nounset # OR set -u # This setting prevents errors in a pipeline from being masked...

Phrases

Learning English

Most importantly, you learn when and where to apply a particular technique. (最重要的是,你要學習...) I wasn’t yet ready to leave the comfort zone TensorFlow had created and try out something new. (離開舒適圈) There’s also C/C++ for the IoT devices, which talk to these c...

cURL: Tips

cURL

Options in the integration with Shell CURL_CMD="curl" CURL_OPT="-qSfs -m 60" CURL_OPT_POST="-qSfs -m 60 -X POST" POST Request Send an Empty POST Request curl -X POST https://catonmat.net Send a POST Request with Form Data curl -d 'login=emma&passwo...

Postfix: Tips

Postfix

postfix 服務啟動/停止/重新載入 postfix check postfix start postfix stop postfix reload postfix flush postconf - 不用編輯 main.cf 的設定方法 列出設定參數 postconf -n 修改參數*不需要重啟服務* postconf -e "relayhost = [192.168.10.10]:587" \ "smtp_sasl_auth_enable = yes" \ "smtp_sasl_se...

FreeBSD: Tips

FreeBSD

Websites FreeBSD 6.0架設管理與應用 The FreeBSD Project BSD vs Linux

有用的連結

未分類

VPN - WireGuard https://www.wireguard.com/ How to generate WireGuard QR code on Linux for mobile Free VPN Service VPN Gate P2P VPN Cjdns https://github.com/cjdelisle/cjdns Windows Batch Script https://www.tutorialspoint.com/batch_scrip...

Secure Docker Network

Docker

With SWAG SWAG - Secure Web Application Gateway With iptables 對於 Container 不同啟動方式,在 iptables 的腳本設計會有些不同。 docker-compose: 透過橋接的網路介面(br-*) 與 DOCKER-USER 作限制。 docker: 透過 PRE_DOCKER 作限制。 for docker-compose) #!/usr/bin/env bash # Purpose: Restrict the...

網站存取的Port

CDN-Cloudflare

使用 Cloudflare CDN 服務架設網站除了常用的 80, 443 以外,如果要用其他特殊 Port,請參考下列有支援的清單: HTTP ports: 80 8080 8880 2052 2082 2086 2095 HTTPS ports: 443 2053 2083 2087 2096 8443 注意: 不在支援清單內的 Port 是無法透過 Cloudflare 存取網站的。

建立新的自我簽署的憑證檔

BookStack

產生新的憑證檔 new-cert.key new-cert.crt cd /dir/to/your/cert openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout new-cert.key \ -out new-cert.crt chown 1000.1000 new-cert.* 修改 Nginx 設定 cd /path/to/nginx vi site-confs/default ssl_certificat...

BookStack Installation

BookStack

With Docker Tutorial: linuxserver/bookstack LSIO BookStack & Swag Setup docker-compose.yml: version: "2"services:  bookstack:    image: linuxserver/bookstack    container_name: bookstack    environment:      - PUID=1000      - PGID=1000      -...

MySQL Backup

Docker

從 Host 執行 backup-db.sh #!/bin/bash BKDIR="db_backups" BKFILE="cloudcoin_raida#17.`date +%y%m%d`.sql" DBUSER="ThisDBUser" DBNAME="cloudcoin_raida" CONTNAME="raida17" CONTDIR="/opt/data/$BKDIR" HOSTDIR="/docker_vol/raida/data/$BKDIR" KEEP=2 [ -d...