The above commands strip extra data (called metadata–read more about photo meta data) The two commands are:ExifTool which is available for download via most package managers or here.Mogrify, which is part of the imagemagick library. You can read more about mogrify options here, and install imagemagick via your choice of package managers. Any digital photos,… Continue reading Removing Meta Data from Images; Achieve Higher Image Compression
Author: webadmin
Batch Reduce Image Size, in One Line Command
Having to batch reduce image sizes can be a pain, but below is the on line command to reduce JPEG image sizes: The above command searches recursively through directories for .jpg formatted files, using the find and mogrify commands. Adding -exec to the end of the find command passes and found item onto whatever command… Continue reading Batch Reduce Image Size, in One Line Command
Ubuntu/Debian Notification After Command Has Run
If you’re about to run a process that is going to take a considerable amount of time to execute, it is convenient to have that process run without your supervision. And having some type of notification as to when the process has finished executing… or throwing an error, is a big help. Luckily in Ubuntu,… Continue reading Ubuntu/Debian Notification After Command Has Run
WP CLI – Change Blog Domain
If you are changing the domain of a WordPress blog, for development purposes or just moving to a new domain, there is a simple way to achieve this using WP CLI (WordPress Command line Interface). Instead of having to rely on a database command to update all references of the WordPress domain name, there is… Continue reading WP CLI – Change Blog Domain
Git; Get All Branches Last Commit Date and Time
for k in `git branch | perl -pe s/^..//`; do echo -e `git show –pretty=format:”%Cgreen%ci %Cblue%cr%Creset” $k — | head -n 1`\\t$k; done | sort -r The set of piped commands above produces easy-to-read output of all your repo’s branch names and their last commit dates. Below is an explanation of the commands: for k… Continue reading Git; Get All Branches Last Commit Date and Time
Count IP Occurrences in Apache / Nginx Logs
This command will parse an Apache or Nginx log file and print-out the 50 highest occurring IP’s, along with the number of occurrences, to the shell prompt. machine:~ User$ cat access.log | awk ‘{print $1}’ | sort -n | uniq -c | sort -nr | head -50 cat – reads the file access.log – is… Continue reading Count IP Occurrences in Apache / Nginx Logs
Bootstrap v4, hidden-*, visible-* replacements
Bootstrap v4 has replaced the following classes: hidden-sm-down, hidden-md-down, hidden-lg-down, hidden-xl-down, hidden-xs-up, hidden-sm-up, hidden-md-up, hidden-lg-up, hidden-xl-up, hidden-xs, hidden-sm, hidden-md, hidden-lg, hidden-xl, visible-xs, visible-sm, visible-md, visible-lg, visible-xl Below is an example of what classes you now need to have in order to reproduce the same effect as the above removed classes. There is also an extension… Continue reading Bootstrap v4, hidden-*, visible-* replacements
Git Submodule Work-Tree Hook on Push to Compile Sass
Working on a WordPress Theme, but inside of another repo. Best option I thought of was using a submodule. I also need that theme to pull WordPress Customizer Color Values, but the theme is using Sass, so there has to be some type of Sass compiler on the server. So using Git’s work-tree set-up, I… Continue reading Git Submodule Work-Tree Hook on Push to Compile Sass
GIT Using SSH to Push Remote to Server
On the server terminal, type: git remote add origin ssh://user@domain.com:22/home/user/remote.git The name of your remote repo will be ‘origin’. ‘user’ is your user name, ‘domian.com’ is your domain or IP address. ‘:22’ is the port number used to connect to your ssh server. ‘/home/user/remote.git’ is the location of your remote git repo. Before you push… Continue reading GIT Using SSH to Push Remote to Server
WordPress: change all url/websites address in posts
The SQL statement to change all references of a string in WordPress posts is: UPDATE wp_posts SET post_content = REPLACE(post_content, ‘staging.server.com’, ‘www.productionserver.com’);