Friday, January 5, 2018

Windows 10: entering windows repair mode

On my pc, windows 10 update often cause my PC to unstable (application error and system not responded after update).

This note, as my personal guide to enter windows repair mode.

To enter windows repair mode, do these steps:
  1. At window 10 login screen, hold shift button and click Power -> Restart.
  2. Next screen choose Troubleshoot and Advanced Options.
  3. There are some option to choose depend on what we want to repair:
    1. Command prompt (my favorite)
    2. Startup Setting
    3. Startup repair 
    4. others
  4. Then restart your windows, it will start your windows in repair mode.

For common troubleshooting do these sequence:
  1. sfc /scannow
  2. chkdsk c: /f
You may need to have handy windows update troubleshooter from micro soft site https://support.microsoft.com/en-ca/help/4027322/windows-update-troubleshooter

Thursday, December 28, 2017

Eclipse Oxygen: install Google Web Toolkit (GWT Eclipse Plugin)

To Install Google Web Toolkit (GWT Eclipse Plugin)
  1. Go to Help -> Eclipse Marketplace ...
  2. In Find type gwt (All Markets and All Categories) click Go
  3. Choose GWT Eclipse Plugin 3.0.0 (at time this note write) to install
  4. Choose all GWT plugin and accept all terms and conditions, click Finish
  5. Done

Reference:
  • http://marketplace.eclipse.org/content/gwt-eclipse-plugin

Saturday, December 23, 2017

Eclipse Oxygen: install SWT plugin GUI Designer

Tested on:
  1. Eclipse version: 4.7.2
  2. JDK 9.0.1
To install SWT plugin GUI Designer:
  1. Help -> Install New Software...
  2. Work with: --All Available Site--
  3. Type Filter Text: swt
  4. Select/check (undeer General Purpose Tools
    1. SWT Designer
    2. SWT Designer Core
    3. SWT Designer Documentation 
    4. SWT Designer SWT_AWT Support
    5. SWT Designer XWT Support (requres Eclipse WTPWST)
  5. Click next and Finish
To use it:
  1. Open or create Java Project
  2. New -> Other -> Window Builder -> Swing Designer -> Application Window
  3. Click Next
  4. Fill form (for example):
    1. Package: com.dedetok
    2. Name: MyTestSWTClass
  5. Click Next and Finish
Reference:
  • http://www.vogella.com/tutorials/EclipseWindowBuilder/article.html



Install apk application using adb via usb

Connect your device via USB. Makse sure your device has Developer options enable, and USB debugging checked.

Run adb in cmd, for example in Mito A150:
>adb devices
List of devices attached
J32V2ML17X026640        device

>adb -s J32V2ML17X026640 install d:\BT-POSPrinter.apk
d:\BT-POSPrinter.apk: 1 file pushed. 1.7 MB/s (259008 bytes in 0.148s)
        pkg: /data/local/tmp/BT-POSPrinter.apk
Success


References:
  • https://developer.android.com/studio/command-line/adb.html 

Debian Stretch: restrict SMTPD in Postfix

We use Sorbs.net and SpamCop.net service for restrict our SMTPD in postfix.

Add/edit /etc/postfix/main.cf:
...
smtpd_recipient_restrictions = reject_invalid_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, reject_unauth_destination, reject_rbl_client bl.spamcop.net, reject_rbl_client dnsbl.sorbs.net, permit_sasl_authenticated
...

Restart your postfix
# service postfix restart

Watch your postfix status
# service postfix status

References:
  • http://www.sorbs.net/mailsystems/postfix-2.3.shtml 
  • https://www.spamcop.net/fom-serve/cache/349.html