EarthLiveShell 在桌面从太空看地球

之前在 GitHub 上看到 bitdust 用 C# 做的一个能够获取卫星影像并设定为壁纸的程序 EarthLiveSharp (v2ex 讨论),可惜只能在 Windows 下工作。趁着会考完结花几天时间用 Bash 实现了一个能够在 Linux Gnome 下工作的版本

setsid <command> & 可以使进程直接挂在 init 下面作为新的 session 运行,EarthLiveShell 的服务进程即使用这种方法保持在后台。

附上截图

EarthLive

Time-based One Time Password Algorithm

Follow the algorithm

As implemented in Google Authenticator app, you’ll need:

  • A shared secret key K, which is base32 encoded
  • a specific time period since UNIX epoch T

I’ll use K = GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ and T = 1450235092 (which is Wed, 16 Dec 2015 11:04:52 CST) for example. In the Google Authenticator App, both K and T are passed to TOTP as hexadecimal values (or byte arrays).

Since K is a base32 encoded string, we’ll decode it to byte format. Password changes every 30 seconds, T should be divided by 30, tuncated to integer and converted to hex and padded to 16 hexadecimal digits.

Continue reading Time-based One Time Password Algorithm