增加工作效率:關閉 Mac 上切換視窗時的動畫效果

把各種動畫效果時間減少主要是因為要降低對「短期記憶」的影響,尤其年紀大了以後特別有感覺:

短期記憶(英語:Short-term memory,也稱為primary memory或者active memory)是記憶的一種類型,它可以在頭腦中讓少量資訊保持啟用狀態,在短時間內可以使用。短期記憶的持續時間(在沒有複述或者啟用的情況下)以秒計算。與長期記憶相比,短期記憶對資訊的儲存時間較短,資訊儲存的容量也很有限。關於短期記憶的容量,一個常常參照的數字是7 ± 2 個元素。

在這個基礎下,半秒鐘到一秒鐘的動畫效果對於短期記憶的影響其實非常大,所以花了些時間找看看怎麼關掉...

後來在「How can I disable animation when switching desktops in Lion?」這篇翻到,裡面主要有兩個方法,一個是用 command line 的方法,但我測了不會動 (在 10.14.3 上),另外一個方法是已經被整合進系統了:

改了以後快不少,但要習慣一下...

直接在 Ubuntu 的 Unity 上直接計算

Mac 上還蠻常直接在 Spotlight 上打簡單的算式看計算的結果,但我的桌機是在 Ubuntu 上,沒看到這個功能,所以都是用 search engine 幫忙算 (以前是 Google,現在是 DuckDuckGo),但還是想要找個類似的東西看看能不能在本機處理掉...

後來在「Can you get something like Unity Dash--especially the instant calculator--in other distros?」這邊看到 screenshot 的效果應該就是我想要的:

不過發現預設好像不會開 (跟文章裡面提到的不太一樣),所以又找了一段時間,發現在「How to permanently enable in-dash calculator in 13.10」這邊,River Satya 提到的方式是我要的:

  • Install dconf-editor sudo apt install dconf-editor
  • Run it dconf-editor
  • Open com.canonical.unity.lenses
  • Add info-calculator.scope to the always-search list
  • Profit!

改完後就會像 screenshot 出現了...

Ubuntu 18.04 推出

Ubuntu 兩年一度的 LTS 版本在前幾天放出來了,18.04 版的 code name 為 Bionic Beaver,官方有發出一篇介紹文章「Breeze through Ubuntu Desktop 18.04 LTS Bionic Beaver」,而下載可以在「Ubuntu 18.04 LTS (Bionic Beaver)」這邊抓。

因為不少新功能的穩定性沒跟上這次的 LTS (像是想要用 Wayland 換掉 X.org),所以目前看到的改變沒有想像中的大...

最主要的改變應該是不再提供 i386 版本,不過 x86-64 (AMD64 & Intel 64) 推出都已經超過十年了,加上要使用超過 4GB RAM 應該都會裝 x86-64 版本 (有人用 PAE 撐著嗎?),所以只要不是古董應該都沒問題...

另外一個則是預設從 Unity 換成 GNOME 了,用 Unity 已經算很習慣了,不知道之後換過去會有什麼感想... (到時再寫好了)

預定等一個版本再來換 (i.e. 18.04.1),現在不想當白老鼠 XD 不過手上一些 PPA package 要先 porting 過去...

Ubuntu 18.04 將從 Wayland 換回 Xorg...

在「Ubuntu 18.04 LTS is Switching back to Xorg」這邊看到 Ubuntu 18.04 將要從 Wayland 換回 Xorg 的消息,只能說不意外 XDDD

Ubuntu 官方的說明在「Bionic Beaver 18.04 LTS to use Xorg by default」這邊,文章裡面給了三個理由:

  • Screen sharing in software like WebRTC services, Google Hangouts, Skype, etc works well under Xorg.
  • Remote Desktop control for example RDP & VNC works well under Xorg.
  • Recoverability from Shell crashes is less dramatic under Xorg.

講白了就是還有一堆東西有問題,看起來在 17.10 導入 Wayland 後沒搞定:

17.10, released in October 2017, ships with the Wayland based graphics server as the default and the Xorg based equivalent is available as an option from the login screen.

在 18.04 預設會用 Xorg,但系統內還是會有 Wayland 讓使用者可以選:

The Wayland session will still be available, pre-installed, for people to use, but for our ‘out of the box’ users the Ubuntu experience needs to be stable and provide the features they have come to expect and use in daily life and Xorg is the best choice here, at least for 18.04 LTS, but for 18.10 we will re-evaluate Wayland as the default.

再測個兩年吧 XD

Slashdot 名字的由來

在 20 年紀念文 (懷舊文) 中 Rob Malda 提到了 Slashdot 名字的由來:「A Pre-History of Slashdot」。

I originally used the name ‘slashdot’ on my desktop a year earlier when I got my first static IP in the Voorhees Hall dorm room I shared with Dave. Back in 1996, our floor was the first in all of Hope College to be granted 24/7 high speed internet access.

宿舍機器的名字 XDDD

Cloudflare 看這次 815 斷電的網路使用變化

Cloudflare 分析了這次 815 停電對網路造成的影響:「Power outage hits the island of Taiwan. Here’s what we learned.」。

以 Cloudflare 在是方機房的 QPS 來看,停電後反而沒有太大變化:

把裝置種類拆開來看,可以看到桌機的使用量下降,但手機的使用量上升:

這點從 HiNet 的使用頻寬也可以看出來,頻寬使用量降了 25% (從光世代與 ADSL/VDSL 換到行動網路上?):

Slack 的 Screen Sharing

Slack 付費版將有 Screen Sharing 的功能了,對於 Remote Work 的團隊又更方便了:「Screen sharing comes to Slack video calls」。

When you’re working with teammates over a Slack video call, you may have something — a document, a chunk of code, the latest designs — that you want to share with your team. Now you can. Screen sharing is now available across teams on Slack’s paid plans.

需要使用 Windows 與 Mac 版的 desktop 處理:

Screen sharing is rolling out over the next few days to paid teams on the latest versions of our Slack for Mac and Slack for Windows desktop apps.

Dropbox 的桌面端應用支援 IPv6 環境了...

算是宣示性質的新聞稿吧,畢竟官網與 blog 以及 API 都還是沒 AAAA record:「Adding IPv6 connectivity support to the Dropbox desktop client」。

文章裡面提到支援 IPv6 only network,應該是指 ISP 有支援 NAT64 轉換的情況下可以使用 Dropbox 資源,而不是 Dropbox 整個 IPv6 ready...

gslin@home [~] [17:49/W4] dig www.dropbox.com aaaa @8.8.8.8

; <<>> DiG 9.9.5-3ubuntu0.14-Ubuntu <<>> www.dropbox.com aaaa @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63706
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;www.dropbox.com.               IN      AAAA

;; ANSWER SECTION:
www.dropbox.com.        55      IN      CNAME   www.dropbox-dns.com.

;; AUTHORITY SECTION:
dropbox-dns.com.        1794    IN      SOA     dns1.p06.nsone.net. hostmaster.nsone.net. 1493415466 43200 7200 1209600 60

;; Query time: 18 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Apr 29 17:49:10 CST 2017
;; MSG SIZE  rcvd: 139

用 SessionGopher 拉出機器上各種密碼與 Key

同事在 Slack 上提到 fireeye/SessionGopher 這個工具,可以從機器上拉出各種敏感資訊:

SessionGopher is a PowerShell tool that uses WMI to extract saved session information for remote access tools such as WinSCP, PuTTY, SuperPuTTY, FileZilla, and Microsoft Remote Desktop. It can be run remotely or locally.

方法是掃 registry 或是硬碟:

SessionGopher works by querying the HKEY_USERS hive for all users who have logged onto a domain-joined box at some point. It extracts PuTTY, WinSCP, SuperPuTTY, FileZilla, and RDP saved session information. It automatically extracts and decrypts WinSCP, FileZilla, and SuperPuTTY saved passwords. When run in Thorough mode, it also searches all drives for PuTTY private key files (.ppk) and extracts all relevant private key information, including the key itself, as well as for Remote Desktop (.rdp) and RSA (.sdtid) files.

是個... 好玩... 的... 東西...

Ubuntu 桌機的 Split DNS

Split DNS 指的是某個 DNS domain 使用另外一組 DNS servers,常用在 Partial Route 的 VPN 上,讓內部網域的 DNS domain 正確的被解出來。一般商業的 VPN Software 都會處理掉這塊,不過有時候還是希望可以自己設定...

Ubuntu 桌機上的 Split DNS 可以透過 Dnsmasq 做到,在我的機器上因為透過 ps awx | grep dnsmasq 可以看到 --conf-dir=/etc/NetworkManager/dnsmasq.d,表示設定的目錄在 /etc/NetworkManager/dnsmasq.d 下,所以我把檔案 mysplit 放到 /etc/NetworkManager/dnsmasq.d 下:

#
server=/mysplit.com/10.1.2.3

然後在 dnsmasq 的 manpage 裡面有提到,SIGUSR{1,2} 是拿來分析用的,而 SIGHUP 不是拿來給你重新讀設定檔用的 XDDD

SIGHUP does NOT re-read the configuration file.

所以就砍掉他,隨便對 NetworkManager 做個動作,就會重新把 dnsmasq 帶起來了,或者重開機也可以... 再跑 dig 查的時候就可以查到資訊了。