In a promise system, there are two parties involved, an action initiator, and observers:
let done = fetch(url);
let insertDom = () => console.log("element inserted");
let read = () => done.then(insertDom);
--- src/main.cpp | |
+++ src/main.cpp | |
@@ -433,20 +433,15 @@ | |
} | |
if (isRoot()) { | |
- CUtils::PrintError( | |
- "You are running ZNC as root! Don't do that! There are not many " | |
- "valid"); | |
- CUtils::PrintError( |
// cancel request | |
let req = new Request(url); | |
fetch(req).catch(() => { | |
// reject with abort error | |
}); | |
req.abort(); // abort fetch | |
// cancel stream reading | |
fetch(url).then(r => { | |
r.abort(); |
I want to improve the sysupgrade script, making it support extroot better.
I have the following improvements in mind:
/etc/config/fstab
in jffs2 partition is saved to /tmp
, and after upgrading, restored to the jffs2 partitionelem1.style.transform = "translateX(0px)"; | |
var fx = new SequenceEffect([ | |
new KeyframeEffect(elem1, [{ | |
"transform": "translateX(100px)" | |
}, { | |
"transform": "translateX(200px)" | |
}], {duration: 500, fill: "forwards"}), | |
new KeyframeEffect(elem2, [{ | |
"transform": "translateX(100px)" | |
}, { |
After spending much time configurating znc on OpenWrt with the helps from people on znc channel, I believe I have a pretty decent configration, and would like to suggest the following modifications to the znc package so other people can benefit from it.
Drop UCI config, and use znc's config directly.
With UCI config, it means the used config dir is temporary, and it makes modules like webadmin less useful. Also it makes remembering password for the sasl module very hard, which doesn't support specifying the password when loading the module. The same goes for using a pem file for the cert module and making it stick.
I know the znc package currently supports external config. But the problem is that the pid file is specified to live in /tmp/etc/znc/znc.pid
. I'm not sure if this directory will be created when the external config is used. Ideally, it should live in /var/run/znc/znc.pid
with /var/run/znc
be owned by a limited user znc
(more on this later).
Use sudo
instead of su
U