## 雞肋功能：AWS 推出 Managed Prefix Lists 管理 IP 列表

AWS 總算推出可以管理 IP 列表的功能 Managed Prefix Lists，就不需要自己在 security group 裡面針對一堆 IP 設重複的設定：「Amazon Virtual Private Cloud (VPC) customers can now use their own Prefix Lists to simplify the configuration of security groups and route tables」。

There is no additional charge to use the Prefix Lists. Support for Prefix Lists is available in all public regions with support in Africa (Cape Town), Europe (Milan), China (Beijing), and China (Ningxia) coming soon. For more information on prefix lists, visit our public documentation.

• 每個 network interface 可以設定 5 個 security group。
• 每個 security group 可以設定 60 條規則。

• 一開始就要設計好 prefix list 內的最大筆數，如果不幸用完是沒辦法修改的。
• 在 security group 裡不是吃一條規則，而是以最大筆數佔用，prefix list 內沒有射到最大筆數也還是得佔用。

「雞肋」XD

## 雲端免費服務的整理

When you call Amazon SES from an application hosted in Amazon EC2, you can send 62,000 messages per month at no charge. This Free Usage Tier benefit does not expire.

## 找數列的平均值

2016 年的文章，不過算是經典的題目，所以最近又冒出來了。要怎麼找數列的平均值：「Calculating the mean of a list of numbers」。

You have a list of floating point numbers. No nasty tricks - these aren’t NaN or Infinity, just normal “simple” floating point numbers.

Now: Calculate the mean (average). Can you do it?

• 第一個要處理的就是設計演算法時各種會 overflow 的情況。
• 降低誤差。
• 合理的計算量。

It also demonstrates a problem: Floating point mathematics is very hard, and this makes it somewhat unsuitable for testing with Hypothesis.

```#include <math.h>
#include <stdio.h>

int main(void)
{
int i;
float a;

for (i = 0; i < 32; i++) {
a = pow(2, i);
printf("2^%d     = %f\n", i, a);

a += 1;
printf("2^%d + 1 = %f\n", i, a);
}
}```

```2^23     = 8388608.000000
2^23 + 1 = 8388609.000000
2^24     = 16777216.000000
2^24 + 1 = 16777216.000000```

## 在 AWSUG Taiwan 上講的「用 AWS CodeDeploy 解決程式佈署」

SpeakerDeck (或者說，Ordered List 這家公司) 本來在 2011 年賣給了 GitHub，但今年六月的時候被買回去了：

## 用郵件訂閱 Google Groups 上的 Mailing List

Send an email to (Group Name)+subscribe@googlegroups.com. +subscribe is the key, which is appended to the end of group’s email address. (Group Name) is the name of the group. Space is substituted by “-” (hyphen).

## Linus (又) 不爽了... XD

```Please talk to management. Because I really see exactly two possibibilities:

- Intel never intends to fix anything

OR

- these workarounds should have a way to disable them.

Which of the two is it?```

## 在 Trac 裡把參與者自動加到 cc list 裡面的 plugin

```<script>
(function() {
window.authname = "\${authname}";
})();
</script>```

```// Add myself into cc list, if I am not in cc list now.
(function() {
if (-1 === document.location.href.indexOf('/ticket/')) {
return;
}
var cc_list = jQuery('input[name="field_cc"]').val().split(/[ ,]+/);
for (var i in cc_list) {
if (window.authname === cc_list[i]) {
return;
}
}

jQuery(function() {
jQuery('form#propertyform').submit(function() {
var cc = jQuery('input[name="field_cc"]');
cc.val(cc.val() + ',' + window.authname);
});
});
})();```

## AWS Price List API

AWS 把價錢資訊也 API 化了：「New – AWS Price List API」。

You can also elect to receive notification via Amazon Simple Notification Service (SNS) each time we make a price change.

## 限制 WeeChat 中 buffers.pl 的寬度

WeeChat 上的 buffers.pl 是個很好用的套件，可以在側邊列出 channel，像是這樣：

`#mpdm-gslin--persona--personb--personc--persond--persone----1`

## 把 HTTP 站台逐步換向 HTTPS 站台的步驟

Jerry Qu 寫的「关于启用 HTTPS 的一些经验分享」這篇文章講了要怎麼將 HTTP 站台逐步換成 HTTPS 站台的方式 (以及工具)。