On Makefiles, an advanced tutorial

Makefiles Makefiles are an indispensable tool when it comes to standardizing things like build processes, and certain automation tasks. The Makefile and gnu make at this point is over 40 years old, and while its got a few hiccups and is a bit rough around the edges, its quite widely adopted and allows developers to work seamlessly across projects simply due to the presence of the humble makefile. What I aim to do in this blog post is simple....

January 2, 2022 · 9 min · Yashodhan Ghadge

Shortcuts on VIM

Vimrc Generally, as a devOps engineer, I have to edit a lot of config files on remote servers, and these always almost have vim installed. Coincidentally over the years I have taken up vim quite swimmingly, however when I am SSH’d into a server I find it hard to keep turning on a few vim flags that improve the overall QOL. So I have this tiny .vimrc that I use....

March 29, 2021 · 1 min · Yashodhan Ghadge

CodeCommit (CC) keys are only RSA - https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_ssh-keys.html#ssh-keys-code-commit ssh-keygen -t rsa -b 4096

1 min · Yashodhan Ghadge

Bluetooth and wifi broadcomm drivers

Get Bluetooth working on brodcomm drivers So if you install the WiFi drivers, you will mostly have the bluetooth not working, to fix this follow these steps lsusb | grep Bluetooth you’ll get: Bus 001 Device 004: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0 We nee the ID 0a5c:21d7 and BCM43142 bits now do dmesg | egrep -i 'blue|firm' and you’ll probably get: bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2...

1 min · Yashodhan Ghadge

Docker Install (And ECR login)

install docker Run these commands sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg-agent \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" Some times the above command gives an error: malformed input, in that case, please do Add the line deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable to /etc/apt/sources.list.d/addtional-repositories.list (create the file if it does not exist) Rest of the steps are the same...

2 min · Yashodhan Ghadge

EC2 attach EBS Volumes

link for reference https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html Attach a volume to an EC2 Instance SSH into the EC2 instance use lsblk to get the device name, full path is now /dev/ check if vol is already init with a file system sudo file -s /dev/<name_of_device> - 1 if output is just data then there is no filesystem on it, make one on it now mkfs -t [ext4| XFS] /dev/<name_of_device> (may need sudo) run 1 again to ensure it is written to the block device...

2 min · Yashodhan Ghadge

FTP Install

install VSFTPD is the one most people use steps here are for install on a linux AMI 2 instance sudo yum install vsftpd for ubuntu do sudo apt-get install vsftpd Most VSFTPD’s configuration takes place in /etc/vsftpd/vsftpd.conf. The file itself is well-documented, so this section only highlights some important changes you may want to make. For all available options and basic documentation see the man pages: man vsftpd.conf Enable Uploading to the FTP server:...

1 min · Yashodhan Ghadge

Git tips and tricks

use ssh over https on github git remote -v it will look like https://ww.github.com/… change it via git remote set-url origin <link> where link is of type git@github.com:codexetreme/… Generate ssh key rsa - an old algorithm based on the difficulty of factoring large numbers. A key size of at least 2048 bits is recommended for RSA; 4096 bits is better. RSA is getting old and significant advances are being made in factoring....

3 min · Yashodhan Ghadge

Kafka Install

Download Kafka wget https://mirrors.estointernet.in/apache/kafka/2.5.0/kafka_2.12-2.5.0.tgz untar the file sudo tar xvf kafka_2.12-2.5.0.tgz cd to configruation directory cd kafka_2.12-2.5.0/config edit server.properties with # The id of the broker. This must be set to a unique integer for each broker. broker.id=30 # A comma seperated list of directories under which to store log files log.dirs=/tmp/kafka-logs advertised.host.name=<ip address of host> # add all 3 zookeeper instances ip here zookeeper.connect=<i>:2181,<ip>:2181,<ip>:2181 zookeeper.connection.timeout.ms=6000 from the kafka root directory do...

1 min · Yashodhan Ghadge

MyRepos

Myrepos Install sudo apt install myrepos You have a lot of version control repositories. Sometimes you want to update them all at once. Or push out all your local changes. You use special command lines in some repositories to implement specific workflows. Myrepos provides a mr command, which is a tool to manage all your version control repositories. getting started All you need to get started is some already checked out repos....

2 min · Yashodhan Ghadge