Reset MySQL root password in Ubuntu

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 …

+ Read More

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

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 …

+ Read More

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

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

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 …

+ Read More

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

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 …

+ Read More

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

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”. …

+ Read More

Top mistakes learned by top notch CTO

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 …

+ Read More

Greendao test migrate database onUpgrade Google Play Store

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 …

+ Read More

Android simulate update application Google Play Store

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 …

+ Read More

Solve margin Searchview expandable and Toolbar Android

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

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 …

+ Read More

Fix disabled Lan settings configuration internet explorer in WIndows 10

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 …

+ Read More

Windows 10 Tweak and Setup

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. …

+ Read More

Fix taskbar search not working in Windows 10

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 …

+ Read More

Fix Django Grappelli Dropdown actions() not found / exists

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 …

+ Read More

Postgresql list table size

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

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 …

+ Read More

Installing Fatfreecrm in Ubuntu

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 …

+ Read More

Fix SSL not working on mobile browser RapidSSL

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 …

+ Read More

Install Zurmo CRM in Ubuntu 16.04 Xenial Xerus

Install Zurmo CRM in Ubuntu 16.04 Xenial Xerus

Here are step to install Zurmo CRM into Ubuntu 16.04 Xenial Xerus. Since Ubuntu 16.04 doesn’t have php5, we would like to install PHP5 1234sudo apt-get install software-properties-common sudo apt-get purge `dpkg -l | grep php| awk ‘{print $2}’ |tr "\n" " "` sudo add-apt-repository ppa:ondrej/php sudo apt-get update 1. Install php5.6 1sudo apt-get install …

+ Read More

Setup Django + WordPress Ubuntu 16.04 Xenial Xerus

Setup Django + WordPress Ubuntu 16.04 Xenial Xerus

Here is guide to setup Ubuntu 16.04 Xenial Xerus for Django and WordPress Development. First, we need to install dependencies software. 1. Install dependencies software Python, NGINX, PosgreSQL, MySQL and PHP5 1sudo apt-get install libpq-dev python-dev python-software-properties postgresql postgresql-contrib nginx git zip unzip build-essential python nmap libxslt1-dev python-pip imagemagick uwsgi uwsgi-plugin-python nmap mysql-server phpmyadmin libffi-dev …

+ Read More

Setup New Server Ubuntu 14.10 with Django, Python and PHP

Setup New Server Ubuntu 14.10 with Django, Python and PHP

Here is quickstep to configure a new server in Softlayer for Django and PHP development environtment. 12sudo apt-get update && sudo apt-get upgrade sudo apt-get install libpq-dev python-dev python-software-properties postgresql postgresql-contrib nginx git zip unzip build-essential python nmap libxslt1-dev python-pip imagemagick uwsgi uwsgi-plugin-python nmap mysql-server phpmyadmin libffi-dev libmysqlclient-dev libmysqlclient-dev libmysqlclient18 For Django sites-enables/ : 12345678910111213141516171819202122232425262728293031323334353637server …

+ Read More

Open Permission access custom for Django Rest Framework

Open Permission access custom for Django Rest Framework

When we need to open access for API Django-restframework, we can do it by extending the permission class. Here is some example: 123456789101112131415161718192021class PublicUserPermissions(permissions.BasePermission):     """     Granting public access permissions     """     def has_object_permission(self, request, view, obj):         # Allow get requests for all     …

+ Read More

Setup SSL Certification RapidSSL on EC2

Setup SSL Certification RapidSSL on EC2

Here are quickstep to generate SSL Certification 12openssl genrsa -out www.domain.com.key 2048 openssl req -new -key www.domain.com.key -out www.domain.com.csr 123456789101112Country Name (2 letter code) [AU]:ID State or Province Name (full name) [Some-State]:Jakarta Locality Name (eg, city) []:Jakarta Organization Name (eg, company) [Internet Widgits Pty Ltd]:PT POLATIC INFORMATIKA INDONESIA Organizational Unit Name (eg, section) []:IT Common …

+ Read More