(Arkib) Nota
Combining/Merging Pictures with ImageMagick
Left-to-Right:
bashconvert +append -background black image1.jpg image2.jpg output.jpgTop-to-Bottom:
bashconvert -append -background black image1.jpg image2.jpg output.jpgEXAMPLE of merging photos with borders and centered position:-
bashconvert +append -background black -border 1 -bordercolor white -gravity center image1.jpg image2.jpg output.jpg
Rujukan: ImageMagick
Connect to WiFi with wpa_supplicant
This is somehow a primitive method for connecting to a wireless network but I just prefer doing it this way. Please refer to step number (i) and (ii) if you are running it for the first time. Otherwise, skip to step number (iii).
As root :
Ensure that wifi is unblocked:-
bashrfkill unblock wifiEnable
wpa_supplicant.serviceanddhcpcd.service:-bashsystemctl enable --now wpa_supplicant.service && \ systemctl enable --now dhcpcd.serviceConnect with
wpa_supplicant:-bashwpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.confTotally kill the
wpa_supplicantprocess should you need to connect to a different network:-bashkillall wpa_supplicant
Repeat step number 4 above with different configuration of the network details.
Provided below is an example of a simple valid wpa_supplicant.conf file:-
bashctrl_interface=/run/wpa_supplicant
update_config=1
ap_scan=1
fast_reauth=1
country=MY
network={
ssid="MYSSID"
psk="passphrase"
}Rujukan: wpa_supplicant | ArchWiki
Displaying Codes Behind A Symbol In Pygments
The good thing about syntax highlighting with Pygments is that we do not have to use HTML Escape in order to display a character/symbol in our codes.
However, I believe that there may be times when we need to present the code behind such character/symbol in our highlighted codes. So, here is the tip to have this purpose done:
Let’s say we need to have this
character code shown in our highlighted codes. All we need to do is to replace the <&> symbol with its HTML escape which is <&amp;>. In this case, the code behind the symbol used in this example is <&#8984;>. So in our code writing, we should type it this way; <&amp;#8984;>.
Rujukan: place of interest sign (U+2318)
Grub2 Menuentry for Chainloading FreeBSD-UEFI
/boot/efi/grub/grub.cfgmenuentry 'FreeBSD 11.1' {
insmod ufs2
set root=(hd0,gpt10)
chainloader /boot/boot1.efi
}Rujukan: fighting with grub2
Mengatasi Kegagalan Git Ketika Menambah Submodule
Saya terima ralat ketika cuba menambah submodule public untuk git melalui baris perintah berikut:
bashgit submodule add -b master git@github.com-web:saya/saya.github.io.git publicRalat yang diterima adalah:
Cloning into '$HOME/hugo/blog/public'...
Enter passphrase for key '$HOME/.ssh/id_ed25519_web':
warning: You appear to have cloned an empty repository.
fatal: 'origin/master' is not a commit and a branch 'master' cannot be created from it
Unable to checkout submodule 'public'Saya berhasil selesaikan masalah ini melalui pembacaan di halaman [Git push: “fatal ‘origin’ does not appear to be a git repository - fatal Could not read from remote repository.”]
Langkah-langkah yang perlu dibuat adalah:
Periksa sekiranya
originada ditetapkan dengan menjalankan baris perintah seperti di bawah:-bashgit remote -vJika tiada apa-apa input yang keluar, tinggalkan langkah kedua dan teruskan dengan langkah ketiga diikuti langkah-langkah berikutnya.
Sekiranya dapat output sebagaimana di bawah, teruskan dengan langkah kedua sehingga akhir.
origin git@github.com-blog:saya/blog.git (fetch) origin git@github.com-blog:saya/blog.git (push)Singkirkan tetapan
remoteyang lama dengan baris perintah berikut:-bashgit remote remove originKemudian, bolehlah menambah
remoteyang betul dengan:-bashgit remote add origin git@github.com-blog:saya/blog.gitDan akhir sekali, tambahkan
submodule:-bashgit submodule add -b master git@github.com-web:saya/saya.github.io.git publicMaklum balas yang sepatutnya diterima adalah seperti ini:
Adding existing repo at 'public' to the index
