How to resize images with the terminal using ImageMagick

Hi Folks,

In this post I cover how to resize images easily with the terminal using ImageMagick. We cover 2 scenarios. The first is if you want to maintain aspect ratio while the second is if you want the resulting image to have a specific width and height, regardless of aspect ratio.

Resizing Images while maintaining Aspect Ratio

You can use a command like

convert -resize 1024X768  source.png dest.jpg

 

Resizing Images without locking Aspect Ratio

The command is similar to the above except that you need to add !. Here is an example.

convert -resize 1024X768!  source.png dest.jpg

That’s all for now. Till next time, happy graphics manipulations.

Getting Dandy with DNF

Hi Folks,

In this post I’ll talk briefly about an interesting tool called DNF.

Recently I was trying to install dependencies in a Red Hat linux docker image and ran into issues using yum. After consulting with a very knowledgeable colleague, I learnt that I could resolve the problem by using DNF. I tried DNF and low and behold! the problem was solved. This got me curious about DNF.

So, what is DNF? DNF is an acronym for Dandified YUM. It is a command-line package manager for Red Hat-based linux distributions.

It was created to replace yum due to perceived deficiencies in yum, including poor performance, high memory usage and slowness in resolving dependencies. DNF has been the default package  manager since Fedora 22 in 2015 and Red Hat Enterprise Linux 8.

That’s all for now. Till next time, happy software development.

Sources

DNF (software). Wikipedia. https://en.wikipedia.org/wiki/DNF_(software)#cite_note-RHEL8news-12

Introduction to Inkscape

Hi Folks,

In this post I talk about an awesome application called Inkscape.

What’s Inkscape? Inkscape is a free and open-source software an application for creating vector graphics. Vector graphics are a form of computer graphics created directly from geometric shapes defined on a cartesian plane, e.g. points, lines, curves and polygons.

You can use Inkscape to create SVG files. SVG means Scalable Vector Graphics. It is an XML-based vector image format.  A major advantage of this format is that you can scale it as large as you want without it losing quality.

You can use Inkscape for creating logos, icons, cartoons, technical illustrations, flowcharts etc. It is very easy to use and robust.

If you’re new to Inkscape and would like to know how to use it, I recommend the amazing Inkscape tutorial called Inkscape Tutorial: Complete Starter Guide for New Users, by Logos By Nick.

Some tips with using Inkscape

How to scroll the screen in inkscape

hold down middle mouse button and move mouse around

How to zoom in and out in inkscape

hold down ctrl key, then zoom the mouse wheel in and out

How to zoom to 100% scale

press 1 on the keyboard

How to scale an object

click on select tool

click on the object. the scale icons will appear on the corners

drag a scale icon to scale the object

hold ctrl while dragging to maintain aspect ratio

to scale relative to the centre of the object, hold shift key as you drag the mouse

How to rotate an object

click on select tool

click the object twice. the rotation icons will appear on the object

drag a rotation icon to rotate the icon

How to change the axis of rotation of an object

by default the axis of rotation of a square is at its centre.

to change the axis, drag the axis icon to the desired location

to lock the axis of movement during the drag, hold ctrl key

to return the axis to its original default location, hold shift, then click the axis icon

How to duplicate an object

when dragging it, press Spacebar key

How to deselect all objects

click outside the objects, OR press Escape key

How to export your work

set format to inkscape svg

this will preserve everything needed to be able to reuse it again in inkscape

How to convert object to path

select object

click Path > Object to Path

How to align an object relative to another object

select the object
on menu click on Object > align and Distribute…  this will open the Align dockable menu

press shift then select any other objects involved

How to remove stroke from an object

from Fill and Stoke dockable menu, click Stroke Paint, then click x.

alternatively, hold shift, then click the X on bottom left of screen

That’s all for now. Till next time, happy graphics design.

 

Resources

Inkscape. Wikipedia. https://en.wikipedia.org/wiki/Inkscape

SVG. Wikipedia. https://en.wikipedia.org/wiki/SVG

Vector Graphics. https://en.wikipedia.org/wiki/Vector_graphics

Inkscape Tutorial: Complete Starter Guide for New Users. YouTube. https://www.youtube.com/watch?v=fzk-suGcqrc

How to reduce the space between bullet points and text in lists in MS Word

Hi Folks,

In this post we describe how to reduce the space between bullet points and text in lists in MS Word.

To do this:

  • Select the list
  • In Home toolbar click the line spacing icon
  • Click Line Spacing Options…  the paragraph dialogue will appear.
  • In the Indents and Spacing tab, under Indentation section, find the field called Special. make sure it’s set to hanging
  • Find the field By. set By to the amount of space you want.
  • Click OK when done.

That’s all for now. Till next time, happy writing.

How to apply left margin to a table in MS Word

Hi Folks,

In this post we cover how to apply a left margin to a table in MS Word.

How’s how to do it:

  1. Click the table to select it.
  2. Right-click and cilck Table Properties
  3. In the Table tab, find the field called Indent from Left:
  4. Set the value of the indent in cm and click OK

That’s it! Till next time happy document writing.

 

How to allow a table occupy the full height in MS Word

Hi Folks,

In this post I cover how to make a table take full height on a page in MS Word. When you try to make a table occupy the full height of the page, you may have set the table margins to 0 but still notice that there’s some left over bottom margin left before content spills over to the next page. Why is that bottom margin there and how do you get rid of that bottom margin?

The bottom margin is due to the line of text right after the table. To minimise this bottom margin, simply reduce the font size of the text on that line to the minimum (1 point).

That’s all for now. Till next time, happy document creation.

How to create full-width underline in MS Word

Hi Folks,

In this post I briefly cover how to create full-width underline in MS Word. Full width underline can give a very appealing effect especially right under the title at the top of a document. Here’s how to achieve it.

Just add a top or bottom border to some text.

To create double underline

  • Add some blank space on a line
  • Add a bottom border under this first line of text
  • Go to the next line
  • Add some spaces on the second line
  • Add a top border to the line.

You can adjust line spacing to adjust the vertical space between the double lines.

That’s all for now. Till next time, happy document creation.

References

1. Full-width horizontal line in Word ✅ 1 MINUTE. YouTube. https://www.youtube.com/watch?v=Xr4yYqSLK34.

How to convert MP4 video to MP3 audio using the terminal

Hi Folks,

In this post I cover how to convert a video file in MP4 format to an audio file with MP3 format using the terminal. You can do this by using a tool called FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. Here’s how to go about it on MacOS.

First, make sure you have FFmpeg installed.

Then, open your terminal

Run the folowing command:

ffmpeg -i your-file.mp4 your-file.mp3

That’s it. It will be converted quickly. That’s all for now.

 

Sources

1. How can I convert MP4 video to MP3 audio with FFmpeg? Super User. https://superuser.com/questions/332347/how-can-i-convert-mp4-video-to-mp3-audio-with-ffmpeg

How to make MS Excel calculate values of cells automatically

Hi Folks,

In this article, I’ll briefly touch on a handy feature in MS Excel. That is, how to make Excel calculate the values of cells using a given formula automatically. Why is this important? It is handly if you want to do things like calculating values in an entire area (group of rows and columns). This means, where you calculate the value of the top left cell using a formula, then simply drag your all the way to the bottom right cell in the tabular area and Excel will calculate all values in the region.

To allow Excel calculate values automatically you need to make sure the calculation mode is set to Automatic. To do this, click Formulas > Calculation Options. Then click Automatic.

That’s all for now. Till next time, happy data analysis.

 

How to stop presentation from automatically advancing in Microsoft PowerPoint

Hi Folks,

In this post I talk about how to prevent your Microsoft PowerPoint presenetation from advancing by itself when you’re making a presentation.

Why is this important? Well, sometimes you may be making a presentation with PowerPoint in presenting mode, and while you’re still talking about a given point, the presentation moves to the next section which you’re not ready to present yet. This could be distracting for your audience and disconcerting even for you the presenter. So here’s how to stop this annoying feature.

  • Click on Transation in the toolbar.
  • The on the right hand side of the toolbar, uncheck After.
  • Check On Mouse Click (if not alraedy checked).
  • Then click Apply to All.

That’s it. Your presentation should no longer advance by itself. It will only advance when you click the mouse.

That’s all for now. Till next time, happy presenting.