Sunday, December 31, 2023

Thursday, December 28, 2023

A Small Issue To Compile Usb-notify Program 2023

A Small Issue To Compile Usb-notify Program 2023

undefined reference to notify_notification_new

I like the usb-notify program a lot. This small little program displays a notification on the Linux desktop when a USB device is plugged in.

To compile I need libnotify-dev, libudev-dev package.

$ git clone https://github.com/wcampbell0x2a/usb-notify
$ cd usb-notify
$ make
⇒ bin/usb-notify

Note: Need notification-daemon running to show the notification.

It should just compile and be successful. If it doesn't it is just a small issue, but this small issue took me 1.5 days to try out many other ways, for example trying to recompile the dependency libraries.

This is what I get:

$ gcc -ansi -pedantic -g -std=c99 -W -Wextra -Wall \
`pkg-config --cflags --libs libnotify` \
-o bin/usb-notify src/usb-notify.o -ludev

undefined reference to `notify_notification_new'

Keep story short, there is no missing libnotify, as 'pkg-config --libs libnotify' will return '-lnotify' (refer to libnotify.a or libnotify.so), is just has to be put at the back of the compile statement:

$ gcc -o bin/usb-notify src/usb-notify.o -ludev `pkg-config --libs libnotify`

So you might just need to modify the Makefile will do.

Monday, December 04, 2023

How To Apply RM100 Government eWallet Incentive 2023

How To Apply RM100 Government eWallet Incentive 2023

Malaysia government give RM100 incentive for those those who is eligible. The RM100 can be applied through the following eWallet, Touch'n Go eWallet, MAE (Maybank), Shopee Pay, SETEL (Petronas?). Applying period is from 2023 5 December to 2024 20 February.

This RM100 can only be spent on merchants, not transferable or paying bills.

MAE

MAE app > eMadini icon > fill in information and submit.

Touch'n Go eWallet

TNG eWallet > eMadani banner > [x] agree T&C > Claim Now

OR

TNG eWallet > Profile (top right icon) > Inbox/Alert (top right) > click on the notification > confirm MyKad information > [x] agree T&C > Claim Now