Techy Things

Singleton pattern in RequireJS 0

Singleton pattern in RequireJS

Yes this is possible and has its advantage. I use it often for Toolbox-like functions. This is the basic approach define(function (require) { var singleton = function () { return { … }; };...

Create a ISPConfig server with mail MX support 0

Create a ISPConfig server with mail MX support

() Follow official doc () Make sure you have the right root email before you activate email so you dont spam the wrong inbox : echo “myhostname.com” > /etc/mailname /etc/init.d/postfix restart Troubleshooting If you...

Document ready javascript even without jQuery 0

Document ready javascript even without jQuery

Document ready cross-browser in plain JavaScript (vanilla JS) /**  * The ready event handler and self cleanup method  */ function completed() {     document.removeEventListener( “DOMContentLoaded”, completed, false );     window.removeEventListener( “load”, completed, false );...