How to copy screenshot to clipboard in New Apple Mac OS

If you have upgraded your Apple Mac OS to 14.x.x, then you may find it strange that the screenshots are not copied into the clipboard. The screenshots taken are saved to Desktop by default. And also it appears on the bottom right corner for a few seconds so that you can click on that copy image. 

But that is annoying! You find it very inconvenient to click on multiple times to copy the screenshot you just took. 


However, there is a built-in option to copy the screenshot into the clipboard, so that you can paste it anywhere you want. 

To copy the screenshot into the clipboard press hold the Control key also along with COMMND and SHIFT. 

COMMAND + SHIFT + CONTROL + 3  To take a screenshot of the full screen and copy the screenshot into Clipboard. 

COMMAND + SHIFT + CONTROL + 4  To enable drag and drop then take a screenshot of the selected portion and copy the screenshot into Clipboard. 

   


Apple MacBook Notes strike through Menu option and Setting Keyboard shortcut.

Apple Notes is the probably most widely used App for taking notes on Apple MacBook or Apple Mac in general. In this tutorial, I will show you how to set a keyboard shortcut for Strike Through. 

Even the menu navigation is not easily accessible. You have to reach the 2nd  level of the menu item. And If you are coming from a Windows background, it will even be tricky to find the option in the menu. 

First of all the strike thought option is available Under Format -> Fonts. 

To make it handier, you can set a keyboard shortcut so that, if you are using Notes more often, then it will be very useful. 

Follow these steps to set a keyboard short to strike through in the Mac. It is limited to only the Notes App. 

Go to System Preferences, and select Keyboard. Then select Shortcuts Tab 


Then select App Shortcuts in the left-hand side pane. Then click on the '+' Icon at the bottom center of the menu. 



The new dialog appears. Select the below options. 

For APplication select Notes. As this keyboard shortcut is only applicable for Notes, select Notes. 
For the Menu title type Strikethrough.  This is important and it should match the menu command present in the Notes app. The string should match. 


Finally, select the shortcut command you want to use. Make sure this key combination is available not assigned to any other command. I have selected Shift + Command. + X. Since X kind of matches with the action phonetically and pictorially. It makes sense to use X with other key combinations for strike through


How to create a self signed SSL certificate and how to use it with your web Server.

SSL certificate is the foremost important aspect of any website. If your website is running without SSL, modern browsers will stop the users from entering the website. Of course, there are ways to bypass that, at your own risk. As long as your website has no commercial data exchange, sensitive user information, etc, you are still good to run a website without a proper SSL certificate. For example, a blog can run without an SSL. 

Note that Google AdSense accepts websites without SSL. 

But the topic of this post is about Self Signed SSL certificate. How to create one, how to use it, and where to use it. 

Let us see where to use it. For any website which is used for internal purposes, it's always a good idea to use Self Signed SSL, instead of paying for a real SSL certificate. Internal I mean, within a company, team, or for personal uses, for testing purposes, etc. 

Now, let us see how to create a self-signed SSL certificate. 

What you need

A Linux machine. 

OpenSSL utility 

Apache2 Web Server with a sample website. 


Let us start...

Install prereqs. 

You need to install the mod_ssl to enable httpd or Apache to work with SSL certificates.  I am using CentOS-based Linux, so I will use the yum package manager utility. 

Perform all the steps as a non-root user with sudo permission. 

sudo yum install mod_ssl


This should install the SSL module for the httpd services. Please note that in CentOS it is called httpd whereas in Ubuntu it is called as Apache2. 

The certificate and key will be created under the default location. 

sudo mkdir -p /etc/ssl/private

sudo mkdir -p /etc/ssl/certs


Create the certificate and the private key 

Use the below OpenSSL command to create both the certificate and private key. The one command does create both files. There is no additional step like creating CSR - Certificate Signing Request. Since this is a self-signed certificate, you are not going through the actual process of getting the certificate signed by the CA - Certification Authority. Examples of CA are, Symantec Inc, DigiCert, etc. 


sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/host2-selfsigned.key -out /etc/ssl/certs/host2-selfsigned.crt

This will go into an interactive screen. It will prompt various inputs. 

Refer to the below screenshot for the inputs I have provided. 


Please note that the CN - Common Name should match your domain, hostname, or IP address, as per your httpd settings for the website. In other words. I have used IP address here. 

If the command is successful, it exits from the OpenSSL interactive session. 

Now check the below locations for certificates. 

For SSL certificate check this location /etc/ssl/certs

For the private key check this location /etc/ssl/private

ls -ltr /etc/ssl/private/

-rw-r--r--. 1 root root 1704 Jun 12 17:09 host2-selfsigned.key


ls -ltr /etc/ssl/certs/


-rw-r--r--. 1 root root 1419 Jun 12 17:09 host2-selfsigned.crt


Configure the New SSL certificates in the Apache server 

Create a new config file under /etc/httpd/conf.d/ to configure the Virtual Host and SSL certificate details. 

I am creating the file with the IP address of my host. 

sudo vi /etc/httpd/conf.d/152.70.72.193.conf

<VirtualHost *:443>
ServerName 152.70.72.193
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/ssl/certs/host1-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/host1-selfsigned.key
</VirtualHost>


Now check the config files are valid by running 

sudo apachectl configtest

You should get Success OK status. This confirms that all your config files are correct. 

Now restart your httpd. 

sudo systemctl restart httpd.service

Now access the web application URL  https://152.70.72.193/  

If you are accessing the URL for the first time after the certificates are installed, then you will be warned by the browser. It clearly says the website uses an invalid certificate. 



Once you accept and click on the continue button, the page should load properly as shown below




Notice the HTTPS and exclamatory mark and it indicates that there is an SSL certificate but it is not trusted by the browser. 

If the site is taking longer and then times out, check if the HTTP version is working. If the HTTP version is working then you to check if the firewalls are disabled for HTTPS ports. 

sudo firewall-cmd --add-service=https

If the output of this command is "success" Then it was an issue with the firewall. Now the page should load. 

Inspect the certificate from the browser. 

Click on the lock icon on the address bar, it says the connection is not secure. Click on more information and it shows the details of the certificate. 


If you want to see the certificate, click on the view certificate.