Alternative Syntax of Ruby Hashes

Hashes variant 1

cars = { “car1” => “avanza”, “car2” => “innova”, “car3” => “mirage” }

Hashes variant 2

cars = {  :car1 => “avanza”,  :car2 => “innova”,  :car3 => “mirage” }

Hashes variant 3

cars = {  car1: “avanza”,  car2: “innova”,  car3: “mirage” }

 

These are as far as i know.

HTML tables to elegant data tables !

If you want to make your regular html show better on browser you can use a javascript library from datatables.net.

simple example which i use on my project.

1. Add jquery >=1.7 and datatables js and css to your html page.

2. create a html table (use thead tbody tags) and give it an ID.

3. call javascript code as simple as below (can add option as parameter also).

$(document).ready(function() {
    $('#table1').DataTable();
} );
4. Enjoy your new good looking html table !
Below is latest datatables js and css as per today downloaded from datatables.net

Showing Manjaro Version

Manjaro’s rolling release mean that we can update our system every time there is a new version. Today i have updated manjaro on my laptop and its downloading 1.3 GB files in total.

After that i want to know what is the version of my manjaro but i cant find it on xfce GUI. After search on internet we can view manjaro version from a file on /etc.

Below.

FreeBSD connect to wifi

On linux we will have network management tool as part of desktop manager. If we install FreeBSD and Mate desktop manager, such util not exist automatically. After some search found that we can use :

1. bsdconfig

2. wifimgr

Bsdconfig is cli program and after changing wifi configuration for your laptop you need to restart.

Another option is to use wifimgr. Install wifimgr using pkg install wifimgr on terminal. Wifimgr is gtk based app.

Wifimgr on action.

Good night … Bye ..

Codelite

On my experiment with FreeBSD 11.1, after some time i am installing codeblocks , an IDE for creating C/C++ program. Unfortunately codeblocks didnt work (crash) on launch. Looks like some issue on wxwidget. Dunno.

After some casual browsing on FreeBSD package/ports list on the net , i found another C/C++ IDE !

It is Codelite !

pkg install codelite

Launch codelite, automatically detect clang llvm 4 available, then do some helloworld project …

FreeBSD 11.1 top

There is something catching my attention when i do top on freebsd 11.1 terminal which are additional lines for ARC like shown below.

ARC is somewhat unique to FreeBSD because of its ZFS implementation. ARC : Adaptive Replacement Cache is one of ZFS features. ARC used RAM to cache ZFS objects.

Mate Desktop on FreeBSD 11.1

Im doing this step on my freebsd 11.1 laptop after some search on the net.

  1. login as root
  2. pkg install Xorg
  3. pkg install mate
  4. pkg install slim
  5. edit /etc/rc.conf and add following lines if not exist
    1. hald_enable=”YES”
    2. dbus_enable=”YES”
    3. slim_enable=”YES”
    4. moused_enable=”YES”
  6. create .xinitrc file on home directory
    1. exec mate-session
  7. reboot and login

Done