Friday, September 5, 2014

Microsoft's Windows Defender

It was time to uninstall the McAfee antivirus that came pre-installed with the Windows 8 laptop. Just by doing that I noticed that the bubble appear to say that I am no longer protected and to click it. This is when Windows Defender application started, which makes me wonder if its good enough to replace the previous antivirus.

Doing an update to virus and spyware definition version 1.183.1668.0 on 5th Sept 2014. Will continue to run this with Basic membership setting where this means almost anything could be sent to Microsoft.




Tuesday, August 26, 2014

Quick start to Mozilla Firefox OS 1.x

For those of you who were looking for a new smart phone, it might be good to also look at Firefox OS. This is being developed by Mozilla and will be a game changer.

Quick notes:

  1. Initially known as B2G (Boot to Gecko) in the Mozilla Project and initially demonstrated in 2012
  2. Has a Linux based operating system
  3. Target for smart phones, tablets and smart TV.
  4. Among the first adopter was ZTE Open phone
  5. Its has 4 software layers. I.e. Gonk (Linux kernel), Gecko (application services), XUL Runner (Application run-time) and Gaia (User interface system)
  6. Supports HTML5
  7. Website at https://developer.mozilla.org/en-US/Firefox_OS
  8. Apps can be found at the Firefox marketplace.
Current development is at Firefox OS 1.3 (Stable) and Firefox OS 2.1 (Unstable)  and you can try it out via a simulator.

Following are steps to install and run a simulator:
Requirements: Firefox version 30+

Step 1. Install the simulator.

Open Mozilla Firefox web browser and access "App Manager add-ons" by typing in the URL
https://ftp.mozilla.org/pub/mozilla.org/labs/fxos-simulator/

Click "Install Firefox OS 1.3 Simulator (Stable)" or which ever version pleases you.

When the Pop-up appears, Click "Allow" then wait till the download starts (There isn't any indicator onscreen) and when the Software Installation box appears, click "Install Now".

Click "Firefox OS 1.3 Simulator has been installed successfully."

Step 2:  Check installation

To determine if its installed, open Mozilla Firefox web browser and enter URL as
about:addon

You should see "Firefox OS 1.3 Simulator ...."

Step 3: Start up the App Manager

In Mozilla Firefox web browser enter URL as
about:app-manager

At bottom of the  App Manager click "Start Simulator"
The Firefox OS Simulator will appear as a new Firefox Window.


Congratulations...you now have access to the latest Smartphone OS.





Tuesday, July 8, 2014

Howto Turn On Menu and Back Button Lights on Samsung S3

The Samsung S3 is a clever device to conserve energy, but to some users who keep forgetting where is the frequently invisible "Menu" and "Back" buttons, they should have it lit all the time (and off when screen is off).

These buttons are on the left (Menu) and right (Back) of the Home button. By default, each time either keys are pressed, the lights will stay lit for about 1.5 seconds only.


Here are step to have "Menu" and "Back" buttons lit all the time (and off when screen is off).

Step 1. At the Home screen, go to settings.
Simple? For the unacquainted, just touch the Apps button (usually the centre circle at bottom of the screen) and choose settings.

Step 2. Choose "My device", scroll down and touch "Display". 

Step 3. Scroll down to touch "Touch key light duration".

 Step 4. Choose "Always on".

Press "Home" and you will notice the lights are lit next to the "Home" key. If the screen if off, these lights will also go off.

Howto Turn Off Samsung S3 keyboard sound

For some reason, the keyboard on Samsung S3 (GT-I9300) started to beep with each press and this gets annoying after having to type lots. Instructions can be applied for most Android 4, but here the screenshot are for Android 4.3 kernel version 3.0.31-2429075 dpi@HP20 #1.

To turn off/on the sound in 3 simple steps;

Step 1. At the Home screen, go to settings.
Simple? For the unacquainted, just touch the Apps button (usually the centre circle at bottom of the screen) and choose settings.

Step 2. Choose "My device", scroll down and touch "Language and input"





Step 3. Scroll down and find Key-tap feedback "Sound". To turn keyboard sounds off, uncheck the "Sound" box.


Press the "Home" key and you can test out keyboard sound, off or on as you have  selected.


Thursday, May 15, 2014

Writing Equations in Moodle - Part 2

This is a follow up post on enabling users to write equations in Moodle. In the previous post, the required tools were installed on Linux (Centos Linux) and we resume from there.

Step 1:

Login as administrator in Moodle. In the Administration menu, click on Plugins-> Filters-> Manage filters
Choose Filter for Tex notation and change Active? to On. If you click Settings it will bring you to the same screen as in the next step below.

In the Administration menu, click on Plugins-> Filters-> Tex notation
Verify that Path of Latex, dvips and convert binary all contain the linux tools that was created in Part 1 of this tutorial.

Latex = /usr/bin/latex
dvips = /usr/bin/dvips
convert = /usr/bin/convert

Change the convert output format to PNG.

Step 2:

Within a course, create a content and notice that the Insert equation button is visible in TinyMCE editor.

Tuesday, May 6, 2014

OSS Meetup in Kuala Lumpur

Those who are keen to meet fellow OSS in Kuala Lumpur should register for the Malaysia Open Source Community Meetup Q2 2014.

Date: 31 May 2014
Time: 9Am to 2PM
Registration: Required

Please go to the above link for further details.

Writing Equations in Moodle - Part 1

Moodle leverages on MathML for users to enter Math equations. Moodle 2 comes with DragMath and this reduces the need for complicated installation of libraries. On Linux, equations can be displayed with Latex through the use of MimeTex (http://www.ctan.org/tex-archive/support/mimetex) and the newer MathTex.

Examples on the use of MathText can be found at http://www.forkosh.com/mimetex.html#examples

Inserting math equation on a Moodle require certain filters to be enabled but before doing this, the related linux tools need to be installed. End users will need to ensure Java's JRE is installed and enabled in their web browser.

The required Linux (Referring to Centos Linux) tools to be installed include packages mimetex, texlive, texlive-dvips, texlive-latex, ImageMagick and their dependencies. The important tools that should be working and that is needed by Moodle later includes;
/usr/bin/latex
/usr/bin/dvips
/usr/bin/convert

A good tip on enabling Java in web browsers can be found at the Java site. (https://www.java.com/en/download/help/java_blocked.xml)

Tuesday, February 25, 2014

Managing PostgreSQL with pgsql and pgAdmin3

The command line interface (CLI) tool that comes with Postgres server is known as pgsql. Alternatively, pgAdmin3 and phpPgAdmin can be installed.

The pgsql

Among some of the commands for pgsql can be shown as below;





Example of common commands

Login to the Postgres prompt
$ psql -U postgres -h 127.0.0.1

Create a role to create database
postgres=# CREATE ROLE dbadmin CREATEDB;

Create a role as administrator
postgres=# CREATE ROLE admin SUPERUSER;

Create a role to create group roles
postgres=# CREATE ROLE dbadmin CREATEROLE;

Add a user to any of above role groups
postgres=# GRANT dbadmin to userone;

Assign role to a database and allow to login
GRANT all privileges on database dbname TO dbadmin;
ALTER ROLE "dbadmin" WITH LOGIN; 

Remove a user from a role group
postgres=# REVOKE dbadmin from userone;

A user can change their roles if they are assigned to several roles. 
postgres=# SET ROLE admin;

A user can restore to default role group 
postgres=# RESET ROLE;

Remove a role
postgres=# DROP ROLE admin;

List available users and roles
postgres=# \du

                               List of roles
   Role name   |                   Attributes                   | Member of 
---------------+------------------------------------------------+-----------
 admin         | Create DB, Cannot login                        | {}
 dbmsuser      | Superuser                                      | {admin}
 dbmsuserlogin | Superuser, Cannot login                        | {}
 postgres      | Superuser, Create role, Create DB, Replication | {}

Change privileges of a role
postgres=# ALTER ROLE admin WITH LOGIN CREATEDB;

Create a database and assign to a role
postgres=# CREATE DATABASE mycms WITH admin;

Delete a database
postgres=# DROP DATABASE mycms;

Done

The Window pgAdmin3



Try out SQL statements within these tools. I found one nice reference at http://www.itl.nist.gov/div897/ctg/dm/sql_examples.htm

Installing PostgreSQL on Centos 6

PostgreSQL being an OSS licensed database is very different compared to MySQL. PostgreSQL (or Postges) maintains a repository for Linux systems like Centos to install the database. This repository is known as pgdg and is maintained at yum.postgresql.org or yum.pgrpms.org

Installation of the Postgres comes with psql, this is a CLI to manage Postgres.

Installation of PostgreSQL 9.3 on Centos 6.4 is as follows;

Step 1:
Open a CLI as root user and retrieve the pgdg repo RPM, then install it. This will allow the Centos to find for software from the pgdg.

wget http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
rpm -ivh pgdg-centos93-9.3-1.noarch.rpm

wget http://yum.pgrpms.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
rpm -ivh pgdg-centos93-9.3-1.noarch.rpm

Step 2:
Install the client and server.

yum groupinstall "PostgreSQL Database Server 9.3 PGDG"

yum install postgresql93 postgresql93-server

(-)


Step 3:
Initialise database and tables, and start. This creates the default user postgres.

service postgresql-9.3 initdb
service postgresql-9.3 start

You can now login with the default user to the Postgres terminal as follows;

[root]# su postgres
bash$ cd
bash$ psql -d postgres

If you get the error "psql: could not connect to server: No such file or directory...." Ensure the postgresql server service is running.
Step 4:
As the postgres user, create an administrative user, then log out from the psql (use \q), then the shell (Control-d).

CREATE ROLE dbmsuser LOGIN PASSWORD 'password' SUPERUSER;

As reference, here is summary of the syntax:
CREATE ROLE name [ [WITH] option [ . . . ] ]

 where option includes:
SUPERUSER | NOSUPERUSER
LOGIN | NOLOGIN

Step 5:
Edit Postgres configuration file;

vi /var/lib/pgsql/9.3/data/postgresql.conf

Uncomment the line and save.
#listen_addresses = ‘localhost’ and change it to listen_addresses = ‘*’

vi /var/lib/pgsql/9.3/data/pg_hba.conf

Add a line at bottom of the file to allow non-local connections, e.g.
host    all             dbmsuser        10.0.0.1/32            md5


Post installation
chkconfig postgresql-9.3 on

Ref: 

Thursday, February 20, 2014

Italian God Fathers May Run Open Source

In the current economic challenges, many countries are looking at saving cost via ICT and Italy is not an exception. Umbria, a region in the centre of Italy that produces cheese, lentils, truffles and have a relatively large number of small industries. This 900,000 strong population region is home to an active GNU/Linux User Group Perugia.

In 2012, Umbria saw the start of a revolution to switch to LibreOffice, which is LGPL or open source software (OSS) licensed. LibreOffice provides office productivity tools that include a word processor (like MS Word), presentation (like MS Powerpoint), spreadsheet (like MS Excel) and more. Advantages of this software is that it is free to download and install for almost all computers as it supports MS Windows, Linux and Mac platforms. Most popular editable document formats can be open and edited and its interface is rather intuitive and easy to use. It comes with a portable version where users can install it on a USB drive and carry it around to run LibreOffice any where. A built in PDF converter allows any edited file to be frozen and to be distributed with read only access and consistent format.

MS Office have been introducing its OOXML format through the docx formats which will eventually required every organisation to purchase an upgrade license for MS Office and this will incur la high upgrade cost. LibreOffice by default save files in Open Document Format or ODF (International document standards ISO/IEC 26300:2006) and it also supports past versions of MS Word, Excel and Powerpoint.

Through LibreUmbria, schools were introduced to use LibreOffice as their primary document editing applications before it was expanded further further to other organisations. This also received the government's top innovation award for Italian Government Projects in 2012/2013. Will the rest of the Italian Government and private organisations follow suit?

Read up news on the region of Umbria to switch over from MS Office to LibreOffice.

Jan 16, 2014 from ZDNet
Sep 26, 2013 from LibreOffice
Jun 5, 2013 from Document Foundation Blog

List of open standards can be found at ISO Public site

Wednesday, February 5, 2014

Passwordless root SSH Public Key Authentication on CentOS 6

Need to remote login to linux servers?

Create a public key and store it in the remote server. By default it is recognised as authorized_keys but this is fully configurable. The ssh-keygen generated the public key with RSA that is by default called id_rsa.pub

A well written article to do this can be found at Passwordless root SSH Public Key Authentication on CentOS 6

An alternative sshpass command as mentioned in January 31, 2014 Linuxpromagazine seems to force users to make the password visible. Good that this is no available in a default Centos 6, as this will help to maintain good password practices. I.e. do not have password kept where anyone can read it.

Monday, January 20, 2014

Top 10 Database Engines based on appearance in Internet

Ever wonder how to justify choice of database engines? Some have opted on comparison of specifications and limitation of the system. Now through manual use of ahem.."big data" we can see a list of top 10 database engines.

 DB-ENGINES.COM

Among some of its criteria includes appearance in Google and Bing search engine. Frequency in technical discussion in Stack Overflow and DBA Stack Exchange. Then there are LinkedIn, Indeed and Simply Hired.

Information and table above above is from DB-Engines.com.


Monday, November 18, 2013

Backup Samsung S3 with KIES

Time to send the Samsung Galaxy S3 to the workshop as its difficult to charge despite changing several chargers. Problem: Need to wriggle the USB connection to charge.

Attempting to use KIES from Samsung.

A) Install KIES

Step 1. Download and install from http://www.samsung.com/my/support/model/GT-I9300RWDXME-downloads?downloadName=SW

Step 2. Update the KIES for PC (Final part of the installation above for 18 Nov 2013, version 2.6.1.13105_6_1 (See diagram below)


B) Run Backup
Step 1. Start Samsung KIES (not the LITE)

Step 2. Click the tab "Back up/Restore". Yes, they put a space between Back and up.


Step 3. Click "Select all items".

Step 4. Select which directory to store the backup. Click "Tools" ->Preferences ->Browse

Step 5. Click "Backup". Now they decided there is NO space between in this word.






Wednesday, October 16, 2013

Moodle support for Tin Can and SCORM 2004

If anyone have been said to implement SCORM 2004 engine, its never been highly compliant and Moodle is no exception. On Oct 2004, Moodle has officially abandoned further development of its SCORM 2004 engine. Details of its SCORM module can be found at
http://docs.moodle.org/24/en/SCORM_module

Surely lots of users will be in the lost or may drop SCORM development. Moodle News suggest the use of Tin Can SCORM for future development of learning objects. Moodle site suggest use of the SCORM cloud from Rustici Software where the SCORM Cloud plugin is free, but not the account.

The SCORM Cloud free trial account provides 100MB and 10 active registration (what does that mean?) at https://cloud.scorm.com/sc/user/PostSignUp

Following are helpful links to setup the SCORM Cloud

1. Getting the Moodle package
http://scorm.com/scorm-solved/scorm-cloud-features/app-integrations/moodle-integration/

2. Integrate with Moodle
http://support.scorm.com/entries/21366321-Installing-the-SCORM-Cloud-Moodle-Module

Wednesday, September 18, 2013

Manage log files from getting too big

Log files in Linux can be managed via the logrotate command (See man pages). If the log files start growing too big, it can be difficult to audit these log files.

Here is an example to create a new log file each week as the weekly cron (See man pages) service runs.

Following is an example where the cakephp application is installed. It will create a new file each week for 52 times before deleting the oldest file. Each file will be appended with a running number starting with "1". If the log file is missing, no errors will be printed/emailed and nothing will be done if the log file is empty.

Step 1: Create the configuration file

Create the file /etc/logrotate.d/cakephp with permission 644 (owned by root) and following contents;

/var/www/html/mymesyuarat/*/tmp/logs/*.log {
    weekly
    missingok
    rotate 52
    compress
    dateext
    delaycompress
    notifempty
    create 640 root root
    sharedscripts
}

Step 2: Ensure that the logrotate service is running.

The above configuration can be tested with the following command;

logrotate -s /tmp/logrotatestatus /etc/logrotate/cakephp


Monday, September 2, 2013

Maxis site not supporting Mozilla or Chrome

A sudden change in policy at Maxis, one of the main telco in Malaysia or is it just my network problem?

Either way, last Aug 2013, Maxis customer support just informed me to use Internet Explorer (IE) or they can help email my bills. They tried, but the bill never arrived.

Now in September, I still can't login to get my bills using Chrome or Firefox. But wait, I see an additional notice at their portal....interesting. I added a text bubble.



I guess they are expecting me to call them for help on my bills.

2 Sept. Just spoke to customer service. Seems their Firefox is able to login and the Firefox version 23.0.1 that I am using not current enough. Huh? Is there a newer version since as of today?

On Firefox version 23.0.1, have disabled pop-up blocker, block reported attack sites/web forgeries, nothing happens when I click the "login" button. Ran IE (finally) and the login button works. Still not working on Google Chrome and Firefox.

Anyone else with this problem?

Saturday, August 24, 2013

Sony Tablet S

Sony finally released update for Sony Tablet S?

It says for US but am looking forward for its arrival.

https://blog.sony.com/2013/04/jelly-bean-for-xperia-tablet/

Tuesday, August 20, 2013

User Identities in Thunderbird

Thunderbird have see lots of changes but the basic features for email have been retained. One of this, is being able to choose different ways to compose a message before it is sent out.

Example case 1; I have different signatures for friends, customers, special clients and for the general use. Switching signatures is so easy.

Example case 2; Some sent emails must be save to my SPECIAL folder.

Example case 3: Some emails must contain a CC or BCC to specific persons.

Example case 4: When I replay some quote of previous email is at the top and some at the bottom.

We can get this done is a few simple steps (I list the general steps here);

Step 1: In TB, click Tools ->Account settings...
Select the Email account and set the default email settings for

Your name:
Email Address:
Reply-to Address:
Organization:
Signature Text:

Step 2: Strongly suggest to create a text file and place the signature and name. 
Use the option for
Attach the signature from a file instead (text, HTML, or image)

Step 3: Configure following settings;
Copies and folders
Composition & Addressing
Security

Step 4: Click the Email account (selected in step 1)
Click button Manage Identities...
Click Add...

Enter the alternative email configuration. E.g. The alternative email signature.

Click OK, Close. You can continue to create as many identities as you like.
Click OK

DONE!
Try to send an email, click Write button.

Notice the "From" have a drop down list of all the different styles and configuration that you have created.

Wednesday, August 14, 2013

Using Handlerbars and JQuery in PhoneGap

Here is the very basic steps to use a template model in a PhoneGap application. I won't be going in details in this note.
"Those attending the PhoneGap class should incorporate the database as a practice. Thank you"

Ensure that the following steps have already been taken
  1. Creating Android App with PhoneGap
  2. Using Alert Pop-up
Step 1: Install the Handlebars and JQuery scripts
Download
  1. Handlerbars from http://handlebarsjs.com
  2. JQuery 1 from http://jquery.com/download/
Extract and copy the .js files to the Project's assets/www/lib folder

Step 2: Update the index.html
Replace the the contents within the body tags with the following;

 <h1>Hello PhoneGap</h1>  
  <script id="a-comment" type="text/x-handlebars-template">  
   <p><b>{{name}}</b> on {{date}}</p>  
   <ul>  
   {{#each comment}}  
   <li>{{description}}  
   {{/each}}  
   </ul>  
 </script>  
 <script src="lib/handlebars.js"></script>  
 <script src="lib/jquery-1.10.2.min.js"></script>  
 <script src="js/main.js"></script>  

Step 3: Update the js/main.js
Remove the initialize: function() and add following codes;


      renderHomeView: function() {  
      var today = new Date();  
      var dateTxt = today.getDate() +   
      "." + (today.getMonth()+1) +  
      "." + today.getFullYear();        
      var data = {  
      name: "I am the One",   
      date: dateTxt,  
      comment: [  
           { description: "walking with you."  
           },   
           { description: "eating together."  
           },  
           { description: "driving around town."  
           },  
      ] };  
   $('body').html(this.homeTemplate(data));       
   },  
   initialize: function() {  
        var self = this;  
        var source = $("#a-comment").html();  
     self.showAlert('This is how its done','Info');  
     this.homeTemplate = Handlebars.compile(source);  
     this.renderHomeView();  
   }  

Alert Pop-up in PhoneGap

Using the native notification or browser alert pop-up

This is a continuation from the Previous notes: Creating an Android App with PhoneGap and Eclipse
Purpose: Display the Alert pop-up before the application display its contents.

Step 1: Create the main.js
In the project's assets/www create js folder, then create a new text file and name it as main.js
Place the following contents in assets/www/js/main.js

 var app = {  
      showAlert: function (message, title) {  
    if (navigator.notification) {  
     navigator.notification.alert(message, null, title, 'OK');  
    } else {  
     alert(title ? (title + ": " + message) : message);  
    }  
      },  
   initialize: function() {  
        var self = this;  
     self.showAlert('This is how its done','Info');  
   }  
 };  
 app.initialize();  

Step 2: Load main.js from index.html
Edit index.html. Immediately after the body tag place the following 1 line.

 <script src="js/main.js"></script>  

Step 3: Test the application.
See previous posting on how to do this.

Blog Archive