Skip to main content

Posts

Slow Ubuntu boot time caused by service - this case php7.2-fpm

1min 2.221s phpsessionclean.service          59.989s apt-daily.service          18.665s ModemManager.service          17.564s php7.2-fpm.service https://superuser.com/questions/1323790/phpsessionclean-service-causes-long-boot-time-in-debian-sid sudo systemctl disable php7.2-fpm.service https://unix.stackexchange.com/questions/315502/how-to-disable-apt-daily-service-on-ubuntu-cloud-vm-image https://itsfoss.com/how-to-fix-system-program-problem-detected-ubuntu/ sudo journalctl --boot oh apport report is required in order to make system boot success (done).

JS vs PHP closure, some exp in large and nightmare code base

https://medium.com/javascript-scene/master-the-javascript-interview-what-is-a-promise-27fc71e77261 https://stackoverflow.com/questions/7417430/javascript-closures-vs-php-closures-whats-the-difference experience on refactoring/working with  nightmare code base https://softwareengineering.stackexchange.com/questions/221615/why-do-dynamic-languages-make-it-more-difficult-to-maintain-large-codebases Caveat: I have not watched the presentation. I have been on the design committees for JavaScript (a very dynamic language), C# (a mostly static language) and Visual Basic (which is both static and dynamic), so I have a number of thoughts on this subject; too many to easily fit into an answer here. Let me begin by saying that it is hard to maintain a large codebase, period. Big code is hard to write no matter what tools you have at your disposal. Your question does not imply that maintaining a large codebase in a statically-typed language is "easy"; rather the question p...

Rand mm 11 nightmare to maintain, DI Java example

Video speaking is much more better than text, it duration, stop, image, voice ... is lost when move to text. So create an app/tool for simulate or rebuild the speak may be cool. Tone seem hard to be reproduce, AI can help but can it hear like real one? https://www.quora.com/Is-Node-js-code-a-nightmare-to-maintain Some interesting case on context 'this' https://codeburst.io/all-about-this-and-new-keywords-in-javascript-38039f71780c https://documenter.getpostman.com/view/1066979/signely/RW1UN2uD?version=latest#8f0d3bd8-33c4-485d-a81d-7f1073475ed9 clone save some microservice poS socket.io vs RabbitMQ, Kafka ... try. Oh constant vs define is much more than I think https://www.linkedin.com/pulse/php-difference-between-define-constant-ankit-vishwakarma/ https://www.quora.com/Amazons-Aurora-has-a-new-storage-engine-What-technology-is-that-storage-engine https://www.journaldev.com/2394/java-dependency-injection-design-pattern-example-tutorial https://stackoverflo...

Chrome youtube iframe magnific popup autoplay

https://github.com/dimsemenov/Magnific-Popup/issues/725 Yah MP have patterns Late to the party, in case someone needs to use the actual embed URL for Magnific, here is my process: Write a function that gets the input URL, checks it's format and then ensures that the /embed/ url is returned. In Magnific markup always use the processed URL which is in the embed format. Add the following patterns to magnific, to essentially use the input URL as the url without processing it further: // Video popup, Backend enforces embed URL before it gets here.     $('.js-popup-video').magnificPopup({         type: 'iframe',         iframe: {             patterns: {                 youtube: {                     index: 'youtube.com/',                     id: function (url) ...

Focus vs Attention

https://monq.com/eo/physiology/focus-and-attention-same/ Complete attention https://jkrishnamurti.org/content/complete-attention Many time I've confused or hard to focus on some work. And may be this is the root cause: What do we mean by attention? Is there attention when I am forcing my mind to attend? When I say to myself, “I must pay attention, I must control my mind and push aside all other thoughts,” would you call that attention? Surely that is not attention. What happens when the mind forces itself to pay attention? It creates a resistance to prevent other thoughts from seeping in; it is concerned with resistance, with pushing away; therefore it is incapable of attention. That is true, is it not? To understand something totally you must give your complete attention to it. But you will soon find out how extraordinarily difficult that is, because your mind is used to being distracted, so you say, “By Jove, it is good to pay attention, but how am I to do it?” That is, ...