Skip to main content

Posts

C Quiz

 This is more of a promotional post rather than a coding tip. I have few online quiz on various topics of C, C++, Java and Data structures. Recently I updated C Quiz and C coding questions page. You can just visit the site and take a random 10 question quiz on these topics. 
Recent posts

Change Grub timeout duration

 Grub is the most commonly used boot loader in Linux systems.         Grub : A program that calls a Unix/Linux operating system into memory. Officially GNU GRUB, GRUB is a popular boot loader due to its flexibility and configuration capabilities, allowing changes to be made at boot time and support for boot images from the network.  Quite often you don't see the grub menu at all. And under most circumstances it is OK. But if you have some problems and you have to go to recovery mode, you have to see the menu and select an OS from the menu.  So you love to see this grub menu when you boot your system and you are unable to see it. The culprit is the GRUB_TIMEOUT. If this value is set to 0, then you can't see the menu.  The correct method to change its setting is through the file /etc/default/grub   sudo vi /etc/default/grub $ cat /etc/default/grub # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the op

Financial Calc app gitted

  To publish or not to publish, that is the question said me. I had this not a great app, but maybe useful app. For Indian users. Given your Fixed Deposit or Recurring Deposit, it would calculate the final amount in various configuration.  That way, you could check whether the app used by banks is correct or not. But seriously, I had added interest rates of some banks and compare the amounts etc. But I was vary of publishing the app. Due to various reasons. But nor did I want my hard word to rot. Silicon chips may not rot, but any ways. So I would write few lines of code, take all screen shots, check it in my device. Then sit idle for many many days. Literally idle.  Today, I had an idea. Let me donate it. The source code. So that some MCA student can use it for his project. Or some one else may use it as a hobby app. Some thing.  Any ways, now it is in github . Download the source code of the app and see if it helps you in any way. So basically the app does the following calculations

Password recovery in Linux Mint

 If you are like me, you have millions of passwords and you tend to change them frequently. But what happens if you can't login to your Linux machine? Shift key :  Often, your mint system does not show you grub screen to select the boot option. But you need that for recovery option. So, while boot, continuously click on shift key.  This will bring up the advanced options. Edit this menu option and change ro to rw, because you want your system to be read/write. Now boot the recovery option using F10. And descend to boot as root. Now you will see boot prompt - #.  Give passwd command as  passwd username   and change your password.  Now I can say proudly that along with installing OS, I can also recover password in Linux system. 

Forcing password changes in Linux - chage

 If you are like me - ultra paranoid, you are not happy with one password. You want to change the password frequently (before the hacker some how solves it ;) ). chage is the command for you. chage - there is no n here - determines after how many days the password of a user expires.  This is what man page says about it          The chage command changes the number of days between password changes and the date of the last password change. This information is used by  the system to determine when a user must change his/her password. You can set number of days after which password expires, when do you want to be prompted for it etc.  $sudo chage username [sudo] password for username: Changing the aging information for username Enter the new value, or press ENTER for the default     Minimum Password Age [0]:     Maximum Password Age [10]:     Last Password Change (YYYY-MM-DD) [2021-08-26]:     Password Expiration Warning [1]:     Password Inactive [-1]:     Account Expiration Date (YYYY-M

Shataka - a game to get century

 Let us see if you can solve this puzzle. You remember the rules! You have to get 100 as sum of every row and sum of every column.  If you feel you can solve it in no time, why don't you download the app, and solve other levels too.

Shataka

 The number game Shataka is published. The game is to rearrange 9 numbers in a grid to get a sum of 100 in rows and in columns. I think you will like it. Install it now a nd see for yourself