/etc/rspamd/local.d/multimap.conf:
IP_WHITELIST {
type = "ip";
prefilter = true;
map = "/${LOCAL_CONFDIR}/local.d/ip_whitelist.map";
action = "accept";
Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.
There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.
struct foo {
struct bar {
int x;
// ==UserScript== | |
// @name Mastodon - Add older/newer link | |
// @namespace https://github.com/unarist/ | |
// @version 0.2 | |
// @description Add user timeline link with max_id/min_id to status pages | |
// @author unarist | |
// @downloadURL https://gist.github.com/unarist/6b445cbb588b405389defb6dbb36e0d9/raw/mastodon-add-older-newer-link.user.js | |
// @match https://*/@*/* | |
// @grant none | |
// @noframes |
// ==UserScript== | |
// @name マストドンに定型文機能を付けるやつ | |
// @namespace https://js4.in/ns/ | |
// @include * | |
// @version 1.0.11 | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// @grant GM_deleteValue | |
// @author Miyagi Hikaru | |
// @website https://gist.github.com/hcmiya/3645e7ef572685c56e58fca5e1375e0e |
.columns-area .drawer { | |
position:sticky; | |
left:0; | |
z-index:100; | |
background-color:rgba(25, 27, 34, 0.75); | |
} | |
.privacy-dropdown__dropdown { | |
z-index: 101; | |
} |
トラップはよい機能だけど完全に信頼できるというわけではないよ。SIGKILLとSIGSTOPはトラップできない。
大昔のいくつかのUnixにはSIGKILLをトラップする怪しげな方法があった。もしプログラムがptraceされていたら、どのようなシグナルでも(SIGKILLでも)、そのプロセスを停止させてptraceをしている側のプロセスに通知するという動作になっていた。
そこで僕は"sh"という名前のプログラムを書いた。そのプログラムはメモリサイズを/bin/shと同じになるように注意深く調整したあと、fork & execして、子プロセスをptraceした。子プロセスは"superman"というプログラムだった。僕の偽shは、supermanが何らかのシグナルを受け取ると、そのシグナル番号をsupermanのメモリに書き込んだ後、つねにSIGINTでsupermanを再開するという動作になっていた。supermanのSIGINTハンドラはシグナル番号をみて面白メッセージを表示するようになっていた。
僕はそのプログラムを起動して、システム管理者のところにいって、何かプロセスがkillできないんだけど、と言った。システム管理者は^Cや^\を一応試した後、別の端末からログインしてrootになって、psでsupermanを見つけて、それをkill -9した。
「クリプトン星人にはSIGKILLは効かないぞ」と表示されてプロセスが動き続けているのを見た時の彼の顔といったらなかなかのものだった。
// ==UserScript== | |
// @name Mastodon - Open post link in WebUI | |
// @description Click fa-comment just before URLs in posts, then it shows linked page in WebUI | |
// @namespace https://github.com/unarist/ | |
// @downloadURL https://gist.github.com/unarist/9bed2c719f42853b9588104e6fdb0a20/raw/mastodon-open-link-in-webui.user.js | |
// @version 0.14 | |
// @author unarist | |
// @match https://*/web/* | |
// @match https://mstdn.maud.io/* | |
// @grant none |
// ==UserScript== | |
// @name [Mastodon] animate emoji on static pages | |
// @namespace hen.acho.co | |
// @include /^https?:\/\/[^\/]+\/(?:@\w+|users\/\w+\/(?:statuses|updates))\/\d+/ | |
// @version 1.200804 | |
// @description We can 👀 animated emoji without logging in! | |
// @downloadURL https://gist.github.com/pacochi/d1a8e019fdfc02235df7686af62d9895/raw/mastodon_animate_emoji.user.js | |
// @run-at document-idle | |
// @grant none | |
// ==/UserScript== |
関連: RFC 2394