vim-world and Rimworld

Recently, immersed in vim-world and Rimworld

Advertisements

rbenv setup with ZSh and Oh-my-zsh

rbenv is an utility program to manage multiple Ruby programming language runtime versions.

ZSh is an alternative shell for *nix system. Oh-my-ZSh is framework for ZSh which supports themes and plugins.

rbenv provide comprehensive installation methods for different shells. This post describes the use of oh-my-Zsh rbenv plugin for rbenv setup.

  1. Install rbenv (do not add losing and init script to your .zshrc)
  2. Install plugins/rbenv in oh-my-Zsh
  3. Remove loading and init lines (if they were installed) – optional

Good things about this approach

No need to append rbenv line to .zshrc or calling rbenv init function. Those will be taken care by the plugin.

Facebook recognises Zawgyi-One font as separate language in Myanmar

Facebook zawgyi-font

Facebook recognises Zawgyi-One as a separate language used in Myanmar. This is the result of the most Burmese speaking/typing users using Zawgyi-One font.

According to Facebook, Unicode is denoted by my_MM and Zawgyi by qz_MM. They label it as Burmese (Zawgyi).

MM is two-letters country/region code for Myanmar and my is two-letters language code for Myanmar (Burmese). They use qz for Zawgyi-One font. According to Best Current Practice for Language Tags by IETF, QZ is reserved for private use.

Myanmar unicode is superior in technology but adoption rate is low according to various reasons. Zawgyi-One is not unicode standard compliant and no longer being maintained or developed. However users are familiar with it and it is going to stay for a foreseeable future.

Solving KeyMagic program crash

KeyMagic is a keyboard program that allows user to switch to various keyboard layout such as Myanmar Smart Keyboard, ZawGyi keyboard, etc.

We have been supporting offices using Myanmar Unicode with KeyMagic for some times now. One of the common problems we usually encounter is user suddenly cannot open KeyMagic program.

This is the steps we carry out to solve the problem

  1. Close KeyMagic program file (make sure there are no more KeyMagic.exe under Task Manager)
  2. Move the user.config file under the following directory to somewhere (for backup)
    C:\Users\\AppData\Local\Thant_Thet_Khin_Zaw\KeyMagic.exe_Url_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\1.5.0.0
    
  3. Then restart the KeyMagic program

Note

  • replace with actual username
  • in place of xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx you will see random character likes kbk1hsvhhgustjayof3hzsq5ln203ol0

Some technical details

  • OS: Windows 7 64 bit

Quick Test Sending Mail in PHP

This is how I test my php code sending mail (with mail() function) using

Install MailCatcher

sudo apt-get install ruby ruby-dev

sudo gem install mailcatcher

Start PHP server

php -d sendmail_path="env /usr/local/bin/catchmail -f noreply@domain.com" -S 0.0.0.0:8080

Start MailCatcher

mailcatcher

Run and check

  • Run the script by visiting the page (that sends mail)
  • Check the mail at

Related tasks

  • check which php.ini is in effect by running php --ini
  • check sendmail_path has been set correctly or not by using echo phpinof() in a page
  • check the path of catchmail by running which catchmail
  • close the mailcatcher server from web interface
  • read mailcatcher help by running mailcatcher --help
  • read php help php --help