Portal hobi peribadi saya https://malayolga.name.my/ saya bina pada 1999 dan sejak bermula, is sudah alami beberapa sesi upgrade:
1999 – v1 – Geocities – static content HTML.
2002 – v2 – Hypermart.net. Perl & Cgi-bin. Semi dynamic content.
2005 – v3 – Plain Php MySQL (no framework).
2008 – v4 – Codeigniter v1.6 framework.
Oleh kerana server MalayOLGA v4 sudah berjalan selama 11 tahun, saya rasa perlu untuk upgrade sistem tersebut. Ini kerana versi PHP sudah amat jauh ketinggalan, dan mempunyai risiko keselamatan jika terus digunakan. Oleh kerana Codeigniter v1.6 juga sudah amat tua, ia tidak lagi compatible dengan PHP terkini. Saya perlu juga untuk upgrade laman MalayOLGA agar menggunakan Codeigniter versi baru, atau tukar terus ke PHP framework yang lain.
Saya berpengalaman dengan Yii Framework sejak tahun 2012 dan sehingga kini saya masih menggunakan Yii version 2 (dipanggil Yii2) di dalam hampir kesemua projek-projek saya. Ia framework kegemaran saya atas banyak sebab. Namun begitu, sejak beberapa tahun ini, framework Laravel menjadi amat popular dan saya rasa perlu untuk mencubanya. Jadi, saya rasa inilah masanya untuk membuat eksperimen, dengan membuat migrasi website MalayOLGA dari Codeigniter ke Laravel. Dapat belajar sambil upgrade projek sebenar.
Seluruh proses berjalan selama 2 hari sahaja! Amat melegakan kerana kebanyakan kod saya yang dibuat menggunakan Codeigniter adalah serasi dengan Laravel terutama kebanyakan syntax ActiveQuery Codeigniter adalah seakan-akan enjin ORM Laravel yang dinamakan Eloquent. Saya juga mengekalkan theme & view sedia ada, sekadar mengadaptasi beberapa fungsi daripada enjin templating Laravel yang dinamakan Blade. Penggunaan routing di dalam Laravel juga membantu memastikan format URL boleh dikekalkan tanpa perubahan ketara, yang pada saya amat penting kerana semua URL laman web tersebut telah di index oleh Google, dan saya perlu elakkan carian pengguna di google daripada terganggu.
Yang paling menyeronokkan ialah penggunaan Pagination di dalam Laravel adalah amat serasi dengan Codeigniter. Seolah-olah tidak perlu mengubah apa-apa. Code sedia ada terus boleh berfungsi dengan sedikit sahaja perubahan.
Dua (2) hari yang amat produktif. Saya ambil masa separuh hari untuk menonton video tutorial laravel dan selebihnya membuat migrasi code dan deploy ke server baru.
Dari segi pemerhatian awal, membandingkan dengan Yii2, pada saya Laravel dirasakan seakan-akan begitu hampir dengan CodeIgniter. Namun, ia kurang beberapa fungsi yang saya sukai di dalam Yii2 seperti Gii, CRUD, ActiveRecoredProvider dan Gridview/Detailview. Dari sudut prestasi, saya rasa Yii2 lebih pantas. Yii2 juga lebih bersifat convention-over-configuration, bermakna kita perlu jumpa rentak sebenar Yii2 sebelum dapat betul-betul menghargainya berbanding dengan Codeigniter dan Laravel yang memerlukan configurasi.
Setakat ini, misi migrasi MalayOLGA telah berjaya. Walaupun belum 100% fungsi telah saya kembalikan, ia sudah cukup untuk membuatkan laman tersebut online dengan framework yang baru. Saya akan mengkaji lagi Laravel ini. Untuk sementara ini, saya rasa ia belum cukup untuk mengenepikan Yii2 sebagai framework kegemaran saya. Untuk pasukan programmers muda saya di Shah Alam, mereka akan terus dilatih dengan Yii2, sehingga saya sendiri yakin perlunya mengubah dari Yii2 kepada Laravel. Belum lagi, baru 2 hari mencuba, mungkin suatu masa nanti.
Sifir adalah salah satu elemen penting di dalam pembelajaran awal matematik terutama di sekolah rendah. Kamus Dewan mendefinisikan sifir sebagai daftar angka yg digandakan berturut-turut. Di dalam sistem pendidikan Malaysia, sifir diperkenalkan kepada pelajar seawal sekolah rendah dimana pelajar dikehendaki untuk menghafal sekurang-kurangnya sehingga sifir dua belas (12) sebelum melangkah ke sekolah menengah. Bagi membantu pelajar, sifir dicetak atau dipamerkan di banyak tempat seperti di belakang buku tulis dan juga di papan tanda atau dinding-dinding sekolah. Ini untuk membantu pelajar-pelajar agar dapat menguasai sifir dan juga meningkatkan kesedaran betapa pentingnya sifir sebagai faktor utama di dalam menguasai ilmu matematik.
Namun begitu, terdapat kajian-kajian atau pemerhatian yang menunjukkan bahawa wujudnya masalah penguasaan sifir yang lemah yang berlaku di sekolah-sekolah rendah. Kajian-kajian tempatan seperti yang dibuat oleh Zain Mukmin (1984), Mook Soon sang (1990), Zainudin Bin Abu Bakar (2011) dan Ainun Bariah Jaafar (2012) membangkitkan masalah yang wujud berkaitan kegagalan pelajar-pelajar menguasai sifir.
Di dalam era teknologi terkini, pelbagai kaedah boleh digunakan untuk merapatkan jurang serta membasmi permasalahan seperti ini. Aplikasi mobil boleh digunakan untuk menguji, melatih dan seterusnya menilai tahap pencapaian sifir di kalangan pelajar-pelajar sekolah rendah. Ini dibantu oleh faktor tarikan terhadap penggunaan peranti mudah alih seperti telefon pintar dan tablet itu sendiri yang biasanya mudah menarik minat kanak-kanak untuk menggunakannya. Terdapat pelbagai aplikasi samada percuma atau berbayar yang wujud di dalam pasaran. Antaranya adalah aplikasi Pantas Sifir yang dibekalkan percuma di dalam gedung aplikasi mudah alih Google Play.
Aplikasi Pantas Sifir adalah aplikasi mudah alih percuma untuk pengguna-pengguna peranti Android yang mula dipasarkan sekitar September 2015. Ia adalah aplikasi permainan yang mudah yang dibina khusus untuk membantu meningkatkan penguasaan sifir di kalangan rakyat Malaysia terutama pelajar-pelajar sekolah rendah. Di dalam aplikasi ini, pemain akan diberikan 20 soalan sifir darab. Pemain perlu dijawab dengan betul dan berusaha untuk menjawab dengan sepantas yang mungkin. Jumlah masa untuk menjawab 20 soalan itu akan direkodkan dan di hantar ke pelayan (server) Pantas Sifir. Catatan masa yang baik akan disenaraikan di dalam Carta Mingguan Pantas Sifir. Ini mewujudkan elemen persaingan sihat yang mendorong pemain-pemain memperbaiki catatan masa masing-masing dan juga mengatasi catatan masa pemain-pemain lain.
Prestasi pemain dikategorikan mengikut sekolah, umur dan negeri. Selain daripada itu, aplikasi Pantas Sifir ini juga membekalkan ciri penciptaan pasukan agar pemain-pemain dapat membina kohort atau kumpulan tersendiri bagi bersaing antara satu sama lain.
Statistik dan tabulasi pencapaian pemain disediakan secara online di laman web Pantas Sifir. Ini untuk memberi maklumat secara lansung kepada bukan sahaja pemain, tetapi juga kepada ibu bapa dan pengkaji-pengkaji atau penggiat akademik.
Aplikasi ini boleh di muat turun di :
https://play.google.com/store/apps/details?id=org.ridinglinux.lumbasifir
Laman web Pantas Sifir :
http://pantassifir.ridinglinux.org
Laman Facebook Page Pantas Sifir:
https://www.facebook.com/pantasSifir
Artikel seterusnya akan menyentuh pemerhatian terhadap prestasi pemain-pemain Pantas Sifir berdasarkan data yang dikumpul sejak 5 bulan, selepas aplikasi ini dipasarkan.
I recently developed a simple educational Android game with the objective to improve my children’s math multiplication skill. After having fun with it for quite some time among families and close friends, I’ve decided to share the app it in the Google Play so that everybody can download and use it free.
I named this app XDash. The game is very simple. Players will be given 20 multiplication questions, and need to be answered correctly and as quickly as possible. The total time taken will be recorded and viewable in the top XDash Weekly and the All-Time charts.
A 12 years old in my local community (Selangor, Malaysia) managed to record 22.5 seconds which is quite impressive. Given that this application is now published worldwide, I hope that many children can easily beat that record.
The app is available at https://play.google.com/store/apps/details?id=org.ridinglinux.xdash Feel free to download try this app. If you think that this app can gives benefit to others, please rate it and share it to your friends. I accept comments and suggestions via the app?s Facebook Page at https://www.facebook.com/XDashApp
Since published in December 2015, this app has generated lots of performance data of the players. I’ve prepared a web based portal at xdash.ridinglinux.org to display live data and statistics. I’m pleased to see the evidence of improvements with all the children who continue playing the game consistently. The chart below illustrates the time taken by a 10 years old kid in completing a series of math multiplication quizzes in the XDash Multiplication Game over several months with a total of 566 attempts.
Source http://xdash-web.ridinglinux.org/stat/person-graph?user_id=686
Sometime there are long data need to be displayed in Yii’s cgridview and you don’t want it to be wrapped. This can be achieved by setting appropriate CSS/style in the particular cell or column, for example specifying the width or nowrap.
$this->widget('zii.widgets.grid.CGridView', array( 'id'=>'my-grid', 'dataProvider'=>$model->search(), 'columns'=>array( array( 'name'=>'LongAssetTag', 'htmlOptions' => array('style' => 'white-space: nowrap;') ), ...... ), ));
…It has been quite a while since i last updated my blog. There are so many things going on in my life lately (in a good way) and I can say that I’m in a verge of a major shift of paradigm and perspective especially with regards to my career & future. And yes, Open Source is still the key element of it.
Recently I’ve been leading a project to implement a solution consisting of Nagios and OCS Inventory (with GLPI) fo a local company which have a large number of IT assets spreaded all over Malaysia. It was quite an experience and I can say the scale of the project is the largest I’ve been involved so far in my career. There are a lot of chalenges, hiccups, headaches and even frustations during the project but at the end everything completed successfully.
I will provide the details if I have spare time, so stay tuned for more updates
Some guys manage to get their hand into the source code of Windows Vista. And it is now circulating through the internet.
Click on the image below to view the source code.
Source:
http://tuxmax.blogspot.com
I cannot hold myself anymore. I want Firefox 3 on my Gentoo machine ASAP. I don’t care about the feature, the risk and the hassle I might be facing installing unstable/testing application in my machine, I just want the new version on my PC!
Using emerge to search the package
emerge --search mozilla-firefox
Result:
* www-client/mozilla-firefox
Latest version available: 2.0.0.14
Latest version installed: 2.0.0.14
Fair enough, the stable branch only have version 2.0.0.14 as the latest one. So I enable unstable/testing branch for that particular package by inserting the line below in my /etc/portage/package.keywords
www-client/mozilla-firefox ~x86
Do the search again
emerge --search mozilla-firefox
Result:
* www-client/mozilla-firefox
Latest version available: 3.0-r1
Latest version installed: 2.0.0.14
Size of files: 50,442 kB
Homepage: http://www.mozilla.com/firefox
Description: Firefox Web Browser
License: || ( MPL-1.1 GPL-2 LGPL-2.1 )
Nice, they have version 3.0-r1 in the repository.
After thinking for a while, I decided to proceed with the installation. Of course I have to enable some other unstable/testing packages in order to meet the dependencies.
I added those lines below in my /etc/portage/package.keywords file
net-libs/xulrunner ~x86
dev-libs/nspr ~x86
dev-libs/nss ~x86
Specifying custom USE parameter in /etc/portage/package.use file
www-client/mozilla-firefox java linguas_en_US -ipv6
I don’t need IPV6
And start the installation process
emerge -av mozilla-firefox
I answered ‘yes’ when asked and the installation process started. It took almost 20 minutes for the system to compile them. When it finished, I’ve been greeted with the message below.
* Old versions of installed libraries were detected on your system.
* In order to avoid breaking packages that depend on these old libs,
* the libraries are not being removed. You need to run revdep-rebuild
* in order to remove these old dependencies. If you do not have this
* helper program, simply emerge the ‘gentoolkit’ package.
*
* # revdep-rebuild –library libnspr4.so.6
* # revdep-rebuild –library libplc4.so.6
* # revdep-rebuild –library libplds4.so.6
Ok. Some post installation works to do. But I would skip those steps for now. I will do them if I encounter any problem on other applications.
So I restarted my Firefox, went to some normal plugin/extension upgrade process and there I go, Firefox version 3 !
Actually it is not that dynamic. Basically I just want to embed the list of my 3 latest blog postings in all my outgoing mails, just below my signature. So what I meant by dynamic is that the text file which is holding the signature will get updated from time to time via a cron-job and a simple script.
The script will read the RSS/Atom feed from my blog and capture the title & url of three latest postings and pump them into my signature file. I use Python script and the marvelous Universal Feed Parser.
For most of linux system python would already been installed by default. However you might need to install Universal Feed Parser (python-feedparser) in order for the script to work.
In my Gentoo machine
emerge -av dev-python/feedparser
For Fedora Users
yum install python-feedparser
For Ubuntu users
apt-get install python-feedparser
The phyton code (take note that I’m new to python. If you find that the script is not appropriate please do advise me)
#!/usr/bin/python
import feedparser
#the signature file (output)
filename = '/path/to/your/home/folder/.signature1'
#numbers of items to be displayed
num = 3
#feed address
feedurl = "http://feeds.feedburner.com/RidingLinux"
#your signature. Change accordingly
text = """Regards
Your Name
Your Company
Address
Telephone
My latest BLOG posts:
"""
d = feedparser.parse(feedurl)
if d.feed.has_key('title') :
file = open(filename, 'w')
for i in range (num) :
text = text + d['entries'][i]['title']+"\n"+d['entries'][i]['link']+"\n\n"
file.write(text)
file.close()
Save the above script in your home folder (eg: /home/yourname/signature-update.py) and test it out.
Once everything is ok, add a cron-job for it to be executed in schedule.
Example (if you are using ‘crontab -e’) command
0,30 * * * * python /home/yourname/signature-update.py >/dev/null 2>&1
This will execute the script every half and hour.
Sample generated file
Regards
My Name
My Company
My Address
My Telephone NumberMy latest BLOG posts:
Vuurmuur firewall management interface for Linux Iptables
http://www.ridinglinux.org/2008/06/23/vuurmuur-firewall-management-interface-for-linux-iptables/Food Strainer – Your Wifi reception booster!
http://www.ridinglinux.org/2008/06/15/food-strainer-your-wifi-reception-booster/Simple port forwarding with Iptables in linux
http://www.ridinglinux.org/2008/05/21/simple-port-forwarding-with-iptables-in-linux/
Now I can simply point my mail client (Evolution, KMail, Claws-Mail or Thunderbird) to use the above file as my signature.
In my previous post regarding iptables, I’ve mention about an iptables management tool called Vuurmuur (http://www.vuurmuur.org/). Most people have probably heard about FireStarter, KMyFirewall and ShoreWall. Basically Vuurmuur serves the same purpose, which is providing easy way to manipulate iptables rules for users to manage their firewall without having to worry about all those complex iptables commands. Those tools give us the ability to play around with iptables either by using graphical interface or adjusting configuration files.
The thing I like about vuurmuur is that it uses Ncurses GUI interface, meaning that you can manage it via a terminal console or SSH. The drawback of using tools such as FireStarter, KmyFirewall is you need to have a graphical desktop, thus making it hard to manage them remotely especially via slow internet connection or if you are using Windows machine to do the administration process. While some other tools provide web-based management interface such as Smoothwall (via Webmin) or a dedicated firewall box like IpCop and Astaro Internet Security, allowing those web interface to the internet wouldn’t be a recommended practice. Furthermore, the web interface provided by Astaro Internet Security is too slow for a remote user.
So if you need a very light (and yet POWERFUL) solution suitable for frequent remote administration, its either you use the pure command line iptables command, or using config file based tool such as ShoreWall, or lastly if you really need non web-based GUI then Vuurmuur would be an ideal answer. You can simply SSH from anywhere (provided that you allow SSH remotely) or by using Windows SSH interface called Putty.
Apart form that, I am also pleased with it’s ability to do other things such as providing realtime log viewer, traffic shaping, traffic volume monitoring and lots more. Combine those things with Iptraf, then you will get hooked if front of your ‘blue screen’ for the whole day, even worse than watching blue film.
I recently moved to a new house. Everything went well apart from my telephone & internet line migration. As for now, the telco/ISP (the Malaysian TMNet aka TMNut) cannot do the migration process due to technical problems. Been whacking their customer service almost everyday but they seem to have a trick of looping our reports and complains into some kind of black hole. They responded with varies of reasons such as no ports available, faulty line ect..etc.. but none of them seems to make any sense.
I desperately need internet connection at home and luckily a neighbor who are a broadband subscriber willing to share his internet connection with me via Wifi. He already have a wireless AP installed at his home for personal use.
So I plugged in my USB wifi adapter and manage to connect to his AP.
But the signal is very sluggish which is expected due to the distance between our house. The link quality barely archive 50% and I got frequent disconnection.
Fortunately a few months back I’ve stumbled upon some funny trick of using food strainer to boost wireless signal. So this is the most suitable time try it out.
I bought myself a new food strainer for RM11.00 and I cut a little hole just about the size of my USB wifi body.
Put the device through the hole
And… PRESTO!!!
Neat (ugly) huh… But it surely works. My connection is now very stable.
My desktop show off ! (pardon my old hardwares. I’m a cheap geek..)
***I’m now thinking of permanently unsubscribe my TmNut telephone/internet line