Skip to main content

Posts

How to handle big issue on live server that already broke a lot of user data

How to handle big issue on live server that already broke a lot of user data Have you ever caused a big problem on production and panicked, not knowing what to do to remedy the shitty situation you've just caused? Well, I did. So here's what I've found. 1. Find what caused the issue Its probably the most recent changes you've just pushed. If not, then try to remember whatever code you're ever had doubt in, it's usually one of these. If you cant find it, tough luck. Lets move to the next step. Don't spend too much time on finding the rootcause. 2. Stop the function that caused the issue (eg:cron that cancels invoice) In my case, it was a cronjob. Easy fix, just disable the cronjob on both the server and in the codebase. If it was a crucial add/update process, then just disable it in the code, returning an alert 'something went wrong, we're currently fixing it' should suffice. Just make sure to apologize to your support person later. 3. Update curr...

Chore:self-improvement-2

This is part 2 of my series of self-improvement posts. In this post, we will dive into the concept of productivity. What the heck is productivity? For me, its the feeling of accomplishment when doing an activity. Some activity can be extremely beneficial and could help you in the long run, while some are merely 'time-killer'. Spending time: working/side projects in nature working out with family & friends doing hobbies sleeping Not productive: doom scrolling consuming brainrot contents over sleeping All of the listed above is correct. as long as it can be beneficial in some form. You define what productivity is. don’t let anyone judge you. Here's some justifications on the activities listed above: working = skills for career in nature = mental & physical health working out = physical health with family & friends = relationship & mental health doing hobbies = self reward & mental health sleeping = physical & mental health You might argue that social m...

Chore:self-improvement

Basically my take on how to slowly fix your life, from the smallest change possible. Result not guaranteed. Motivation sold separately. Understand what a good life is: a good year a good month a good week a good day Start small. You are born small, but now look at how much you’ve grown. ;D Focus on yourself.   Look at the mirror, you can be prettier. Clean environment = clean thoughts. Better looks, better self-esteem. Maybe a you need a new haircut or a clean shave. The internet sucks, get off it. While there are positivity, its just better to leave it for a moment and gather your thoughts. Touch grass, literally. It’s been scientifically proven that greeneries can boost your mood. Balance things out. Prioritise these properly & carefully: Career Relationships Fun Finance How to execute plans Set goals. Cant achieve them? Lower your standards. Set a floor goal and a ceiling goal. Still cant achieve them? Have you tried breaking them into smaller tiny goals instead of one big o...

Useful ionic spells

Useful ionic spells Some commands i often forgot: npm install - install npm. literally thats it npm audit - check for dependency issues npm audit fix - fix all dependency issues ionic serve - open in localhost with browser ionic cap add android - for new repos, add android files first ionic cap build android - build the project for android platform ionic cap sync - sync latest changes to make sure its included in the final apk ionic cap open android - open android studio to build apk/test with emulator Basic errors and how to fix: capacitor/core version not compatible with certain dependency - just upgrade/downgrade the capacitor/core version in package lock json cocoapods error - make sure you have cocoapods & xcode installed. ios error - if you’re just trying to generate an apk, delete the whole ios folder and run ionic cap sync again. gradle error in android studio - for me, i just close android studio, reopen it and then when theres an alert to update gradle, just c...

Perbezaan Product / Project / Customization / Whitelabel

Perbezaan Product / Project / Customization / Whitelabel Product - Kita sendiri hasilkan. Kita jual pada customer. Subscription based payment untuk guna product. Project - Customer minta kita buat sistem. Customer nk guna, atau customer nk jual pada orang lain. Payment one-off atau beberapa payment. Customization - Kita customize product kita untuk certain customer. Guna repository & server sama as normal product, cuma ada checking, kalau organization tu ada customization, dia akan keluar menu/feature baru. Whitelabel - Product sedia ada, kita jual kepada customer untuk kegunaan organization diorang. Whitelabel guna repository sama dengan product. Tapi ada server sendiri, asing dengan product.   Example:   product - app.smap.my   whitelabel - ppa.smap.my

Laravel Basics & API Development

  Laravel Basics & Introduction   How to install & create Laravel projects Run these commands: composer global require laravel/installer composer create-project --prefer-dist laravel/laravel [app-name] cd [app-name] Open the project folder in VSCode, and find the ‘.env’ file. Configure it like so: DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=8889 DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD=root Note that the configurations above works on my mac running mamp. Your machine may vary. Run the project by using this command: php artisan serve (optional) php artisan serve —port 8002 Then go to this link -> http://127.0.0.1:8000 Create a controller php artisan make:controller [controller-name] Create a model php artisan make:model [model-name] API Development with Laravel API - Application Programming Interface How API works: Request - client initiate Receive - the API provider receive your request Response - API returns the requested data, usually in JSON format API ...