Convert NEF to PNG Images
Refer: https://superuser.com/questions/577643/how-do-i-batch-convert-thousands-of-nefs-to-jpegs
Install Applications
sudo apt-get install netpbm dcraw
Convert One Image
dcraw -c -w input.NEF | pnmtopng > output.png
Run Application Against Multiple Files
for filename in *.NEF ; do dcraw -c -w "$filename" | pnmtopng > "$filename.png" ; done
Simple Knot – Taut Line Hitch
Refer: https://youtube.com/shorts/C_NW4atfc14?feature=share
Refer: https://www.netknots.com/rope_knots/tautline-hitch
Tautline Hitch Knot Tying Instructions
- Make a turn around a post or other object several feet from the free end.
- Coil the free end twice around the standing line working back toward the post.
- Make one additional coil around the standing line on the outside of the coils just made.
- Tighten the knot and slide it on the standing line to adjust tension.
Broken Icon on Ubuntu 22.04 with Parallels
The broken icon seems to be a symptom of Ubuntu and M1.
I just found that you can work around this issue by disabling Wayland in Ubuntu and use the standard Xorg server that was the default in versions prior to 22.04. There are full instructions here, but you can simply edit the file
sudo gedit /etc/gdm3/custom.conf
and uncomment the line
#WaylandEnable=false
After a restart the gear icon goes away, focus stays in the window you where using when switching desktops, and shared clipboard still works.
Split Multiple Lines (Sublime or Visual Studio Code)
The purpose is to select everything and then edit each line.
[Ctrl]+[a]
Visual Studio Code
[Shift]+[Alt]+{I]
Sublime
[Ctrl]+[Shift]+{L]
Sublime Repeat Macro
Refer: https://packagecontrol.io/packages/Repeat%20Macro
Sublime has a plug-in to repeat a macro a set number of times or to run it until the end of file.
Take a Full Screen Snapshot in Chrome
Refer: https://zapier.com/blog/full-page-screenshots-in-chrome/
[Ctrl]+{Shift}+[I]
[Ctrl]+{Shift}+[P]
Then search for fullscreen snapshot
Visual Studio Code – Delete Duplicate Blank Lines
Refer: https://stackoverflow.com/questions/50042278/visual-studio-code-remove-blank-lines-from-code
Use regular expressions to delete, double-blank lines. [Ctrl]+[H]
Replace this:
^$\n\n
With this:
\n
View Crontab Logs
Refer: https://askubuntu.com/questions/56683/where-is-the-cron-crontab-log
On a default installation the cron jobs get logged to
/var/log/syslog
You can see just cron jobs in that logfile by running
grep CRON /var/log/syslog
The above grep will return nohthing if your crontab has not been configured yet.
Debugging a Bash Script
Refer: https://tecadmin.net/tutorial/bash-scripting/bash-debugging/
Example – Enable Debug in Script
You can enable debug mode by adding set -xv option inside a shell script. This is useful to enable debugging for some part of the script.
#!/bin/bash
set -xv # this line will enable debug
cd /var/log/
for i in "*.log"; do
du -sh $i
done

