Read The Arch Way, fall in.
I can’t believe how smoothly this went…
- suspend - seems to work after installing gnome, pm-suspend works too… I have my eye on you. <.<
systemctl suspend
works, but doesn’t wake properly.
- power management
- trackpad
USE sys; | |
DELIMITER $$ | |
CREATE FUNCTION IFZERO(a INT, b INT) | |
RETURNS INT | |
DETERMINISTIC | |
RETURN IF(a = 0, b, a)$$ | |
CREATE FUNCTION LOCATE2(needle TEXT(10000), haystack TEXT(10000), offset INT) |
Read The Arch Way, fall in.
I can’t believe how smoothly this went…
systemctl suspend
works, but doesn’t wake properly.替换上你的Email,密码,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得domain_id可以用curl
curl -k https://dnsapi.cn/Domain.List -d "login_email=xxx&login_password=xxx"
获得record_id类似
curl -k https://dnsapi.cn/Record.List -d "login_email=xxx&login_password=xxx&domain_id=xxx"
package main | |
import ( | |
"errors" | |
"log" | |
"os" | |
"github.com/PuerkitoBio/goquery" | |
"github.com/robertkrimen/otto" | |
) |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
First, install nginx for mac with "brew install nginx". | |
Then follow homebrew's instructions to know where the config file is. | |
1. To use https you will need a self-signed certificate: https://devcenter.heroku.com/articles/ssl-certificate-self | |
2. Copy it somewhere (use full path in the example below for server.* files) | |
3. sudo nginx -s reload | |
4. Access https://localhost/ | |
Edit /usr/local/etc/nginx/nginx.conf: |
替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`