Showing posts with label tool. Show all posts
Showing posts with label tool. Show all posts

Monday, February 1, 2016

Have fun with cross platform mobile development

A short presentation about a sample cross platform mobile project called TumChatter for both Android and iOS.





You can find the project on github at the link below:-
https://github.com/have-fun/TumChatter

Programming Language: Kotlin
Frameworks: Java, RoboVM
Dependency Injection: Dagger 2
Json: Gson
REST Client: Retrofit
Reactive Libraries: RxKotlin, RxJava
Unit Testing: Spek (Specification Framework), AssertJ, Mockito
Embedded Server: TumWeb, Nanohttpd
Android UI Binding: KotterKnife, ButterKnife


Saturday, June 1, 2013

Install httrack using brew on Mac

Typed
brew install httrack
Then I got:-
==> Downloading http://download.httrack.com/httrack-3.46.1.tar.gzAlready downloaded: /Library/Caches/Homebrew/httrack-3.46.1.tar.gz
Error: SHA1 mismatch
Expected: be6328d2ff3cbabd21426b7acc54edcf1ebb76e0
Actual: 237fca7a9c5c63b53c5d0134dac6e5714422384c
Archive: /Library/Caches/Homebrew/httrack-3.46.1.tar.gz
(To retry an incomplete download, remove the file above.)
So I did:-
brew update
Then I got:-
error: The following untracked working tree files would be overwritten by merge:     Library/Formula/libmusicbrainz.rbPlease move or remove them before you can merge.AbortingError: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master
To fix it, I did:-
cd /usr/local
git fetch origin
git reset --hard origin/master
After that, I could run "brew update" and "brew install httrack" again with no problem. 

Refs
http://forum.httrack.com/readmsg/25812/25794/index.html
http://apple.stackexchange.com/questions/36862/install-homebrew-package-and-ignore-md5-hash
http://stackoverflow.com/questions/10762859/brew-update-the-following-untracked-working-tree-files-would-be-overwritten-by

Friday, June 15, 2012

Running Tomboy Note-Taking App on Mac


When running Tomboy 1.10.2 on Mac OS X Lion with Mono 2.10.9 installed, I got this error:-
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for IgeMacIntegration.IgeMacDock ---> System.EntryPointNotFoundException: ige_mac_dock_get_type
I found that the ige-mac-integration-sharp.dll library used by Tomboy is not compatible with libigemacintegration.dylib in Mono 2.10.9 (some external functions don't exist any more). I'm new to Mono and this library and I just wanted to get Tomboy to run on Mac and also wanted to keep the latest version of Mono so I did a dirty fix by doing the following:-

  • Build Tomboy.
git clone git://git.gnome.org/tomboy
xbuild Tomboy-mac.sln
./bundle-mac-app.sh
  • Copy libigemacintegration.0.0.0.dylib from Mono 2.6.x to Tomboy.app/Contents/MacOS and rename it to libigemacintegration.dylib

  • Transfer all notes from my Ubuntu machine to Mac.
cp /Volumes/tom-ubuntu/.local/share/tomboy/*.note /Users/tomtanti/Library/Application Support/Tomboy/
  • Run Tomboy for testing.
open Tomboy.app
  • Move Tomboy.app to Applications so that I can simply run it from there in the future.
Refs

Monday, February 6, 2012

Firefox 10 keeps crashing

After upgrading to Firefox 10, the new version kept crashing every time I opened it. Running it in safe mode (firefox -safe-mode) didn't help.



I ended up creating a new profile to fix this problem using the following command and switch:-
firefox -P
All plugins were gone and needed reinstalling. I could get some data back though from the old profile folder in
/home/tom/.mozilla/firefox/xxxx.default
Refs
http://ubuntuforums.org/showthread.php?p=11595179


Friday, January 13, 2012

Make Eclipse look better on Ubuntu

  • Compact the look and fix unreadable selected entry in content assist in some themes (e.g. Ambience) by creating a new text file called "gtkrc" (a stylesheet file for GTK apps) with the following content:- 
gtk-color-scheme = "selected_text_color:#000000"
style "compact"
{
  GtkButton::default_border={0,0,0,0}
  GtkButton::default_outside_border={0,0,0,0}
  GtkButtonBox::child_min_width=0
  GtkButtonBox::child_min_heigth=0
  GtkButtonBox::child_internal_pad_x=0
  GtkButtonBox::child_internal_pad_y=0
  GtkMenu::vertical-padding=1
  GtkMenuBar::internal_padding=1
  GtkMenuItem::horizontal_padding=4
  GtkToolbar::internal-padding=1
  GtkToolbar::space-size=1
  GtkOptionMenu::indicator_size=0
  GtkOptionMenu::indicator_spacing=0
  GtkPaned::handle_size=4
  GtkRange::trough_border=0
  GtkRange::stepper_spacing=0
  GtkScale::value_spacing=0
  GtkScrolledWindow::scrollbar_spacing=0
  GtkExpander::expander_size=10
  GtkExpander::expander_spacing=0
  GtkTreeView::vertical-separator=0
  GtkTreeView::horizontal-separator=0
  GtkTreeView::expander-size=12
  GtkTreeView::fixed-height-mode=TRUE
  GtkWidget::focus_padding=0

  font_name="Liberation Sans,Sans Regular 8"
  text[SELECTED] = @selected_text_color
}
class "GtkWidget" style "compact"
style "compact2"
{
  xthickness=1
  ythickness=1
}
class "GtkButton" style "compact2"
class "GtkToolbar" style "compact2"
class "GtkPaned" style "compact2" 
  • To use the above stylesheet with Eclipse (my version is Indigo - 3.7.1), run Eclipse like this:-
GTK2_RC_FILES=$GTK2_RC_FILES:/somewhere_1/gtkrc /somewhere_2/eclipse
  • Make tooltip readable by using #000000 as its foreground colour (tooltip_fg_color) and #f5f5b5 as background (tooltip_bg_color) in the following files:- 
/usr/share/themes/<your-current-theme>/gtk-3.0/settings.ini
/usr/share/themes/<your-current-theme>/gtk-3.0/gtk.css
/usr/share/themes/<your-current-theme>/gtk-2.0/gtkrc
  • Install Eclipse theme colour plugin and may want to try my TumCode theme which keeps the number of colours to the minimum.
     
  • Replace the default "Monospace" font with "Liberation Mono" and optionally reduce the font size to 8 or 9.
Windows -> Preferences -> General -> Appearance -> Colors and Fonts
(for Java Editor Text Font, Javadoc display font, Properties File Editor Text Font, etc.)

Here is how it looks after the above changes:-

Refs
http://blog.xam.dk/?p=70 
http://askubuntu.com/questions/70599/how-to-change-tooltip-background-color-in-unity
http://blog.valotas.com/2010/02/eclipse-on-linux-make-it-look-good.html

Monday, December 12, 2011

VirtualBox: Failed to access the USB subsystem

To fix this error, just add the user name to the "vboxusers" group but the User Accounts manager in Ubuntu 11.10 is quite terrible, too simple to be useful so use a command line to do this instead:-
sudo usermod -a -G vboxusers <user-name>
The other option is to install and run the old Accounts manager.
sudo apt-get install gnome-system-tools
users-admin
Refs
http://www.liberiangeek.net/2011/10/add-users-to-existing-groups-in-ubuntu-11-10-oneiric-ocelot-2/
http://linux-software-news-tutorials.blogspot.com/2011/11/restore-old-account-manager-in-ubuntu.html

Friday, December 9, 2011

Unable to locate theme engine in module_path: "pixmap"

I got the following warning when running the update-java tool.
(gksudo:5045): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap"
To fix it, run
sudo apt-get install gtk2-engines-pixbuf
Refs
https://bugs.launchpad.net/ubuntu/+source/quickly/+bug/853232

Saturday, October 15, 2011

Get TimeCult running on Linux

TimeCult is a simple but powerful task management and time tracking application. A hierarchy of projects, activities and tasks can be created and displayed in a tree view.



To get it running on Linux,

java -jar timecult.jar
Refs
http://sourceforge.net/projects/timecult/reviews

Monday, October 10, 2011

Add taskbar in Ubuntu (Unity)

Panel tint2 is an awesome customisable taskbar that has excellent dual monitor support. It also has system tray (notification area).

To install,run
sudo apt-get install tint2 


To customise tint2, run
tint2conf

Refs
http://www.liberiangeek.net/2011/10/add-taskbar-in-ubuntu-11-0411-10-with-panel-tint2/

Saturday, October 8, 2011

Unity Launcher and QuickList Editor

Install Bazaar Version Control System.
sudo apt-get install bzr
Download the Unity Launcher Editor code from Launchpad.
bzr branch lp:unity-launcher-editor
Run the editor.
./unity-launcher-editor/ule




Refs
http://www.ultimateeditionoz.com/forum/viewtopic.php?f=23&t=2671
https://launchpad.net/unity-launcher-editor

Saturday, September 24, 2011

Synchronising Folder Problem in Evolution Mail

My Evolution Mail kept synchronising one of the existing folders whenever I clicked on it or read any of the emails inside the folder.


Forcing Evolution to re-index its mailbox file by deleting the associated files with the extensions ".index", and "cmeta" in "~/.local/share/evolution/mail/local/Inbox.sbd" didn't help. The size of the mailfox file for that folder was surprisingly 4GB. Not sure this is the cause of the problem though.

To fix this, I

  • Created a new folder in Evolution.

  • Moved all emails from the folder that had the problem to the new folder. Be patient as this took ages. Evolution was synchronising the folder repeatedly for hours while moving the emails. After it finished, the mailbox file size of the new folder was just a bit over 200 MB.

  • Closed Evolution and deleted the bad folder by removing all of its associated files (mailbox, cmeta, index, and data files) in "~/.local/share/evolution/mail/local/Inbox.sbd" because trying to delete it in Evolution gave this error:-




Refs
http://ubuntuforums.org/showthread.php?t=974536

Sunday, September 4, 2011

Search for File Contents in Nautilus

Create a script file (text file) called "Find" in "~/.gnome2/nautilus-scripts" and allow it to be executable. Add the commands below in the script file:- 

#!/bin/bash
gnome-search-tool --hidden --path="$*" --contains= 

From its command help:-
--hidden               Select the "Show hidden and backup files" search option
--path=PATH            Set the text of "Look in folder" search option
--contains=STRING      Select and set the "Contains the text" search option

To search for files using this script in Nautilus,
Right click a folder -> Scripts -> Find

Refs
http://forums.linuxmint.com/viewtopic.php?f=42&t=25114

Friday, August 5, 2011

Allow apps to display tray icons in Unity

Only whitelisted apps are allowed to show tray icons in Unity. By default, the apps in the whitelist on my PC are JavaEmbeddedFrame, Mumble, Wine, Skype, hp-systray, and scp-dbus-service.

To show the current whitelisted programs, run
gsettings get com.canonical.Unity.Panel systray-whitelist
To add a new program; for example, Tasque, to the current whitelist, run
gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'hp-systray', 'scp-dbus-service', 'Tasque']"
Alternatively, we can do this through a GUI using a tool called "dconf-editor". It's part of the "dconf-tools" package. In dconf-editor, go to
desktop -> unity -> panel
and select "systray-whitelist" on the right panel.


After change, strangely doing a relogin didn't seem to take this into effect for me. I had to reboot the PC. I didn't try just killing X Window though.

Refs
http://www.omgubuntu.co.uk/2011/03/how-to-hide-or-show-app-tray-applets-in-ubuntu-11-04/
http://ubuntu.sun.ac.za/wiki/index.php/Show_tray_icons_in_unity

Thursday, August 4, 2011

vReplicator fails with the message: - " 'Consolidate Helper' snapshot found"

VMWare ESX/ESXi creates a temporary snapshot called "Consolidated Helper" during the snapshot deletion/consolidation. It should be deleted automatically but if it's left behind (possibly due to performance issue or insufficient disk space), vReplicator will fail. To fix this, make sure there's enough free space and then just remove this snapshot manually through Snapshot Manager. After it reaches 95%, be patient as it may take a very long time depending on the virtual disk size to commit the snapshot. If it still fails, try creating a new snapshot and then select "Delete All".

Refs:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003302
http://communities.vmware.com/thread/274077
http://communities.vmware.com/thread/121642

Sunday, July 31, 2011

New Brower Session on IE8/IE9 and Google Chrome

IE8 or IE9 (Microsoft Internet Explorer)
Use -nomerge switch when running IE.

Google Chrome (V12.0.742.124)

  • Use Ctrl + Shift + N to bring up a new Chrome window in the Incognito mode (private browsing). However, any subsequent window opened up this way will share the same session.
  • Use --user-data-dir switch with different profile locations when running Chrome. A bit awkward but can be mitigated by using shortcuts. However, each session will its own config and cache. For example,

google-chrome --user-data-dir=/home/tom/chrome-profiles/1
google-chrome --user-data-dir=/home/tom/chrome-profiles/2
google-chrome --user-data-dir=/home/tom/chrome-profiles/3

Refs
http://superuser.com/questions/690/new-browser-session-on-firefox-and-google-chrome

Saturday, July 16, 2011

Monday, June 13, 2011

Access shared host folders in a VirtualBox Ubuntu guest

  • Install VirtualBox Guest Additions.
  • Set up a shared host folder using VirtualBox.



Make sure Auto-Mount is off otherwise when mounting the shared folder after restarting the guest next time, we'll get this error:-
mount.vboxsf: mounting failed with the error: Invalid argument.
It seems it's caused by the shared folder has already been mounted to "/media/sf_mydata" which only allows "admin" to access.
  • In the Ubuntu guest, use Terminal to run the following commands:-
sudo mkdir /mnt/mydata
sudo mount -t vboxsf mydata /mnt/mydata
ln -s /mnt/mydata $HOME/Desktop/mydata
  • To auto-mount the shared folder,
gksudo gedit /etc/fstab
Then add the following line:-
mydata /mnt/mydata vboxsf defaults 0 0

Tuesday, May 24, 2011

Useful App Indicators

System Load Indicator
Display graphs for CPU, RAM, network traffic, harddisk and swp space use.
sudo add-apt-repository ppa:indicator-multiload/stable-daily
sudo apt-get update
sudo apt-get install indicator-multiload

Weather Indicator
sudo add-apt-repository ppa:weather-indicator-team/ppa
sudo apt-get update
sudo apt-get install indicator-weather

Caffeine
Keep Ubuntu awake by disabling screensaver.
sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
sudo apt-get install caffeine

Lookit
Capture an area or the entire screen.
sudo add-apt-repository ppa:lookit/ppa
sudo apt-get update
sudo apt-get install lookit

Tomate
Inspired by the Pomodoro technique. You commit to working without interruption for at least 10 minutes which is usually the hardest part. After that, it becomes easier to continue working.


Tuesday, May 17, 2011

Free Antivirus Software for Linux

Clam AntiVirus
  • Install command-line interface
sudo apt-get install clamav
  • Install virus database update utility
sudo apt-get install clamav-freshclam
  • Install Nautilus extension for easy scan (it adds "Scan for Viruses" to the right-click menu)
sudo apt-get install nautilus-clamscan
AVGScan
  • Download the installation file (.deb) from http://free.avg.com/au-en/download.prd-alf
  • When running it, this message "The package is of bad quality" will appear. Just select "Ignore and install".
  • The AVG service should start automatically at boot time. To start the service manually now, run
sudo service avgd start
  • To integrate the AVGScan with Nautilus, create a script file (text file) in "~/.gnome2/nautilus-scripts" and allow it to be executable. Add the commands below in the script file:-
#!/bin/bash
xterm -hold -T "AVG Virus Scanning $*" -e "avgscan --heur --arc $*"
Refs
http://ubuntuforums.org/showthread.php?t=1209061

Sunday, May 15, 2011

Update Dropbox for Ubuntu 11.04

  • Download Dropbox v1.1.31 (Linux x86, Linux x86_64)
  • Delete ".dropbox-dist" from the home directory
  • Extract the downloaded Dropbox to the home directory (the extracted folder will be ".dropbox-dist")
  • Stop the currently running Dropbox if the old version Dropbox exists by running
killall dropbox
    or
dropbox stop
  • Start Dropbox by running
dropbox start
Ref:
http://forums.dropbox.com/topic.php?id=37361