Arkib Nota
Siaran Lama
Konten []
- Combining/Merging Pictures with [ImageMagick]
- Left-to-Right:
convert +append -background black image1.jpg image2.jpg output.jpg
- Top-to-Bottom:
convert -append -background black image1.jpg image2.jpg output.jpg
- EXAMPLE of merging photos with borders and centered position:-
convert +append -background black -border 1 -bordercolor white -gravity center image1.jpg image2.jpg output.jpg
- Left-to-Right:
- 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 a root
:-- Ensure that wifi is unblocked:-
rfkill unblock wifi
- Enable
wpa_supplicant.service
anddhcpcd.service
:-systemctl enable --now wpa_supplicant.service && \ systemctl enable --now dhcpcd.service
- Connect with
wpa_supplicant
:-wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
- Totally kill the
wpa_supplicant
process should you need to connect to a different network:-Repeat step number (iv) above with different configuration of the network details.killall wpa_supplicant
Provided below is an example of a simple validwpa_supplicant.conf
file:-ctrl_interface=/run/wpa_supplicant update_config=1 ap_scan=1 fast_reauth=1 country=MY network={ ssid="MYSSID" psk="passphrase" }
- Ensure that wifi is unblocked:-
- Displaying Codes Behind A Symbol In Pygments
The good thing aboutsyntax highlighting
withPygments
is that we do not have to useHTML 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 itsHTML escape
which is <&
>. In this case, the code behind the symbol used in this example is <⌘
>. So in our code writing, we should type it this way; <&#8984;
>.
Rujukan: place of interest sign (U+2318) - Grub2 Menuentry for Chainloading FreeBSD-UEFI
menuentry 'FreeBSD 11.1' { insmod ufs2 set root=(hd0,gpt10) chainloader /boot/boot1.efi }
Rujukan: fighting with grub2 - Perubahan Hari Kepada Kalendar Hijrah
Ada masanyahari
padaKalendar Hijrah
akan berubah kerana pengiraan dibuat berdasarkan kemunculan bulan atau dalam istilah Inggerisnya dipanggil 'lunar calendar
'. Jadi akan ada keperluan untuk menyunting dua fail ini; satu untuk dipamerkan pada [i]conky
dengan konfigurasi dalam bahasapython
dan satu lagi untuk dipamerkan diweblog
ini melalui [ii]skripjava
.- Suntingan pada fail
hijri.py
dari pakej ummalqura:-#id = mcjdn - UmalqurraArray.ummalqura_dat[index - 1] + 1 # komen baris asal id = mcjdn - UmalqurraArray.ummalqura_dat[index - 1] + 0 # tambah baris baru
- Suntingan pada fail
moment-hijri.js
:-//hd = mjdn - ummalqura.ummalquraData[i - 1] + 1 # komen baris asal hd = mjdn - ummalqura.ummalquraData[i - 1] + 0 # tambah baris baru
- Suntingan pada fail
- Mengatasi Kegagalan Git Ketika Menambah Submodule
Saya terima ralat ketika cuba menambahsubmodule
public untukgit
melalui baris perintah berikut, ie.:-git submodule add -b master git@github.com-web:saya/saya.github.io.git public
Ralat yang diterima adalah:-Cloning into '$HOME/hugo/blog/public'... Enter passphrase for key '$HOME/.ssh/id_rsa.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'
Jadi saya berjaya selesaikan masalah ini melalui pembacaan di [halaman ini].
Langkah-langkah yang perlu dibuat adalah:-- Periksa sekiranya
origin
ada ditetapkan dengan menjalankan baris perintah seperti di bawah:-git remote -v
Jika tiada apa-apa input yang keluar, tinggalkan langkah kedua dan teruskan dengan langkah ketiga diikuti langkah-langkah berikutnya.
Jika mendapat keputusan seperti ini,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
remote
yang lama dengan baris perintah berikut:-git remote remove origin
- Kemudian bolehlah menambah
remote
yang betul dengan:-git remote add origin git@github.com-blog:saya/blog.git
- Dan akhir sekali, tambahkan
submodule
:-git submodule add -b master git@github.com-web:saya/saya.github.io.git public
Maklum balas yang sepatutnya diterima adalah seperti ini:-Adding existing repo at 'public' to the index
- Periksa sekiranya
Rujukan: wpa_supplicant | ArchWiki
Kali terakhir dikemaskini: