Posts

Showing posts from 2019

Trim Unnecessary Files From Git History ✂️🗃️

Image
Here's a common scenario, You have committed a file to your git repo and have also pushed to remote. The file wasn't supposed to be there, maybe it was something you forgot to mention in your`gitignore` or something that was supposed to be an environment variable or maybe it was a binary not related to the project at all ( Cat GIFs? 😉). This not only raises some security concerns but also drives the  size of your repository up and simply deleting the file won't fix the problem. Here's how to fix it using a few commands: 1) Clone your repo and make sure all branches are up-to-date with remote. 2) Identity the filename and its path that you want to remove. 3) Then using git filter-branch remove the files from history. git filter-branch --tag-name-filter cat --index-filter \ "git rm -r --cached --ignore-unmatch filename" --prune-empty -f -- --all 4) Remove the files from the local repo. rm -rf .git/refs/original/ git reflog expire...

Navigating JavaScript 🤷‍♂️⁉️

Image
JavaScript? JavaScript is taking the world by storm, once used to add functionality to the web, now it is being used in almost all types of software development. For example, Using JavaScript you can do things like build Progressive Web Apps (web apps with native app like features) , create desktop apps using electron, make Android & iOS apps with React Native, do server stuff using Node and Express and many more. If that wasn't overwhelming and confusing enough,  there exists more flavours of JavaScript out there than you can count 😵 & what is JavaScript and what's not is a post for another time. So how do you get started with this interesting piece of technology? 1️⃣ The first thing you should do is learn Vanilla JS . Strong fundamentals go a long way. I will suggest JavaScript30 a free course by Wes Bos, that focuses on Vanilla JS. 2️⃣ Next get familiar with JSON , which stands for Javascript Object Notation. It is mostly used for data storage ...

Must Know Shell Keybindings 🐧🐚

Image
A shell also known as the command line is one of the most important tools for any software developer. You can do very complex things very quickly here. Learning to use the shell efficiently can make your life much easier. In this post I'll be writing about the most useful keybindings for the bash and zsh shells. *nix systems generally ship with the Bourne again shell or bash and zsh or Z shell is also quite popular among developers as it provides some very powerful features. Some of these shortcuts may work with other shells too. # Shell Keybindings ## Navigation 🚀 Alt + f/b  - Move cursor to previous/next word Ctrl + a/e - Move cursor to beginning/end of command Ctrl + xx  - Toggle between the start of line and current cursor position --- ## Editing ✏️ Ctrl + x,e   - Open command in editor Ctrl + k     - Cut till end Ctrl + u     - Delete whole line (zsh)/ cut until beginning (bash)...

Two Factor Authentication 🔏👤

Image
In a previous post, I wrote about password managers and why you should have one, In this follow up article I'll try to explain Two Factor Authentication or 2FA and how it can make your security more robust. So what 2FA does is that It adds another layer to your security. After you provide your username and password 2FA will ask for a special code that you may receive via SMS or an authenticator app. You can only login after providing the 2FA code. So now, even if someone manages to get their hands on your login credentials they still won't be able to access your account. 2FA is not unbreakable but it is more secure than passwords. Most of the online services provide 2FA including Google, Facebook, Twitter, GitHub, Steam etc. You can setup 2FA for your account by going to the security settings of that platform. For authentication you may use SMS or an authenticator app. Using an authenticator app is recommended though as it can backup your codes and ...

Tracking Code Time ⏲️💻

Image
If you code professionally or as a hobby or are just learning to code, tracking code time can be very useful to you as it can unlock some valuable insights for you. I recently came across one such tool and have a overview of its features here. Wakatime is one of those tools . the help of a  you can easily logs all your coding activities like: ▪️which editor you are using ▪️which project you are working on ▪️which language you are using All that data is presented very gracefully on the wakatime dashboard . Another great feature of wakatime is goals where you can set goals for yourself and wakatime will keep track of those goals and send reminders via mail as well. This can help you if you are trying to learn a certain framework or library or language or maybe you are trying to learn a new editor like vim. Wakatime also has other features like shareable embeddables, leaderboards, integrations etc. This kind of gamifies programming and makes it a l...

Password Managers 101 🔑🌐

Image
All of us have at least 10 or more accounts on the net nowadays and managing all those passwords can get tricky if not done correctly. You can easily forget your password and if you don't you have a very easy to guess password, and that is a very terrible thing to do. You also have to remember other information like credit card informations, licence keys, secure notes etc. A simple solution to those problems is a password manager. A password manager creates a database of your passwords, username and other details. Those passwords could then be easily synced across your devices and with things like autofill they make the whole online experience much more simpler to everyone without worrying about a gazillion passwords. You do have to remember the master password for your specific database and that's a necessary evil. A good option is KeePass it has both online and offline capabilities and is completely free. KeePass is available on all the major ...

Hidden World Of Podcasts 🎙️🎧

Image
What do you have playing on your earphones while traveling, driving  or doing something less mentally taxing? I'm sure most of your answers will be music and I do love my music. But there's another form of audio only media out there that can take your ears on a joyride - " Podcasts " Yes, podcasts a very powerful form of media which is often under explored. Some of you might have never listened to one and that's relatable since I myself discovered podcasts a short time ago. Podcasts are not a very popular form of media around the world. So... What are podcasts? Podcasts are audio only form of media similar to shows on a radio, but unlike radio shows, podcasts are distributed via the internet. Podcasts cover topics on almost everything from philosophy to sports, technology to spirituality, news to comedy and everything in between. If you have a niche hobby there's a pretty good chance that you'll find a podcast for that out there. ...