Skip to main content

Posts

Showing posts from April, 2020

WP Sascarm

WP Sascarm  I think it's super convenient that all entities in WordPress are stored in one table. And that all meta data is in another table. I mean, why would you even need hundreds of tables if only 2 are enough? And if everything is global, you can access anything anywhere! Such good design patterns! And having all URL's hard-coded in the database makes migration so much easier. It's backward compatible to wp0.0.1, so no need to buy an expensive new site! Just upgrade your 10-year old php3 site in a jiffy! Brilliant engineering! Plugins: we have that! You can use all our super well documented and consistent hooks and filters. Multisite and multi language from the core? We don't need that! We have plugins for that. Brilliant! And the loop... Don't you just love the loop? Yay! Why bother templating when you can buy it? No coding required! Generate it all inline! Yay! I love WordPress so much that I'm going to get a unicorn humping a wp logo tattoo. Yay! Yay!

Notes on Laravel queue, supervisord, some design pattern

https://stackoverflow.com/questions/25877752/laravel-queue-process-timeout-error spartial index https://aws.amazon.com/about-aws/whats-new/2018/01/mariadb-10-2-now-supported-on-amazon-rds/ https://superuser.com/questions/164576/remote-desktop-for-os-x-thats-better-than-vnc https://stackoverflow.com/questions/33028544/laravel-5-app-helper-function https://viblo.asia/p/trien-khai-repository-trong-laravel-m68Z0x6MZkG Wow many new technical knowledge ab DP. https://laravel.com/docs/8.x/facades#facades-vs-dependency-injection If you are using it as in your example - you'll get no profit. But Laravel container gives much more power in this resolving that you cannot achieve with simple instantiating objects. Binding Interface - you can bind specific interface and it's implementation into container and resolve it as interface. This is useful for test-friendly code and flexibility - cause you can easily change implementation in one place without changing interface. (For example use some...

Send, download, share file between PC and/or between Android without usb device/cable

I brought refurbish Dell Latitude to one of my relative. Unfortunatly, usb port/driver seem not work. I have tested it before, but with the Chinese Windows 10 version and usb wireless mouse head. So after reinstalling Windows 10 with English one, usb not work, so I guest its driver suck.      I am not realize this problem until when trying copy Wandriver to this laptop over usb stick. It not recognize usb drive. May be usb 3.0 driver etc but usb wireless head also not work on all usb port. So the only way is installing driver.     Without wifi connection, it's not easy. I have to use my 4G connection and while dowloading 750MB over one Google Drive link. I make a mistake that my 1.5GB quota may exceeded. The real mistake is that it's not exceeded :) But when I try register another 1.5GB the connection interrupted and Google Drive ban current download. So I have to try another way to get driver to Dell laptop. Normally we can share file over wifi with scp (P...

Notes on PHP-FPM and phpredis

I have a Laravel 5.7 project and use redis for some caching. I have problem with redis driver predis vs phpredis. Predis often work well since it more simple (?)  But phpredis not work  (this one faster). This is due to my Dev server not use php-fpm as Production. So I forgot restart php-fpm to reflect phpredis install. This one reveal some good lessons.  First, production rarely restart so we have manually restart php-fpm.  Second, I have often check open port using netstat -pentl (sudo optional) And I assumed that php-fpm run on TCP port 900 or 900x because I see many setup forlow this way. So when list port open, I do not see 900x and think server not use php-fpm.  My mistake reveal when I use ps aux  and grep fpm. So ut use default setting, run over Unix socket .sock. Knowing system use php-fpm and I instanly understand why my phpredis install not work. Third, this is interesting. On the way to investigate why prod server not recognize phpredis. I try r...

Good web user experience and design ABC News

Oh i remember some really cool news website from au. Not know i posted somewhere. Like this one https://mobile.abc.net.au/news/2020-03-26/coronavirus-covid19-global-spread-data-explained/12089028?nw=0&pfmredir=sm The mobile view responsive is super useful since its graph as background and many animation. Content team graphic done most  but designer have some good points. Fortune.com magazine font is gorgeous. This short font like wwent Technology Today series https://media-exp1.licdn.com/dms/image/C4E0BAQFvG1Rw4XWuCg/company-logo_200_200/0?e=2159024400&v=beta&t=eijDXqT8Kny1nXYAFQ89eJ81CFCssXz-Od7yhTsZ0DY