Tag Archives: Bash

Deploying to production via FTP using GIT hooks

In this post, we address a common development task of pushing to production. This tutorial assumes you are working on linux, use GIT for version control and are somewhat familiar with python. I’ve only recently started using python for scripting and I can say it’s very friendly for these kind of tasks. Also, I assume […]

Continue reading

Cleaning up your code: Find All Source Files with “TO-DO” comments in Linux Shell

Keeping track of your TO-DO‘s is not always easy! Especially if your using mostly plaintext editors for coding your scripts and programs. It’s a good habit to clean up your source code every once in a while and do what you intended with the TODO remark in the first place. Most modern IDE’s have this […]

Continue reading

Find all Executable Files in a Directory via Linux Shell

Today, we’ll show how to find files marked as executable (chmod +x) in a given directory of a linux system. Basic syntax find {directory} -type f -executable Common Examples Find all executables in current directory recursively: find . -type f -executable Find all executables in current directory while skipping subdirectories: find . -maxdepth 1 -type […]

Continue reading

Creating HTML Links with Page Titles using Raw URLs in Linux Shell

Given a plain text list of URLs (for example links in your history) you want to create a list of HTML links which have the same title as the page’s document title. Offcourse, you want to do it with a script! Example input: https://www.invision-web.net/ https://www.share-2-web.com/ Example output: <a target=”_blank” href=”https://www.invision-web.net/”>InVision-Web.net :: Top work at Web […]

Continue reading

Colored Text Output in Linux Shell and Bash Scripts

This script is used in a lot of other scripts I produce over time, and it’s very handy for generating colored text output in the terminal. Example of usage Here’s an example of using the colors.sh script: #!/bin/bash source colors.sh echo “${fg_yellow}Yellow ${fg_reset}Normal ${fg_green}Green {$fg_reset}”; Download You can view or download the script here: https://invision-web.net/web/sources/colors.sh […]

Continue reading

The GIT Cheat Sheat

In this article, I’ll be enlisting some of the most common git commands I use when working on software projects. # configure the environment and working user git config –global user.name “John Doe” git config –global user.email “john.doe@example.com” git config –global color.ui true # create the bare repository (for push/pull) repo=repository.git mkdir $repo && cd […]

Continue reading