Install and start IHP on NixOS

1. Install nix.

Nix already installed in Nixos, so no further action needed.

2. Install IHP

2.1 Method 1

nix-env -f https://ihp.digitallyinduced.com/ihp-new.tar.gz -i ihp-new

2.2 Method 2

cd ~/Projects/ihp-blog
#nvim default.nix
#…

3. Create New IHP Project

mkdir ~/Projects/ihp-blog
cd ~/Projects/ihp-blog
ihp-new blog3

4. Start The New Created IHP Project

cd ~/Projects/ihp-blog/blog3
./start

5. Access the Web Page

#Open URL http://localhost:8000 in web browser

Allah


اسماء الله الحسني 🌟🌟🌟🌟
1 Allah (الله) The Greatest Name
2 Ar-Rahman (الرحمن) The All-Compassionate
3 Ar-Rahim (الرحيم) The All-Merciful
4 Al-Malik (الملك) The Absolute Ruler
5 Al-Quddus (القدوس) The Pure One
6 As-Salam (السلام) The Source of Peace
7 Al-Mu’min (المؤمن) The Inspirer of Faith
8 Al-Muhaymin (المهيمن) The Guardian
9 Al-Aziz (العزيز) The Victorious
10 Al-Jabbar (الجبار) The Compeller
11 Al-Mutakabbir (المتكبر) The Greatest
12 Al-Khaliq (الخالق) The Creator
13 Al-Bari’ (البارئ) The Maker of Order
14 Al-Musawwir (المصور) The Shaper of Beauty
15 Al-Ghaffar (الغفار) The Forgiving
16 Al-Qahhar (القهار) The Subduer
17 Al-Wahhab (الوهاب) The Giver of All
18 Ar-Razzaq (الرزاق) The Sustainer
19 Al-Fattah (الفتاح) The Opener
20 Al-`Alim (العليم) The Knower of All
21 Al-Qabid (القابض) The Constrictor
22 Al-Basit (الباسط) The Reliever
23 Al-Khafid (الخافض) The Abaser
24 Ar-Rafi (الرافع) The Exalter
25 Al-Mu’izz (المعز) The Bestower of Honors
26 Al-Mudhill (المذل) The Humiliator
27 As-Sami (السميع) The Hearer of All
28 Al-Basir (البصير) The Seer of All
29 Al-Hakam (الحكم) The Judge
30 Al-`Adl (العدل) The Just
31 Al-Latif (اللطيف) The Subtle One
32 Al-Khabir (الخبير) The All-Aware
33 Al-Halim (الحليم) The Forbearing
34 Al-Azim (العظيم) The Magnificent
35 Al-Ghafur (الغفور) The Forgiver and Hider of Faults
36 Ash-Shakur (الشكور) The Rewarder of Thankfulness
37 Al-Ali (العلى) The Highest
38 Al-Kabir (الكبير) The Greatest
39 Al-Hafiz (الحفيظ) The Preserver
40 Al-Muqit (المقيت) The Nourisher
41 Al-Hasib (الحسيب) The Accounter
42 Al-Jalil (الجليل) The Mighty
43 Al-Karim (الكريم) The Generous
44 Ar-Raqib (الرقيب) The Watchful One
45 Al-Mujib (المجيب) The Responder to Prayer
46 Al-Wasi (الواسع) The All-Comprehending
47 Al-Hakim (الحكيم) The Perfectly Wise
48 Al-Wadud (الودود) The Loving One
49 Al-Majid (المجيد) The Majestic One
50 Al-Ba’ith (الباعث) The Resurrector
51 Ash-Shahid (الشهيد) The Witness
52 Al-Haqq (الحق) The Truth
53 Al-Wakil (الوكيل) The Trustee
54 Al-Qawiyy (القوى) The Possessor of All Strength
55 Al-Matin (المتين) The Forceful One
56 Al-Waliyy (الولى) The Governor
57 Al-Hamid (الحميد) The Praised One
58 Al-Muhsi (المحصى) The Appraiser
59 Al-Mubdi’ (المبدئ) The Originator
60 Al-Mu’id (المعيد) The Restorer
61 Al-Muhyi (المحيى) The Giver of Life
62 Al-Mumit (المميت) The Taker of Life
63 Al-Hayy (الحي) The Ever Living One
64 Al-Qayyum (القيوم) The Self-Existing One
65 Al-Wajid (الواجد) The Finder
66 Al-Majid (الماجد) The Glorious
67 Al-Wahid (الواحد) The One, the All Inclusive, The Indivisible
68 As-Samad (الصمد) The Satisfier of All Needs
69 Al-Qadir (القادر) The All Powerful
70 Al-Muqtadir (المقتدر) The Creator of All Power
71 Al-Muqaddim (المقدم) The Expediter
72 Al-Mu’akhkhir (المؤخر) The Delayer
73 Al-Awwal (الأول) The First
74 Al-Akhir (الأخر) The Last
75 Az-Zahir (الظاهر) The Manifest One
76 Al-Batin (الباطن) The Hidden One
77 Al-Wali (الوالي) The Protecting Friend
78 Al-Muta’ali (المتعالي) The Supreme One
79 Al-Barr (البر) The Doer of Good
80 At-Tawwab (التواب) The Guide to Repentance
81 Al-Muntaqim (المنتقم) The Avenger
82 Al-‘Afuww (العفو) The Forgiver
83 Ar-Ra’uf (الرؤوف) The Clement
84 Malik-al-Mulk (مالك الملك) The Owner of All
85 Dhu-al-Jalal wa-al-Ikram (ذو الجلال و الإكرام) The Lord of Majesty and Bounty
86 Al-Muqsit (المقسط) The Equitable One
87 Al-Jami’ (الجامع) The Gatherer
88 Al-Ghani (الغنى) The Rich One
89 Al-Mughni (المغنى) The Enricher
90 Al-Mani'(المانع) The Preventer of Harm
91 Ad-Darr (الضار) The Creator of The Harmful
92 An-Nafi’ (النافع) The Creator of Good
93 An-Nur (النور) The Light
94 Al-Hadi (الهادي) The Guide
95 Al-Badi (البديع) The Originator
96 Al-Baqi (الباقي) The Everlasting One
97 Al-Warith (الوارث) The Inheritor of All
98 Ar-Rashid (الرشيد) The Righteous Teacher
99 As-Sabur (الصبور) The Patient One
أستغفر الله العظيم لي ولي والدي والمؤمنين والمؤمنات الاحياء منهم والاموات

Toggle Touchpad Enable & Disable

Here is my simple script to help me toggle touchpad enable & disable in NixOS running on Thinkpad R61.

~/bin/toggleTouchpadEnableDisable

# Try disabling the libinput device.

d=`xinput list | grep -i touchpad | awk '{for(i=1;i<=NF;i++){ tmp=match($i, /id=[0-9]/); if(tmp){print $i} } }' | awk --field-separator== '{ print $2 }'`
echo 'xinput list'
echo " SynPS/2 Synaptics TouchPad device ID: $d"

# Find the touchpad, in my case it's called "SynPS/2 Synaptics TouchPad", with ID 11.
echo "xinput list-props $d"
de=`xinput list-props $d | grep 'Device Enabled' | awk '{ print $3}' | awk --field-separator=\( '{print $2}' | awk --field-separator=\) '{print $1}'`
ds=`xinput list-props $d | grep 'Device Enabled' | awk '{ print $4}'`
echo " Device Enabled setting ID: $de, Device Enabled status: $ds"

newStatus=0
if [ $ds == 0 ]; then
 #echo "Set new status to: $newStatus"
 newStatus=1
elif [ $ds == 1 ]; then
 #echo "Set new status to: $newStatus"
 newStatus=0
fi

# There should be one called 'Device Enabled'; at least mine has.
echo "xinput set-prop $d $de $newStatus"
xinput set-prop $d $de $newStatus

ds2=`xinput list-props $d | grep 'Device Enabled' | awk '{ print $4}'`
echo " Device Enabled setting ID: $de, Device Enabled status: $ds2"

 

dvorak keyboard

Today is the first day I learn to touch-type with ‘dvorak’ keyboard layout.

Training Requirement

For training, just use current ‘qwerty’ keyboard, and proceed to https://learn.dvorak.nl/.

Ignore what’s printed on physical ‘qwerty’ keyboard keys would help 😛

Training

I do training touch type dvorak at https://learn.dvorak.nl/.

How to change keyboard Layout on Windows

For Windows (I am using Windows7), to configure for switch keyboard layout between ‘qwerty’ and ‘dvorak’, please look at look in Regional and Language Options > Keyboards and Languages > Change keyboards…

2017-12-24 20_24_24-Greenshot-changeKeyboardLayoutQwertyDvorak

Then, to switch between those keyboard layout, we can select the keyboard layout from ‘Language Bar’ icon at bottom-left screen corner. The setting for keyboard layout are by application basis. That’s mean each application have it’s own keyboard layout.

2017-12-24 20_24_24-Greenshot-changeKeyboardLayoutLanguageBar

How to change keyboard Layout on Linux

For Linux (I am using NixOS),  we can use two commands to switch keyboard layout in X and another two commands to switch keyboard layout in console.

When in X, run below command. The setting will effect all application in X.

  • setxkbmap dvorak
  • setxkbmap us

To display current keymap, use command ‘setxkbmap -query’.

When in console, run below command. The setting will effect all application in console.

  • loadkeys dvorak
  • loadkeys us

A tip to easily and quickly switch keyboard layout mapping in Linux

Windows quite good IMHO as it provide ‘language bar’ for easily switch keyboard layout mapping.

For Linux, we can do a little trick to make the switching keyboard layout in X a little bit easier. For example, just need to add two lines aliases to ~/.bashrc file as below:

  • alias asdf=’setxkbmap dvorak’ # to switch to dvorak in X
  • alias aoeu=’setxkbmap us’ # to switch to qwerty in X

The we just need to enter same four left-fingers home keys (‘asdf‘ when currently using qwerty; and ‘aoeu‘ when using dvorak) to switch between those two layout mapping.

Do the same little trick to make the switching keyboard layout in console a little bit easier. For example, just need to add two lines aliases to ~/.bashrc file as below:

  • alias lkj=’loadkeys dvorak’ # to switch to dvorak in console
  • alias nth=’loadkeys us’ # to switch to qwerty in console

The we just need to enter same four right-fingers home keys (‘lkj‘ when currently using qwerty; and ‘nth‘ when using dvorak) to switch between those two layout mapping.

To set default keyboard layout to dvorak in NixOS

Add those line in ‘/etc/nixos/configuration.nix’:

  • i18n.consoleKeyMap = “dvorak”; # for terminals
  • services.xserver.xkbVariant = “dvorak”; # for graphical

And then run rebuild with command ‘nixos-rebuild switch’.

Chocolatey: Package Manager for Windows

While preparing Cikgu JN’s new laptop (refurbish Thinkpad T400), I have amazed that there is opensource package manager and some automation for Windows. The laptop come with Windows 7 Professional.

“Chocolatey is a package manager for Windows (like apt-get or yum but for Windows).”https://chocolatey.org

Main application interface is command line, but also Chocolatey provide option to install nice graphical tool.

Below is some summary command:

choco install -y vlc
choco install -y firefox libreoffice gimp mame telegram sumatra-pdf chocolateygui
choco upgrade -y firefox
choco upgrade -y all

 

GoboLinux 016

This is my note while trying with new release GoboLinux 016 inside VirtualBox.

GoboLinux VM VirtualBox configured as below:

  • KVM
sudo su -

Xorg -configure
 cp xorg.conf.new /etc/xorg.conf

vim /etc/xorg.conf
 Section "Device"
 # Driver "fbdev"
 Driver "vesa"

reboot

ip addr ls
 dhcpd enp0s1
updateRecipes
 cd /Data/Compile/Recipes
 find . | grep -i tmux

tmux
https://github.com/tmux/tmux/releases/download/2.3/tmux-2.3.tar.gz

NewVersion Tmux 2.3 https://github.com/tmux/tmux/releases/download/2.3/tmux-2.3.tar.gz
 Compile Tmux 2.3
vim /System/Settings/Compile/Compile.conf
 compileRecipeAuthor="Muhammad Najib Bin Ibrahim <mnajib@gmail.com>"

ContributeRecipe Tmux 2.3

#scp najib@tomato:~/.tmux.conf

If have broken links from previous installation attempt, try run this prior to Compile:

$ find /System/Index | RemoveBroken

To install package:

SuggestUpdates
InstallPackage -b -C Qt

 

 

Reka-bentuk Banglo Kecil v2

Masih belum berpuas hati dengan reka-bentuk banglo kecil yang sebelum ini, Cikgu cuba mereka-bentuk rumah banglo untuk mendapatkan yang lebih sesuai dengan citarasa.

Berikut antara ciri-ciri rumah yang Cikgu ambil perhatian:

  • Ruang tamu yang dapat melihat kawasan luar depan dan belakang rumah.
  • Saiz rumah yang kecil tetapi selesa.
  • Dapur bersaiz penuh.
  • Dua bilik mandi; dengan tandas duduk dan tandas cangkung.
  • Ruang untuk mesin basuh pakaian.
  • Ruang untuk simpan kasut.
  • Ruang untuk pejabat/komputer.
  • Ruang tamu boleh digunakan untuk solat jemaah, dan juga untuk majlis keramaian.
  • Dapur dan meja makan yang agak tersorok dari ruang tamu.
  • Pili air di luar pintu masuk depan dan belakang rumah.
  • Semua bilik tidur mempunyai tingkap yang sesuai.
  • 4 bilik tidur (1 bilik parent, 2 untuk anak lelaki dan anak perempuan, 1 untuk tetamu atau stor).
  • Kedudukan bilik-bilik dengan ruang keluarga berkumpul tidak terlalu jauh/terpencil, supaya mudah berinteraksi/bertemu muka dan dapat merapatkan hubungan kekeluargaan.

Ciri-ciri yang terpaksa diketepikan dalam reka-bentuk ini antaranya ialah seperti yang berikut:

  • Ruang khas untuk pentry.
  • Ruang stor. Untuk ruang stor ini, mungkin boleh diadakan sekalikan dengan garaj kereta. Kontena terpakai juga mungkin boleh diguna sebagai ruang stor.
  • Ruang jemuran pakaian selepas basuh untuk dikeringkan, kerana boleh diadakan di luar rumah.
  • Attached-garrage for two cars.

rumahpegoh-livingdiningtengah_dapurtepiblkg_4bedrooms_0garage_v1-6-photo009-edited