POLi Payment Gateway: Why you shouldn’t use this option…

Info.Tech, Security Concerns, Web Development 2 Comments »

poli_1

 

 

 

 

 

The first time I saw POLi payments was in Qantas Airlines New Zealand. The moment I saw asking for my Bank Credentials, I click back button ripoli_3ght away.

Why? Because POLi is asking your Access Code/Username and Password of your bank, your BANK CREDENTIALS! Imagine your hosts file has been altered by malware or any virus or your network has been hacked or exploited or your ISP has been hacked or whatever above your internet line has been altered pointing POLi payment gateway’s DNS to different server, you will be giving your bank access to the hackers. And POLi is a direct access to your bank account (your entire assets in your bank) and initiate the transaction right away. Unlike credit cards, if your card has been expospoli_2ed, then the risk is JUST your card, not your whole account in the bank then you still have time to call the bank the close it right away.

So my advise never use POLi payments. I’m not against the company or the people who created it but I am just against how the implementation or how it works.

OCZ SSD is the worst SSD!

Computer Hardware, Info.Tech Comments Off on OCZ SSD is the worst SSD!

ocz_ssdOK, let me share this to the world how bad this OCZ SSD.

Bought 3 OCZ SSD months ago. First SSD is where my OS installed, Windows 7 Professional. 2nd SSD is my MySQL Database, 3rd SSD is my Development Source Codes.

OS SSD crashed first after 6 months and undetectable. Then the vendor replaced the SSD with Samsung and works fine until now. Next is the DB SSD crashed after 9 months. Dev SSD crashed after 12 months.

How can you rely on these OCZ SSDs? I lost tons of files because of these SSDs. If you want SSD, buy Intel SSD or Samsung SSD and they are the reliable brands. Never again be fooled with those other SSDs. Too much promising yet they are all crap!

Advise: NEVER BUY OCZ SSD! FULL OF CRAP!

iMac Reset Password or Factory Reset without losing the data

Apple Stuff, iMac Troubleshooting Comments Off on iMac Reset Password or Factory Reset without losing the data

Restart your computer and press COMMAND + S then this will enter to terminal mode.

First you need to mount the “root” path before you can modify the disk.

:/ root# mount -uw /

Now after mounting the root path, you have two option here, factory reset or reset password of a user so you can access the files.

Factory Reset

In factory reset, all you need is to delete the file /var/db/.applesetupdone then OS X will detect that the system has run the first time (but the data are all intact).

rm /var/db/.applesetupdone

User Reset Password

In user reset password, this is what you will do:

  1. go to /Users directory then list the files and folders
  2. whoever you want to reset the password, just type passwd <username>
  3. then this will ask you for the new password and confirm new password
  4. that’s it
:/ root# cd /Users
:/ root# ls -lsa
:/ root# password user1
Enter New Password: 
Confirm Password:

:/ root# reboot

then type exit or reboot or restart the machine.

then you all good to go…

iMac Intel Diagnostic LED’s

Apple Stuff, iMac Troubleshooting Comments Off on iMac Intel Diagnostic LED’s

To observe the LED’s you need to apply power to the iMac with the front bezel off. Please ensure you don’t touch any part of the iMac or the exposed circuit boards while you have power connected.

Locate the Diagnostic LED’s between the RAM slots and the SATA connector.

The LED’s are numbered 1-4 from left to right. You may need to move the SATA cable to get a clear view of the LED’s.

If you are using this guide for iMac Intel 20″ EMC 2210 and 2133 the LED’s are located above the SATA connector and not as visible.

  • LED 1 – Indicates that the trickle voltage from the power supply is detected by the main logic board. This LED will remain ON while the iMac is connected to the AC power. The LED will remain on even when the computer has been shut down or put to sleep. The LED will turn off only if the AC power is disconnected or the power supply is faulty.
  • LED 2 – Indicates that the main logic board has detected proper power from the power supply when the computer is turned on. This LED will be ON when the computer is turned on and the power supply is working correctly.
  • LED 3 – Indicates that the computer and the video card are communicating. This LED will be ON when the computer is communicating properly with the video card. If LEDs 1 and 2 are ON and you heard the startup sound, but LED 3 is OFF, then the video card might be installed incorrectly or need replacement.
  • LED 4 – Indicates that the computer and the LCD display panel are communicating. This LED will be ON when the computer is turned on and video signal is being generated. If the LED is ON and there is no image on the LCD display panel, the LCD display panel or inverter might be installed incorrectly or need replacement.

Refence: https://www.ifixit.com/Guide/iMac+Intel+24-Inch+EMC+2134+and+2211+Diagnostic+LED’s/7443

Facebook Messenger Desktop

Info.Tech, Software Development, Visual C# .Net Comments Off on Facebook Messenger Desktop
1452673926_Facebook_Messenger

Just for fun I made a Facebook Messenger Desktop version. This can be used if you don’t want to use the browser and would be ideal when you’re at work. 🙂

The application can minimize at the taskbar notification area which will be hidden away from your other opened applications.

Disclaimer: This is not the official facebook messanger desktop version but this is just framing facebook web-based messenger.

Download:

Visual C# .Net and rsync

Experimentals, Info.Tech, Software Development, Visual C# .Net 2 Comments »

Today, I was wondering if possible to use rsync in Visual C# .Net. After couple of searches, I finally got my answer and working sample project.

cSharp_gdrive

I would like to share my Visual C# .Net source code project since I found many developers were looking for a working sample. I am planning to create a class wrapper too and deposit it on GitHub soon.

My GitHub: https://github.com/camilord
Download: Visual C# .Net and rsync (630)

My First Android App

Android, Info.Tech, Mobile Development Comments Off on My First Android App

This is my first android app, you can use it if you want. Its just a simple WebView though. The backend is using Silex PHP Framework and MySQL as the DB.

11863214_1493965787563088_6063613049736519454_n

Notes Locker (493)

Download Notes Locker

QVNZ Viewer (ASC file viewer)

Info.Tech, Software Development Comments Off on QVNZ Viewer (ASC file viewer)

For everyone looking for ASC file viewer or QVNZ .asc file, if you are wondering what application can view the file, you can download and use the application I have created. This will view the contents of ASC file for QVNZ.

qvnz_ss

Update 4 August 2015:

I improved the viewer, its QVNZ Editor now. So you can edit the Cell then Save or Save As.

 

QVNZ Viewer (580)   |   QVNZ Editor (506)

or

Download at: https://www.abcs.co.nz/download/qvnz/

Computer Online Shop in New Zealand

Info.Tech, People, Personal, Wooow! 2 Comments »

I just found the reliable and best way to shop online with computer parts, accessories etc. Just browse at www.crongroup.co.nz and you’ll get the best deal. 🙂

crongroup

MySQL + Percona XtraDB Cluster 5.6

Administration, Info.Tech, Linux System Administration, SQL: Structured Query Language Comments Off on MySQL + Percona XtraDB Cluster 5.6

I have been experimenting on MySQL + Percona XtraDB Cluster (version 5.6). In my case, I used VMWare/VirtualBox. I created two images and label as DB1 and DB2 using Ubuntu 14.04.2 32bit (Trusty Tahr). My goal is to replicate the database from DB1 to DB2. If DB1 will be down, then DB2 will take over DB1. While fixing DB1, DB2 will serve then if DB1 is back online, DB1 will be the “Joiner” to the “Donor” (DB2). …and vice versa.

Installation

First thing you need is to prepare the installation of Percona XtraDB Cluster. (must be root or right high privileges on performing this installation)

root@db1:~# apt-key adv --keyserver keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A

One thing you need to ensure is you have all Ubuntu official repositories plus Percona APT repository. So what I did is replace /etc/apt/source.list with:

# deb cdrom:[Ubuntu-Server 14.04.2 LTS _Trusty Tahr_ - Release i386 (20150218.1)]/ trusty main restricted

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse

## Ubuntu Security Updates
deb http://security.ubuntu.com/ubuntu trusty-security main
deb-src http://security.ubuntu.com/ubuntu trusty-security main
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

# Percona XtraDB Cluster
deb http://repo.percona.com/apt trusty main
deb-src http://repo.percona.com/apt trusty main

After updating the APT source list, execute:

root@db1:~# apt-get update

After that, you can install Percona XtraDB Cluster server and client packages:

root@db1:~# apt-get install percona-server-server-5.6 percona-server-client-5.6

This is where I got stuck when trying to connect the nodes. Remove apparmor!!! You can check first if apparmor is running:

root@db1:~# apparmor_status

If its running, remove it before causing problems to Percona.

root@db1:~# apt-get remove apparmor

Important Notes: Do the same installation in the 2nd node or DB2.

Then to run the primary node (donor), DB1 in our case:

root@db1:~# service mysql bootstrap-pxc
 * Bootstrapping Percona XtraDB Cluster database server mysqld                       [ OK ]
root@db1:~#

Then run the 2nd node or joiner (DB2):

root@db2:~# service mysql start
mysql start/running, process 1550
root@db2:~#

~ or ~

root@db2:~# service mysql restart
mysql stop/waiting
mysql start/running, process 1550
root@db2:~#

Note: Always start first the primary node (DB1) then the next node (DB2)

Testing

Check if primary node (DB1) is working…

root@db1:~# mysql -u root -p -e "show status where Variable_name like '%wsrep_cluster%' OR Variable_name like '%wsrep_ready%';"
Enter password:
+--------------------------+--------------------------------------+
| Variable_name            | Value                                |
+--------------------------+--------------------------------------+
| wsrep_cluster_conf_id    | 5                                    |
| wsrep_cluster_size       | 1                                    |
| wsrep_cluster_state_uuid | 1fa1e1fc-cf8e-11e4-9664-3ea415c4a429 |
| wsrep_cluster_status     | Primary                              |
| wsrep_ready              | ON                                   |
+--------------------------+--------------------------------------+

root@db1:~# mysql -u root -p -e "show binary logs;"
Enter password:
+------------------+-----------+
| Log_name         | File_size |
+------------------+-----------+
| mysql-bin.000001 |       120 |
+------------------+-----------+

Next, check the 2nd node (DB2)…

root@db2:/etc/mysql# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.6.22-72.0-56-log Percona XtraDB Cluster (GPL), Release rel72.0, Revision 978, WSREP version 25.8, wsrep_25.8.r4150

Copyright (coffee) 2009-2014 Percona LLC and/or its affiliates
Copyright (coffee) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

More TEST: I created a PHP script for DB1 and DB2 to test the replication.

DB1 PHP Script (test_percona.php):

<?php

$connect = mysql_connect('localhost','root','secret');

mysql_select_db('test', $connect);

// insert if table not exists...
@mysql_query("create table if not exists data_test(
 id bigint(20) unsigned not null auto_increment primary key,
 data varchar(128),
 created datetime
);");

// inject data infinitely
while (true) {
        $data = sha1(time().rand(100,99999));
        echo $data." -> ".date("j M Y g:i.s a - l\n");
        @mysql_query("INSERT INTO data_test (data,created) VALUES ('".$data."', NOW())");
}

?>

DB2 PHP Script (monitor_percona.php):

<?php

$connect = mysql_connect('localhost','root','secret');

mysql_select_db('test', $connect);

$last_id = 0;

while (true) {
        $result = mysql_query("SELECT * FROM data_test WHERE id > ".$last_id." ORDER BY id ASC");
        $max = mysql_num_rows($result);
        if ($max > 0) {
                for ($i = 0; $i < $max; $i++) {
                        echo mysql_result($result,$i,"data")." -> ".date("j M Y g:i.s a - l", strtotime(mysql_result($result,$i,"created")))."\n";
                        $last_id = mysql_result($result,$i,"id");
                }
        }
}

?>

Then you can run the script on both nodes. To run in DB1 node, do:

root@db1:~# php test_percona.php

Then for the 2nd node:

root@db2:~# php monitor_percona.php

After that, you must see same output both nodes.

percona_xc_test_result2

percona_xc_test_result

 Encountered Issues (tail -f /var/log/mysql/error.log):

2015-03-21 20:19:11 6613 [Warning] WSREP: Gap in state sequence. Need state transfer.
2015-03-21 20:19:11 6613 [Note] WSREP: Running: 'wsrep_sst_xtrabackup-v2 --role 'joiner' --address '192.168.9.103' --auth 'sstuser:secret' --datadir '/var/lib/mysql/' --defaults-file '/etc/mysql/my.cnf' --parent '6613'  '' '
2015-03-21 20:19:11 6613 [ERROR] execlp() failed: Permission denied
2015-03-21 20:19:11 6613 [ERROR] WSREP: Failed to read 'ready <addr>' from: wsrep_sst_xtrabackup-v2 --role 'joiner' --address '192.168.9.103' --auth 'sstuser:secret' --datadir '/var/lib/mysql/' --defaults-file '/etc/mysql/my.cnf' --parent '6613'  '' Read: '(null)'
2015-03-21 20:19:11 6613 [ERROR] WSREP: Process completed with error: wsrep_sst_xtrabackup-v2 --role 'joiner' --address '192.168.9.103' --auth 'sstuser:secret' --datadir '/var/lib/mysql/' --defaults-file '/etc/mysql/my.cnf' --parent '6613'  '' : 1 (Operation not permitted)
2015-03-21 20:19:11 6613 [ERROR] WSREP: Failed to prepare for 'xtrabackup-v2' SST. Unrecoverable.
2015-03-21 20:19:11 6613 [ERROR] Aborting

To solve the issue is to remove the apparmor

Reference: 

  • http://www.percona.com/doc/percona-server/5.6/installation/apt_repo.html
  • http://www.percona.com/doc/percona-xtradb-cluster/5.5/howtos/ubuntu_howto.html
  • http://www.percona.com/doc/percona-xtrabackup/2.1/innobackupex/pit_recovery_ibk.html
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in