タグ

2016年2月21日のブックマーク (2件)

  • PHPのmt_rand()にプルリクを送った - kusano_k’s blog

    この話。 PHP の mt_rand() は一貫して壊れている(consistently broken)らしい - 唯物是真 @Scaled_Wurm PHPのmt_rand()が実装にミスがあることを知ったので、「PHPのコミットログに名前を載せるぞ╭( ・ㅂ・)و」と思ってプルリクを送ったら、一旦マージされたけど、リバートされた。 詳細 https://github.com/php/php-src/pull/1681/files ついでにテストコードも付けたけど、直すべきは1文字だけ。 twistというマクロの定義が1文字間違えている。 loBit(u)ではなくloBit(v)が正しい。 #define twist(m,u,v) (m ^ (mixBits(u,v)>>1) ^ ((uint32_t)(-(int32_t)(loBit(u))) & 0x9908b0dfU)) このマク

    PHPのmt_rand()にプルリクを送った - kusano_k’s blog
    shin1x1
    shin1x1 2016/02/21
  • 3 Custom alert scripts

    3 Custom alert scripts Overview If you are not satisfied with the existing media types for sending alerts, there is an alternative way to do that. You can create a script that will handle the notification your way. Custom alert scripts are executed on Zabbix server. These scripts must be located in the directory specified in the server configuration file AlertScriptsPath parameter. Here is an exam

    shin1x1
    shin1x1 2016/02/21
    Zabbix 3 から、アラートスクリプトへの引数を変更できる