Author: yodi

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

+ 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

Running Play Framework as services in Production Ubuntu

Running Play Framework as services in Production Ubuntu

Here are steps to deploy Play Framework to Ubuntu as services : 1. Stage 1activator stage 2. Setup services in /etc/init.d/your-play 12345678910111213141516171819202122232425262728293031323334#!/bin/sh ### BEGIN INIT INFO # Provides:          mdm # Required-Start:    $local_fs $remote_fs $network $syslog # Required-Stop:     $local_fs $remote_fs $network $syslog # Default-Start:     2 3 4 …

+ Read More

Solve integrity error duplicate key in Django PostgreSQL

Solve integrity error duplicate key in Django PostgreSQL

This error caused by we’re using database from copy / clone database. The sequences will be mixed-up. To solved this, just follow this way : 12python manage.py sqlsequencereset <app-name> > app.sql psql -U username -d database -a -f < app.sql Then your problem shall gone!

Tutorial Implementation Google Cloud Messaging (GCM) with Django

Tutorial Implementation Google Cloud Messaging (GCM) with Django

Setup GCM for Android Client and Django in Server require efforts to know how it’s works. Here are simple steps to setup the newest GCM (Google Cloud Messaging) in Android. To understand about GCM, the flow is : 1. Create a Google APIs GCM project, which generates SENDER_ID and API_KEY for server implementation. 2. An …

+ Read More

LAMPP Ubuntu in Softlayer

LAMPP Ubuntu in Softlayer

Quick guide for setup LAMPP server in Ubuntu : 12sudo apt-get update && sudo apt-get upgrade -y sudo apt-get install nginx php5-fpm php5-mysql mysql-server php5-mysql php5-dev php-pear php5 nmap vim

How to enable WSGIPassAuthorization in NGINX + DJango

How to enable WSGIPassAuthorization in NGINX + DJango

Just in case we need to enable “WSGIPassAuthorization” in NGINX, we can put this in nginx hosts 12345proxy_pass_request_headers on; proxy_no_cache $cookie_nocache  $arg_nocache$arg_comment; proxy_no_cache $http_pragma     $http_authorization; proxy_cache_bypass $cookie_nocache $arg_nocache $arg_comment; proxy_cache_bypass $http_pragma $http_authorization;

ERP Development Design

ERP Development Design

Here are the list we need consider when develop ERP. More in technical view. 1. Never trust Front-end validation We must separate between front-end validation and backend validation. Always check validation on backend to make sure the data is valid and correct. To avoid any data updates in the middle of process. 2. Audit-trail Audit-trail …

+ Read More

Upload PostgreSQL not working, change the encoding may help

Upload PostgreSQL not working, change the encoding may help

When we upload and restore the backup into new postgresql server, sometimes we facing problem because encoding. To solve this, we can use UTF-8 : 1update pg_database set encoding = pg_char_to_encoding(‘UTF8’) where datname = ‘your-database’;