Lazy Git Shortcut

If you use git and are tired of typing git add . then git commit -a -m “your git message” then git push, add an alias function to your bash_profile to do it all in one quick command. The example below works on macOS but I would imagine it would work in Powershell in Windows. Save a few keystrokes with the shortcut!

function gcp() {
  git add .
  git commit -a -m "$*"
  git push

Then in your command line type: gcp fixed a bug

Compress and Upload Images using NativeScript

Over the past couple of weeks, I have been working on a new iOS and Android app using NativeScript. One of the requirements is to compress and upload images. I figured this would be pretty straightforward but couldn’t find any examples of how to accomplish image compression. After some trial and error, I came up with a simple solution that has worked well. Hopefully, this example will save you some time!

The key piece of code is imageSource.saveToFile which takes a third argument that is compressionValue. This allows you to compress the image to a value from 1-100. Check out the playground example below and feel free to ask any questions in the comments below.

var saved = imageSource.saveToFile(path, "jpg", compressionValue);


Playground Example

GitHub Repo


Fix Cabinet Doors that Overlap

Recently we had our kitchen cabinets painted and new hinges installed. Everything looked great but the cabinet doors overlapped slightly on the edge due to the new hinges and additional paint. We knew this would cause a lot of frustration and we had to find a way to fix it.

Most suggestions online were to sand or cut the edge of the cabinet door. I felt like this may work but could ruin the cabinet doors. Other solutions were for concealed hinges that had the ability to adjust the position of the doors. After some searching, I finally came across a video that had a simple solution to the problem. The magic tool was a dish towel wedged in between the doors to slightly bend the hinges into the correct position. It took about 5 minutes to fix all my cabinet doors. I love finding a simple solution to a problem!