Erdal TAŞKESEN
git(7) devops(4) python(4) cli(2) erdaltaskesen.com(2) flask(2) github(2) tip(2) book(1) cron-job(1) dropbox(1) fix(1) hugo(1) kindle(1) macos(1) netlify(1) nginx(1) pip(1) programming(1) rest-api(1) safari(1) seo(1) ssh(1) ubuntu(1) virtualenv(1) zip(1)

Creating and Applying Patch in Git

05 September 2020

I’m using erdaltsksn/blank as a Template for my open source projects. When I make a commit in this repository, I need to apply the same commit to every repository in my account which means lots of repetitive work. But there is a simple solution for this kind of work in Git.

Preparing an eBook for Kindle

26 May 2020

The Kindle is a revolutionary device that changes the reading habit of a lot of people including me recently. Everything works flawlessly when you purchase a book from the Amazon store.

Not every book exists in the store and sometimes you find the same book in a different vendor at a much cheaper price. The problem starts here. All the beauties of having kindle disappear in this situation. In this post, I will help you prepare your books for Kindle.

The Era of Micro Packages

28 April 2020

I’ve been planing to write a blog post about this for a long. Building small, focused modules/package means reusability and makes it possible to build larger more advanced apps.

As stated by Douglas McIlroy, Unix programs have always been expected to follow the concept of DOTADIW:

“Do One Thing And Do It Well.”

How to list your most-used commands

19 April 2020

If you are a developer, you’re mostly working using the command line. You may even wanna find out the most used commands.

fc -l 1 | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a; }' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10

WARNING: UNPROTECTED PRIVATE KEY FILE!

11 October 2019

I was planning to do a clean install after macOS Catalina was released. I copied my ssh keys and I’ve seen the warning when I tried to run git-related commands.

After a short research, I’ve found out the source of the problem is the permissions on the private key file.

Using WhatsApp for Private Storage and Quick Transfer

25 September 2019

WhatsApp is undoubtedly one of the most popular messaging apps out there. You can use it a lot more than messaging with a little hack.

WhatsApp doesn’t allow you to send messages to your own number. Of course, you can use one of your friends for that aim but it can be annoying for your friend over time. A better way of it is using the simple trick below.

How to execute the last command with Sudo

30 May 2019

If you forgot to add sudo in your last command, you don’t need to type it completely. To execute ant last executed command by as super user:

sudo !!

How do I stop automatically unzipping downloaded Zip files in Safari

04 February 2019

The Safari browser opens automatically the files that is considered “safe” after it finishes downloading them. This can be very handy sometime but it can be dangerous as well. If you would like Safari just download the .zip files and leave it to you decided what to do, you can disable this feature.

Using File Finder on Github

25 December 2018

The first time I started to use Sublime Text I love the ⌘ + p shortcut combination. I really change the way I switch between files. After Github, I started to read codes on Github a lot.

Of couse you can use the search in this repository feature but it is slow and not good about listing files names.

Today I have discovered wonderful keyboard shortcut on Github: t

How to partially stage files

20 December 2018

GIT has a wonderful idea that is known as the staging area. The stage area is the place where you prepare the files that are going to be on your next commit. Sometimes you want to add only one specific part of some files.

You can use one of the following commands. This commands with their options will will break down your files into smaller portions named hunks.

git add -p <filename>