Packages I use in any Linux based OS

Packages on Arch pacstrap base linux-lts linux-lts-headers base-devel btrfs btrfs-progs vim networkmanager grub efibootmgr intel-ucode Utils mtpfs : Reading and Writing from any MTP device ntfs-3g : NTFS filesystem driver and utilities gvfs-mtp : Virtual filesystem implementation for GIO (MTP backend; Android, media player) gvfs-gphoto2 : Virtual filesystem implementation for GIO (gphoto2 backend; PTP camera, MTP media player) nfs-utils : Support programs for Network File Systems tlp : Linux Advanced Power Management powertop : A tool to diagnose issues with power consumption and power management python-pip : The PyPA recommended tool for installing Python packages jre8-openjdk : OpenJDK Java 8 full runtime environment jre8-openjdk-headless : OpenJDK Java 8 headless runtime environment wget : Network utility to retrieve files from the Web gnome-keyring : Stores passwords and encryption keys Arch # Filesystem Support pacman -S mtpfs ntfs-3g gvfs-mtp gvfs-gphoto2 # Power Management pacman -S tlp powertop # Development pacman -S python-pip jre8-openjdk jre8-openjdk-headless wget gnome-keyring xorg libx11 : X11 client-side library xorg-xinit : X.Org initialisation program libxinerama : X11 Xinerama extension library libxft : FreeType-based font drawing library for X xorg-server : Xorg X server xorg-xrandr : Primitive command line interface to RandR extension xorg-xrdb : X server resource database utility xorg-xinput : Small commandline tool to configure devices xorg-xbacklight : RandR-based backlight control application xf86-video-intel : X.org Intel i810/i830/i915/945G/G965+ video drivers xclip : Command line interface to the X11 clipboard Arch pacman -S libx11 xorg-xinit libxinerama libxft xorg-server xorg-xrandr xorg-xrdb xorg-xinput xorg-xbacklight xclip pacman -S xf86-video-intel yay -S libxft-bgra-git Gentoo emerge x11-libs/libX11 x11-base/xorg-server x11-libs/libXrandr x11-libs/libXinerama x11-libs/libXft x11-apps/xinit x11-apps/xrdb x11-apps/mesa-progs x11-apps/xrandr x11-misc/unclutter x11-misc/xclip Basic picom : X compositor that may fix tearing issues unclutter : A small program for hiding the mouse cursor os-prober : Utility to detect other OSes on a set of drives man-db : A utility for reading man pages bash-completion : Programmable completion for the bash shell zsh-completions : Additional completion definitions for Zsh zip,unzip,tar,bzip2,atool,unrar : Compression utils Arch pacman -S picom unclutter os-prober man-db bash-completion zsh-completions pacman -S atool zip unzip tar bzip2 gzip lzip unrar Fonts noto-fonts : Google Noto TTF fonts noto-fonts-cjk : Google Noto CJK fonts ttf-joypixels : Emoji as a Service (formerly EmojiOne) Arch pacman -S noto-fonts ttf-joypixels ...

April 12, 2021 · 5 min

Git Undo Mistakes

Undoing Mistakes in Git 1. Discarding Uncommitted Changes a) git restore <file> Discards uncommitted modifications in the specified file. Irreversible: once applied, changes cannot be recovered. b) git restore -p <file> The -p (patch) option lets you interactively choose hunks to discard. Useful for selectively reverting parts of a file. c) git restore . Discards all uncommitted changes in the working directory since the last commit. 2. Amending the Last Commit git commit --amend -m "New Commit Message" Updates the message (and/or contents) of the last commit. Do not amend commits that have already been shared with others. 3. Reverting a Specific Commit git revert <SHA> Creates a new commit that inverts the changes of the specified commit. Safe way to “undo” a change without rewriting history. Obtain the SHA from git log, e.g. 74e3b2b. 4. Resetting to an Earlier Commit a) git reset --hard <SHA> Moves HEAD and current branch to the given commit, discarding all subsequent commits and uncommitted changes. Warning: unpushed commits are permanently lost. b) git reset --mixed <SHA> (default) Similar to --hard, but preserves changes from discarded commits as unstaged modifications. 5. Restoring a File from a Past Commit git restore --source <SHA> -- <file> Replaces the working copy of <file> with its state at the given commit. Only affects the specified file. 6. Using the Reflog to Recover Lost Commits git reflog Records updates to HEAD (including resets) for a limited time. Find the SHA of a lost state and then create a branch or reset to it. Restoring After a Hard Reset Locate the prior HEAD reference in the reflog. Use git branch <new-branch> <reflog-SHA> to recover. Recovering a Deleted Branch Identify the branch tip SHA via git reflog. Recreate the branch: git branch <branch-name> <SHA>. 7. Moving Commits to Another Branch a) To a New Branch git branch <new-branch> git reset --hard HEAD~1 Creates <new-branch> at the current HEAD, then removes the last commit from the original branch. b) To an Existing Branch git checkout <target-branch> git cherry-pick <SHA> git checkout <original-branch> git reset --hard HEAD~1 Cherry-picks the commit into <target-branch>, then removes it from the source branch. 8. Interactive Rebase for History Rewriting Use with caution: Interactive rebase rewrites commit history, which can break shared branches. ...

March 24, 2021 · 3 min

Arch installation Guide

Ofcource my notes are are derived from Arch Wiki. And I highly recommend to read it too. These notes contains all the things which i do at the fime of new Arch Installation, so it is well tested. Create Bootable usb sudo dd bs=4 if=/mnt/Tools/linux/distros/archlinux-2021.02.01-x86_64.iso of=/dev/sdb conv=fdatasync status=progress Verify the boot mode To verify the boot mode, list the efivars directory: ls /sys/firmware/efi/efivars If the command shows the directory without error, then the system is booted in UEFI mode. If the directory does not exist, the system may be booted in BIOS (or CSM) mode. If the system did not boot in the mode you desired, refer to your motherboard’s manual. ...

March 24, 2021 · 4 min

Vitarana Drone

Duration: Oct 2020 – Feb 2021 Team Members: Rishav Singh, Kashyap Joshi Technology: Python, ROS, Drone/Quadcopter, Gazebo, Git, Linux Overview Vitarana Drone was part of the e-Yantra Robotics Competition 2020-21, an international robotics outreach program hosted by IIT Bombay. Competing against 2,603 teams from 572 colleges, we designed an autonomous drone-based delivery system to execute precise object handling and delivery tasks in a simulated environment. Project Journey Beginning Entered the competition in our 2nd year of B.Tech. Started with 4 members but 2 left in between, we try to bring em on board but it was unavoidable. So work increased on 2 people. But still managed to divide the task in smaller, easily doable parts and divided according to the skills Focused on breaking tasks into manageable parts and acquiring new skills on the go. Key Milestones Task 1: Position and Altitude Control Developed and tuned PID controllers for roll, pitch, yaw, and throttle. Achieved precise setpoint control after extensive testing and parameter tuning. Took around 5 days to study and impliment the algorithm but tuning the PID required 10 days straight. Task 2: Obstacle Avoidance Considering we were given 4 sensors on 4 sides with 25 meters range each, we searched and studied about many path planning algorithms. Implemented a 2D custom Bug Algorithm for object avoidance using sensor inputs. Designed ROS actions for barcode scanning and delivery location determination. Task 3: Advanced Pathfinding Enhanced pathfinding for 3D environments to navigate complex obstacles by changing height(throttle). Used image processing for accurate marker detection and landing precision. Task 4: Delivery Optimization Developed a mechanism for retrieving delivery boxes from a warehouse grid and delivering them to specified locations. Improved marker scanning by adjusting drone altitude to enhance accuracy during detection. Enhanced the obstacle avoidance algorithm for more reliable navigation. Despite being one day late for the deadline, implemented major improvements within a single day, incurring a 25% penalty while ensuring task completion. Task 5: Time-Limited Arena Challenge Tasked with delivering and picking up as many boxes as possible within an 8-minute timeframe, with scoring based on delivery distance. Prioritized delivering boxes to distant locations to maximize points, balancing quality and speed (race against time). We had 2 choices either to deliver near boxes first to increase number of boxes or to deliver furthest boxes first to maximize distance points. We selected the later one because our algo was taking more time to detect and land on marker. Overcame many difficulties like sometimes the markers were so near to each roof that drone scanned wrong marker sometimes. So we had to resolve the issue by taking the nearest path to the provided approx location of marker. Introduced a velocity controller to increase drone speed in obstacle-free zones, enhancing overall efficiency. Task 6: Final Round Challenge Faced a more complex delivery and pickup task with tighter constraints and only two days for completion. Focused on improving code robustness and refining interconnections between controllers to prevent errors and crashes. Documented the code extensively on the final night of submission, working under high pressure with short power naps to maintain productivity. Me and my partner waking up each other after taking 10 min power naps. Main difference between our solution and top 6 solution was that we focused more on stability over speed. Although we missed the finals, the task highlighted the importance of stability and meticulous planning in achieving high performance. Conclusion Participating in this competition provided invaluable lessons in technical problem-solving, team collaboration, and time management. Despite the challenges of a reduced team and tight deadlines, we demonstrated resilience and adaptability, balancing stability with performance optimization. While we narrowly missed the finals, the experience significantly enhanced our expertise in control systems, path planning, and autonomous systems, preparing us for future complex engineering challenges. ...

October 1, 2020 · 4 min

Agriculture Ideas

Vision Ease of use that even i can be farmer High yield Low cost Long term solution for farmers as well as environment Imagination Greenhouse Drone/Balloon used for monitoring disease, weeds, etc. and make a report Based on this report automatically spray in those areas Use biofertilizers Use sensors for reporting what and when nuterients are needed

1 min