This is just the result of my assignment at university

Overview of the website

The website is about an Electronic Medical Record (EMR) system that support management patient treatment in medical facility such as clinic or hospital. Detail requirements can be found in the pdf file inside the repo on github.

Functional details

The website allows users to manage and maintain the record of medical services provided by various hospitals. It focuses mainly on patients and their visit history as well as the symptoms, prescriptions and lab orders of each visit.

These are some main entities in the application: Patient, Doctor, Hospital, Visit, Prescription, Lab Order, Drug, Drug Group, Medical Service, Medical Service Group, ICD, ICD Chapter and User. For each entity, the website provides 6 basic operations: add new, update, delete, view all, view one item and search.

Read more

In most browsers, the Esc key is used to stop the browser from loading a web page. In some web pages, for example Facebook, the Esc key has other functionality. When you click on an image on Facebook, another layer for displaying that image will appear. If the Esc key is pressed, that layer will disappear and you will be taken to the previous page. Similar things happen in some gallery pages, too.

However, in Conkeror, when the Esc key is pressed, the browser will release the focus on the currently focused element (if any) and after that move the focus to the top frame. In some circumstances, it can cause problem when both the current element will lost the focus and the web page will also execute the special funationality bind to Esc while you want only one of them to be activated.

Look at this example below, you cursor is now inside a textbox. After typing some text, you want to unfocus the current textbox and then follow the button (Share Photo) to share that post to your timeline. But if you press Esc, the dialog will disappear because Facebook also bind the Esc key to Close the dialog.

Read more

Introduction

cover

A free Dropbox account with 2GB of storage (can be up to 30GB for completing some goals) seems to be not enough for our need. Also, for some people, they want to separate Dropbox into 2 accounts, one personal use and one for business. However, normally, we can use just one dropbox account at a time on our computer. This article will demonstrates two methods to bypass Dropbox desktop application and force it to run with multiple accounts concurrently.

Run as another user

Have a look at the this post Exploit Unix user account feature, especially the second part to know how this method works. The syntax of command looks similar to this

$ su username -c dropbox

This is tested successfully on MacOS, Linux Mint with Cinnamon desktop environment. On Ubuntu Linux with Unity, KDE and XFCE desktop, I think there is a problem with the GUI, which prevents Dropbox from running using this method.

If you are on MacOS, you can refer to this article MacOS - Using multiple Google Drive accounts at the same time. You can follow the instruction there with a few changes to automate everything on MacOS.

Read more

It’s a bit complicated when I first setup VirtualBox to boot a virtual machine from my Bootcamp partition on my Mac. Unlike Parallel where everything is automatically set up, in VirtualBox, we need to manually create the virtual machine file by command line and change the permission properly for the virtual machine to work. This is a summary of what I have configured as well as how to automate everything.

Change the permission

You need to change the permission of the volume so that VirtualBox can read and write on it. Open terminal and execute the command

$ df -h

df

Locate your bootcamp partition, remember the corresponding file in /dev folder. Next, change the permission of that file and disk0 (can be disk1, disk2,… in your case).

$ sudo chmod 777 /dev/disk0 /dev/disk0s4

Unmount Bootcamp partition

Assume that the Bootcamp partition has the name BOOTCAMP, we need to eject this volume. There are several ways to do this. You can open Finder and click eject the drive or eject it in disk utility. However, I prefer command line and also I will use it later for the automation step. This is the command for unmounting the volume

Read more

Introduction

For most people when they first come to Unix (or Unix-based, Unix-liked OS such as MacOS, Linux,…), usually one of the most confusing thing is the user account (home directory, permission,…). This article will provide an overview of some basic features about user account as well as some useful tips to take advantages of these features in Unix system.

Home directory

What is Home directory

First, let me explain what is Home directory in Unix system. In multi-user Unix systems, each user has it own home directory. It’s the folder which that user has the full read-write access. That user’s files is protected from other users in the same system, except for root. It’s also the place for the system to store that particular user’s preferences, habits and profile for applications. This mean the system as well as the applications can behave differently, apply different settings for each user thank to the config files stored in each user’s home directory.

Windows users have not been familiar with the term Home directory until those recent version of Windows. In the past, the home folder for each Windows user is the My Document folder. In Windows 7, each user have there own home folder user C:\Users. However, the design of home folder on Windows is not as good as one on Unix system.

Read more

Magit is one of the best tool for working with git. However, it’s a package ship with Emacs, not a standalone application, which prevents many non-emacs people from using it because they don’t want to deal with all the configuartion in the init file. Luckily, there is a python script called magit-wrapper https://github.com/ubolonton/magit-wrapper, which can help that kind of people and act as a gateway drug to Emacs. Moreover, Emacs users can use it for working with files on a remote server to avoid having to install all the Emacs GUI and the full user init .emacs.d folder.

Screenshot

Read more

Warning: this solution is no longer available on newer version of OSX. I tested it on Mac OS 10.6 long time ago. Please don’t ask me about any problem about it because I use only one Google Drive account now :)

Introduction

For several months, I have been using only one Google account for storing and syncing my files between computers. It is really a great tool since it’s integrated deeply with many Google services (which I use everyday). However, the storage is a problem for most cloud drive service. Before that, it offers only 5GB for free and now 15GB, still not enough for me even when I use the email that my university provided (with the capacity up to 30GB for free). Today, while I was browsing my Google Drive, I suddenly thought that it would be very nice if I can combine all my Google accounts’ storage capacity because I have 4 daily used Google accounts. The problem is that Google has restricted the Google Drive desktop app to be able to run one single instance with one profile at one time. That led to the inconvience when I have to disconnect and then re-login into another account and select the right folder for it everytime I want to change account.

Finally, after a whole hour Google searching for a solution to use multiple GDrive accounts without any results, I decided to do it on my own. Luckily, after spending all of my weekend afternoon researching shell commands, I have successfully come up with a nearly perfect solution for using multiple Google Drive accounts on my Mac.

Read more

Introduction

Nowaday, with the development of technology, you probably own more then one technological devices. You can have a Windows PC for playing games at home, a MacOS computer for working purpose and a Windows Phone one for on-the-go entertainment. One popular problem for people who have than one devices is managing, organizing their files, especially music library (other types will be discussed in other articles).

Luckily, if you are using Android devices along with your computer, there is a solution from Google called Google Play Music. It helps you centralize your music library on the cloud for easy management. It also provides the ability to organize the music library by artist, album, playlist,… You can then listen to your collection online from any computer with an Internet connection and ofline on Android with the help of Google Play Music app.

Requirements

  • At least one computer (Windows, MacOS, Linux) for uploading music
  • An Android device (for on-the-go music)
  • A Google account
  • Google Music Play app musiXmatch (if you use Android)
Read more

Today, I have released some minor update for tmtxt dired async library (an asynchronous execution library for emacs dired).

tmtxt dired async Homepage

The update fixes some minor issues and add some more features as below

Get size of multiple files

This feature uses the command du to calculate the total size of all marked files.

(define-key dired-mode-map (kbd "C-c C-s") 'tmtxt/dired-async-get-files-size)

Stop all current async tasks

This function helps you stop all currently running async taks.

(define-key dired-mode-map (kbd "C-c C-k") 'tmtxt/dired-async-kill-all)
Read more