Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

Wednesday, May 25, 2022

Monday, May 24, 2021

An Infinite Onion

Sometimes it seems that there is an infinite onion of layers to explain about what the software systems do that I support. This last week, I didn't realize a function that it does. It reminded me of the phrase “turtles all the way down”. 

'"Turtles all the way down" is an expression of the problem of infinite regress. The saying alludes to the mythological idea of a World Turtle that supports a flat Earth on its back. It suggests that this turtle rests on the back of an even larger turtle, which itself is part of a column of increasingly large turtles that continues indefinitely.' (https://en.wikipedia.org/wiki/Turtles_all_the_way_down)




Tuesday, April 21, 2020

Setting Beyond Compare as the default diff tool in Sourcetree

When you right click on a file that has changed in the Unstaged file panel of Sourcetree, you have an "External Diff" option. This post indicates that Sourcetree uses "whatever you have configured in your .gitconfig already as your default diff tool"

You can set Beyond Compare as your default diff tool by following the instructions posted here.

Diff
At a Windows command prompt, enter the commands:
  git config --global diff.tool bc
  git config --global difftool.bc.path "c:/Program Files (x86)/Beyond Compare 4/bcomp.exe"

Note: For Git versions older than 2.2 (git --version) replace "bc" with "bc3" in the above instructions.

3-way Merge Pro only

At a Windows command prompt, enter the commands:
  git config --global merge.tool bc
  git config --global mergetool.bc.path "c:/Program Files (x86)/Beyond Compare 4/bcomp.exe"

Note: For Git versions older than 2.2.0 (git --version) replace "bc" with "bc3" in the above instructions.

Launching Diffs and Merges

File Diff:
  git difftool filename.ext
Folder Diff:
  git difftool --dir-diff
3-way Merge:
  git mergetool filename.txt

Advanced Settings

To disable the "Launch 'bc3' [Y/n]?" prompt, run the command:
  git config --global difftool.prompt false
Git's default settings retain merge files with *.orig extensions after a successful merge.  To disable this safety feature and automatically delete *.orig files after a merge, run the command:
  git config --global mergetool.keepBackup false

Running the following command will open your .gitconfig file in an editor.
git config --edit --global

You will be able to see what the command did to edit your .gitconfig file.


Wednesday, December 11, 2019

Saturday, October 14, 2017

How can I create images with transparent backgrounds?

I needed a simple image with a transparent background. I found this Stack Overflow post that worked well for me, "How can I create transparent images in MS Paint?"

Try Paint.NET for size. I tried GimpShop before, but did not like it. Paint.NET is to MS Paint what Notepad++ is to Notepad :)
To change an image to have a transparent background:
  1. Install Paint.NET
  2. Download AlphaMask plugin
  3. Extract AlphaMask.dll to \Paint.NET\Effects (note you will likely need to unblock the file)
  4. Open Paint.NET
  5. Open your file
  6. Copy the content you want to make have a transparent background (ctrl+a, ctrl+c to select all and copy)
  7. Effects Menu > Alpha Mask...
  8. check Invert Maskcheck Mix Alpha, leave checked Paste from Clipboard
  9. Click OK
  10. File Menu > Save as, save as type PNG (*.png)
  11. Defaults are fine, OK one last time
These are the steps I took to create a 16x16 sized icon.

I found a larger example with a white background.
I used snipping tool to get a semi-square size from it
I used this to convert it to a 16x16 ico file. http://image.convertstandard.com/ToICO16x16.aspx
I renamed it to a png. 
I used this stack overflow post and paint.NET to make the background transparent.

Wednesday, February 05, 2014