Author: yodi

  • Solve react native error Invalid regular expression: /(.*\\__fixtures

    When you run 1expo start and found error like below: 1234error Invalid regular expression: /(.*\\__fixtures__\\.*|node_modules[\\\]react[\\\]dist[\\\].*|website\\node_modules\\.*|heapCapture\\bundle\.js|.*\\__tests__\\.*)$/: Unterminated character class. Metro Bundler process exited with code 1 Set EXPO_DEBUG=true in your env to view the stack trace. There some advice to downgrade your NodeJS into version 10. Some solution that works for me is: Go to node_modules […]

  • Cmder bashrc and show virtualenv in Windows 10

    Cmder bashrc and show virtualenv in Windows 10

    Cmder is very useful tools to replace Linux console in Windows 10. Using bash linux in Windows may loose the benefit of installing software in local environment itself. To setup Cmder showing ZSH, bashrc and virtualenv in Windows 10, we just need to put a “Lua” file in config folder. Here is the quickfix: 1. […]

  • WordPress 5 NGINX configuration for http https www and non-www

    Here is my wordpress’s NGINX configuration to redirect all the http and https traffic, from non-www/www into www.yodiaditya.com. I’m using Letsencrypt SSL with Ubuntu for this.

  • Fix Sounds External Not working after sleep on Lenovo X1 Windows 10

    This is the most frustrating bug in Lenovo and Windows 10, where the external sound monitor is not detected after wakeup from sleep. I have LG monitor with speakers connected via USB C to Lenovo X1 Extreme. Took me a while to figure out where is the issue and there no enough clues about solving […]

  • Enable Google Chrome Import Password Missing

    Today i’ve downloaded google chrome version 78 and found that flags for importPassword is missing. To enable this features on Windows 10, here is the step: 1. Create google chrome desktop shortcut 2. Right click and go to properties. 3. In the target section just add this code at the end without quotes ” –enable-features=PasswordImport” […]

  • Install Windows 10 in X1 Extreme / X1 Carbon 6th via USB

    Installing windows 10 in Thinkpad X1e or X1 Carbon can be tricky. There are several problems that may occur during this installation. This is quite frustrating until we found the right approach. Here are common issues: 1. Installation USB not detected or not bootable I found this issue because i use USB 8GB (better 16GB […]

  • Reset MySQL root password in Ubuntu

    Here are quick steps to reset mysql root password in Ubuntu 1. Stop the mysql service instance by 1sudo service mysql stop 2. Start mysqld daemon 12sudo mkdir -v /var/run/mysqld && sudo chown mysql /var/run/mysqld sudo mysqld –skip-grant-tables &

  • Renew Letsencrypt SSL in Ubuntu Linux and fix failed authorization procedure

    Renew Letsencrypt SSL in Ubuntu Linux and fix failed authorization procedure

    When i tried to renew SSL certificate of Letsencrypt, using ” sudo letsencrypt renew ” i found caught error. It’s said “produced an unexpected error: Failed authorization procedure.” I took me a minute and realized that letsencrypt check on authorization acme-challenge on HTTPS instead of HTTP. Where this is because i forced all traffic into […]

  • Install WordPress AWS EC2 Ubuntu 18.04 Bionic Beaver NGINX + PHP-FPM

    Here is a quick steps to install wordpress in latest ubuntu 18.04 Bionic Beaver 1. Download dependencies 123sudo apt-get install nginx mariadb-server mariadb-client sudo mysql_secure_installation sudo apt install php-fpm php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-ldap php-zip php-curl 2. Setup WordPress 12wget -c wget https://wordpress.org/latest.tar.gz tar -xvvf latest.tar.gz 3. Setup SSL using […]

  • Fix wordpress 5 auto add P and br tags in code or post

    After upgrade wordpress, i found that the content writing post now different than previous. The most annoying part is there automatically adding p and br tags. I just realized this is because wordpress have a new editor called Guttenberg. To avoid this and revert back to previous editor, just install : https://wordpress.org/plugins/classic-editor/

  • Upgrade Latest WordPress AWS EC2 without FTP

    Here is a quickstep upgrade wordpress in AWS EC2 Ubuntu without FTP. Restart your NGINX and PHP-FPM just in case 1. Download the latest code 12cd ~/ wget -c https://wordpress.org/latest.zip unzip latest.zip 2. Go to your wordpress folder 1234mkdir ~/backup mv wp-includes ~/backup/ mv wp-admin ~/backup/ mv wp-settings.php ~/backup/ 3.Update the wp-includes, wp-admin and wp-settings.php […]

  • Setup Letsencrypt in AWS EC2 Ubuntu Yakkety, Xenial or old version and fix issues NGINX

    To setup letsencrypt in Ubuntu, first go to SSH into your server. In this case, i will use my own domain as example. I found few issues when doing this step. If you facing similar issues in setup letsencrypt including “invalid certificate” on NGINX, This article will help you to fix that. 1. Install manual […]

  • Fix Ubuntu apt-get update ign on AWS EC2 Yakkety, Xenial and other version

    I tried to login into old EC2 AWS ubuntu server and doing apt-get update. I got issue with so many “IGN” where no hit. I thought this issue because source.list. Apparently this issue because now ubuntu have different path for software update for old ubuntu version. Please use this to replace your “us-west-2.ec2.archive.ubuntu.com” into “old-releases.ubuntu.com”. […]

  • Top mistakes learned by top notch CTO

    Today i had breakfast with quite prominent CTO, yet he super humble. here are the list of top lesson learned from him. 1. Critical Thinking is key difference between good and best developer Become software engineer meaning problem-solver at heart. Always asking questions and find root of cause / culprit. Thinking about edge case could […]

  • Greendao test migrate database onUpgrade Google Play Store

    To simulate migration database or trigger onUpgrade() on DevHelper in GreenDao, the step will be: 1. Use simulate update app like in Google Play Store Follow this : http://www.yodiaditya.com/android-simulate-update-application-google-play-store/ 2. ALWAYS UPDATE SCHEMA VERSION GREENDAO yes, i put this capitalized because it’s very important! For instance: 12345greendao {     schemaVersion 5     daoPackage […]

  • Android simulate update application Google Play Store

    To simulate update android application from Google Play Store, we can use adb and Android Studio. Here is the step by step: A. Generate APK 1. Go to Android Studio -> Build -> Builds (APK) 2. Switch mode to Project 3. Copy app/build/outputs/apk/debug/app-debug.apk to any folder B. Deploy with adb 1. Go to the folder […]

  • Scroll layout when keyboard show up without focus changing in Android

    This is tricky situation when user see softkeyboard show-up, but the are couple of edittext or button hiding behind it. To tackle this, we can add focus listener and make scrollview scroll to bottom without focus changing.

  • Solve margin Searchview expandable and Toolbar Android

    This margin / padding issue often occured when searchview widget have left space that push another icons in toolbars. To solve this issues, we remove padding left in toolbar and adjust the TitleMarginStart margin accordingly. This is example of the codes:

  • Android editext textwatcher thousand separator no lag or slow

    I’m a bit curious that editext using textwatcher to manipulate into thousand comma separator perform really slow after lolipop version. Mostly the tutorial shared the solution is remove and add listener on TextWatcher and make manipulation directly to EditText. Performance issue is the issue from this approach. Here are snippet for edittext thousand separator with […]

  • Android Cardview remove space margin in Pre-lolipop

    Cardview post-lolipop will not have space margin bugs. To avoid this UI Bugs, use the xml below:

  • Fix disabled Lan settings configuration internet explorer in WIndows 10

    This problem triggered when windows 10 lan’s settings is disabled. It’s showing message “Unable to Change Proxy Settings! “Some settings are managed by your organization or administrator”. To solve this issues: 1. Go to Regedit (WIN+R and type regedit) 2. HKEY_LOCAL_MACHINE > Software > Policies > Microsoft > Internet Explorer > Control Panel 3. Change […]

  • Windows 10 Tweak and Setup

    Here are the list of Windows 10 tweak installation to reduce memory consumption. A. Disable Cortana1. Hit the Start key, search for Edit group policy, and open it.2. Navigate to Computer Configuration > Administrative Templates > Windows Components > Search.3. Find Allow Cortana, and double-click to open it.4. Click Disabled, and then hit OK. B. […]

  • Fix taskbar search not working in Windows 10

    After installed Windows 10, everything works fine until i made some changes on driver and shutdown firewall. Typing in windows search or settings not working. Cortana already running, but seems it’s not solving the problems. To problem taskbar search issues in Windows 10 usually happened because “ctfmon.exe” is not running. This service is required to […]

  • Fix Django Grappelli Dropdown actions() not found / exists

    I found this issues already there quite sometimes. When opening Django admin Grappelli and found error: $(“tr input.action-select”).actions(); Here are checklist we should do: 1. Make sure we have right order in loading django-grappelli before `django.contrib.admin` 2. Correct STATICFILES_FINDERS : 1234567# List of finder classes that know how to find static files in # various […]

  • Postgresql list table size

    Here is a quick script to list all tables and sort by size content : 12345SELECT    relname as "Table",    pg_size_pretty(pg_total_relation_size(relid)) As "Size",    pg_size_pretty(pg_total_relation_size(relid) – pg_relation_size(relid)) as "External Size"    FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;

  • How to Debugging Inspect Element Samsung Browser in Smartphone / Mobile

    How to Debugging Inspect Element Samsung Browser in Smartphone / Mobile

    When we develop mobile website, sometimes we found some bugs that only produced in Mobile Browser. For instance, Object.assign() is javascript method that may not supported in many mobile browser. If we want to debug or inspect element in smartphone browser, we can use Google Chrome Remote Debugging features.

  • Install Celery 3.1.25 in Django 1.10 with Ubuntu 16.04 Production

    Celery is awesome tools to manage queue in Django. It’s can reduce processing time in serial / sync process. For instance, we have schema for registering user: 1. User click on Sign-up Button 2. We create and save into records (1 second) 3. Signals trigger send SMS to User (1 second) 4. Signals trigger send […]

  • Installing Fatfreecrm in Ubuntu

    Here are the quick guide: 1sudo apt-get install ruby-dev libsqlite3-dev ruby libmagick++-dev libxml2 libxml2-dev libxslt1.1 libxslt1-dev libyaml-dev libpq-dev Then follow this: http://guides.fatfreecrm.com/Setup-Linux-or-Mac-OS.html Now for passenger: 12345cd fat_free_crm rvm install ruby-2.3.3 rvm gemset empty gem install bundler bundle install Configure `/etc/passenger/fat_free_crm.yml` and edit NGINX 123456789101112131415server {     listen       80;     server_name […]

  • Fix SSL not working on mobile browser RapidSSL

    To solve this, we need to make sure our installation of SSL is correct. Please check your current website via https://cryptoreport.rapidssl.com/checker/views/certCheck.jsp. It will show you the missing SSL Certificate. Please download it into your server. The next step will be: 1. go to /etc/ssl 2. move your current domain.crt into another file 3. then concatenate […]