As we stand on the threshold of a new year, it’s time to pause and reflect. We’ve embraced “read-only Fridays,” creating space for uninterrupted weekends. We’ve recognized that the battle with printers is ongoing – not every desk demands a color laser guardian.

Our vigilance against digital malevolence has only sharpened; we’ve learned to question the legitimacy of every unsolicited email. We’ve sought to perfect our scripts, dreaming of a future where automation is not just a promise, but a reality.

And yes, we look towards the horizon with a universal hope – for more. More efficiency, more security, more growth, and indeed, more financial reward.

Here’s to a new year brimming with potential. To prosperity, to innovation, to resilience. May we all find success in our endeavors. Happy New Year!

 

Streamline Your MacBook’s Power Management with a Bash Script

Managing power settings on a MacBook can often feel cumbersome, especially for those who frequently switch between power sources. Recognizing the need for a more efficient method, I developed a Bash script to simplify the process, enabling quick toggling between “Normal” and “Never Sleep” modes depending on your current needs.

This script leverages the pmset command, a robust macOS tool for adjusting power settings. With it, you can effortlessly switch power schemes—saving time and avoiding manual adjustments through System Preferences.

One caveat is the necessity for administrative rights to execute the script, as it modifies system-wide settings. Thus, running it with sudo is essential for applying the changes successfully.

Despite this requirement, the script offers a convenient solution for managing your MacBook’s energy use, proving invaluable in various scenarios, such as prolonged work sessions or when ensuring uninterrupted downloads.

I’ve found this script to significantly enhance my workflow, offering a blend of convenience and flexibility previously unattainable with default power management options. I highly recommend trying it to see the difference it can make. Feedback and suggestions are always welcome for further refinements!

Here’s the script for those interested:

#!/bin/bash

###########################
# MacBook Power Management Script
#
# Simplifies toggling between power settings.
#
# Usage:
#   sudo bash script-name.sh
#
###########################

echo "Power Management Options"
echo "1. Normal"
echo "2. Never"
echo "3. Quit"
echo -n "Select an option: "
read option

case $option in
    1) 
        # Normal settings
        pmset -b displaysleep 2 # Battery: Display off after 2 mins
        pmset -c displaysleep 10 # Charger: Display off after 10 mins
        pmset -a sleep 20 # Both: Sleep after 20 mins
        ;;
    2) 
        # Never settings
        pmset -a displaysleep 0 # Display never sleeps
        pmset -a sleep 0 # System never sleeps
        ;;
    3) 
        # Quit
        exit
        ;;
    *)
        echo "Invalid option"
        ;;
esac

 

Elevate Your Flight Sim Experience

Quick Access to Real-World Airport Data with AppleScript

Welcome, flight sim enthusiasts! If you’re a fan of immersive flying experiences in games like Microsoft Flight Simulator 2020 or X-Plane, you know how crucial accurate airport information can be to enhance your virtual flights. Today, I’m thrilled to share a simple yet effective AppleScript that can elevate your flight simulation experience. This script enables you to quickly pull up detailed airport information from FlightAware just by entering an ICAO airport code. Ideal for virtual pilots who want to plan realistic routes or explore new airports in their simulator, this easy-to-use tool seamlessly integrates real-world aviation data into your flight sim setup. Join me as we dive into how you can create this handy script on your Mac, blending the lines between simulation and reality for a more enriched flying experience.

-- Start of the script
tell application "System Events"
    -- Prompt the user to enter the airport code in ICAO format
    display dialog "Enter the Airport code in ICAO format (e.g., KLAX, KJFK):" default answer "" buttons {"Cancel", "OK"} default button "OK" with icon note
    -- Store the user input in a variable
    set airportCode to text returned of result
    -- Check if the user entered a code
    if airportCode is equal to "" then
        display dialog "No airport code was entered. Please try again." buttons {"OK"} default button "OK" with icon stop
        return
    end if
end tell

-- Construct the URL using the provided airport code
set baseURL to "https://www.flightaware.com/resources/airport/"
set fullURL to baseURL & airportCode & "/IAP/all/pdf"

-- Open the URL in Google Chrome
tell application "Google Chrome"
    -- Check if Chrome is running, and start it if not
    if not (exists window 1) then reopen
    activate
    -- Open a new tab with the URL
    open location fullURL
end tell
-- End of the script

After copying the AppleScript above, open the Script Editor on your Mac, which you can find in the /Applications/Utilities folder. Paste the script into a new document. You can run the script directly from the Script Editor to test its functionality. Once you’re satisfied with how it works, you can easily convert it into a standalone application. To do this, go to the File menu in Script Editor and select ‘Save.’ In the dialog box that appears, choose a name for your application, and importantly, set the File Format to ‘Application.’ Save it to your desired location. Now, you have a fully functional app that you can launch with a click! This app will prompt you for an ICAO airport code and automatically open the corresponding FlightAware page in your browser. It’s a handy tool for flight sim enthusiasts, pilots, or anyone interested in aviation, and a great example of the practical uses of AppleScript on your Mac.

In conclusion, this simple yet powerful AppleScript is more than just a quick way to access airport codes and charts; it’s a bridge between the real world of aviation and the virtual skies of flight simulation games. By seamlessly integrating real-world airport data into your flight sim experience, you’re not only enhancing the realism of your virtual flights but also gaining valuable insights into the intricacies of airport layouts and operations. Whether you’re meticulously planning a virtual flight in Microsoft Flight Simulator 2020, exploring new destinations in X-Plane, or just curious about aviation, this tool brings a wealth of real-time information to your fingertips. It exemplifies how a small script can significantly enrich your gaming experience, making every takeoff and landing more authentic and informed.

My Experience With the MacBook Air M2 and the Magic of the Apple Ecosystem

Just a few weeks ago, I took the leap and invested in the new MacBook Air M2, and since then, I’ve been in a whirl of excitement exploring its features, functionalities, and, most importantly, how it fits into my existing collection of Apple devices.

Why I Chose the MacBook Air M2

Before purchasing, I researched extensively, comparing the MacBook Air M2 to other laptops in its range and even other Mac models. However, it was the combination of its lightweight design, the promise of powerful performance thanks to the M2 chip, and the compatibility with the Apple ecosystem that finally tipped the scales for me.

Now that I’ve had a chance to use it, I can confirm that it didn’t disappoint.

Unboxing and First Impressions

Unboxing a new gadget, especially an Apple product, is an experience in itself. The MacBook Air M2, with its sleek design and the inviting glow of the Apple logo, was a sight to behold. I could feel the power and possibilities waiting for me.

The laptop booted up quickly, the Retina Display living up to its promise of delivering vibrant colors, and the backlit Magic Keyboard was as comfortable as I had heard. But the best was yet to come.

Discovering the Magic of the Apple Ecosystem

What truly struck me about my new MacBook Air M2 was how seamlessly it integrated into my existing lineup of Apple devices. As a long-time user of Apple products, including an iPhone and iPad, I knew about the Apple ecosystem’s interconnectivity. However, experiencing it firsthand on a new device took my appreciation to a whole new level.

Continuity: A Seamless Experience

With Continuity, I could effortlessly switch between devices without interrupting my workflow. It was as if all my devices had synchronized into a single entity. A document started on my iPhone could be continued on my MacBook Air, and then finalized on my iPad, all without the need for manual transfers or saving multiple versions.

AirDrop: Simplifying File Transfers

Remember the days when transferring files between devices was a time-consuming process involving cables, Bluetooth pairing, or even email? With AirDrop, those days are firmly behind me. Sharing files, be it documents, images, or videos, between my Apple devices has become a matter of a few clicks.

Cloud: My Personal and Secure Cloud Storage

The cherry on top of my Apple ecosystem experience is iCloud. With iCloud, all my files, photos, and documents are synced across my devices, ensuring they’re up-to-date and accessible anytime, anywhere.

The Verdict

The MacBook Air M2 has proven to be more than just a laptop. It’s a key component of a connected, streamlined digital lifestyle, backed by the power of the Apple ecosystem. It has not only lived up to my expectations but, in many ways, exceeded them.

If you, like me, value seamless integration and synchronization across devices, and you’re considering investing in a new laptop, I highly recommend the MacBook Air M2. It’s a decision I’m glad I made, and I believe you will be, too.

Stay tuned for more updates as I continue my journey with the MacBook Air M2 and the Apple ecosystem. There’s still so much to explore, and I can’t wait to share more insights with you.

Understanding the VA Claims Process: A Guide for Veterans

Introduction:

Navigating the Department of Veterans Affairs (VA) disability claims process can seem overwhelming. This guide demystifies key aspects such as 38 CFR Part 4, the use of Disability Benefits Questionnaires (DBQs), and the benefits of consulting with a non-VA doctor for a Fully Developed Claim. Empowering yourself with this knowledge can significantly impact the outcome of your claim.

Understanding 38 CFR Part 4:

38 CFR Part 4 is pivotal in the VA’s evaluation of service-connected disabilities, setting forth criteria to determine compensation levels. Familiarity with these guidelines is essential for veterans to ensure their claims accurately reflect the severity of their disabilities, potentially leading to more appropriate compensation.

The Role of DBQs:

Disability Benefits Questionnaires (DBQs) are invaluable in the claims process, providing a standardized way to present medical evidence. These forms streamline the evaluation process by:

  • Standardizing communication between healthcare providers and the VA.
  • Ensuring a thorough review by presenting relevant medical details.
  • Potentially expediting the claims process by reducing the need for further examinations.
Using a Non-VA Doctor for a Fully Developed Claim:

Opting for a non-VA doctor can enhance the evidence supporting your claim through:

  • Long-term familiarity with your medical history.
  • An unbiased perspective on your condition.
  • More timely evidence collection due to flexible scheduling.

Ensure the non-VA doctor completes the necessary DBQs with a comprehensive medical rationale to support your claim effectively.

Conclusion:

The VA disability claims process, while complex, can be navigated successfully with the right information and preparation. Understanding the significance of 38 CFR Part 4, leveraging DBQs, and considering the input of a non-VA doctor are strategies that can streamline your claim, enhance its accuracy, and potentially lead to a quicker resolution. With these insights, veterans can approach the claims process more confidently and secure the benefits they rightfully deserve.

Converting a magnet link


If you’re using Ubuntu Linux, you can easily convert a torrent magnet link to a torrent file using a simple bash script. This is useful if you want to download a torrent file without having to open a web browser, or in my case, I use rTorrent which is a CLI torrent client for Linux.

To create the script, open a terminal window and type the following command:

nano magnet2torrent.sh

This will create a new file called magnet2torrent.sh. Open the file and paste the following code:


#!/bin/bash

#################################
#                               #
# Bash script to convert a      #
# magnet link to a torrent file #
#                               #
#  StrickStuff.com              #
#                               #
#################################


# Check that the user entered a valid magnet link
if [ "$#" -ne 1 ] || [ ! -z "${1##*magnet*}" ]; then
    echo "Usage: $0 "
    exit 1
fi

# Extract the info hash from the magnet link
hash="${1##*btih:}"
hash="${hash%%&*}"

# Download the torrent file from a torrent website
torrent_file="${hash}.torrent"
wget "https://itorrents.org/torrent/${hash}.torrent" -O "$torrent_file"

echo "Torrent file written to ${torrent_file}"

Save the file and exit the editor. To make the script executable, type the following command:

chmod +x magnet2torrent

Now you can use the script to convert a torrent magnet link to a torrent file. To do this, type the following command:

./magnet2torrent<magnet_link>

For example, to convert the magnet link magnet:?xt=urn:btih:0123456789ABCDEF to a torrent file, you would type the following command:

./magnet2torrent magnet:?xt=urn:btih:0123456789ABCDEF

The script will create a new torrent file called 0123456789ABCDEF.torrent in the current directory. You can then open the torrent file in a torrent client to download the files.

This is just a simple example of how you can use a bash script to convert a torrent magnet link to a torrent file. You can customize the script to meet your own needs. For example, you could add code to check if the torrent file already exists before creating it. You could also add code to extract the metadata from the torrent file and write it to a text file.

bash script to convert magnet links to torrent file

bash script to convert magnet links to torrent file

Artificial intelligence (AI) is already being used to create more sophisticated phishing emails. In the future, AI is likely to play an even greater role in phishing attacks, making them more difficult to detect and defend against.

One way that AI is being used in phishing attacks is to create more realistic and convincing emails. AI-generated emails can be tailored to specific individuals or organizations, making them more likely to be opened and clicked on. In addition, AI can be used to create emails that appear to come from legitimate senders, such as banks or government agencies.

Another way that AI is being used in phishing attacks is to automate the process of sending phishing emails. This allows cybercriminals to send out large volumes of phishing emails, increasing the chances that someone will fall victim to the attack. AI can also be used to target specific individuals or organizations with phishing emails, based on their online activity or other data.

AI is also being used to develop new types of phishing attacks. For example, AI can be used to create phishing emails that contain malicious attachments or links. These attachments or links can then be used to install malware on victims’ computers or steal their personal information.

In the future, AI is likely to play an even greater role in phishing attacks. As AI technology continues to develop, cybercriminals will be able to create even more sophisticated and effective phishing attacks. This is why it is important to be aware of the risks of phishing and to take steps to protect yourself from these attacks.

Here are some tips to help you protect yourself from phishing attacks:

  • Be suspicious of any email that asks for personal information, such as your password or credit card number.
  • Do not click on links or open attachments from emails that you do not recognize.
  • Use strong passwords and change them regularly.
  • Keep your software up to date with the latest security patches.
  • Use a firewall and antivirus software.
  • Be aware of the latest phishing scams and how to identify them.

If you think you may have been the victim of a phishing attack, it is important to take action immediately. Change your passwords, contact your bank or credit card company, and report the incident to the authorities.

Phishing attacks are a serious threat, but there are steps you can take to protect yourself. By being aware of the risks and taking steps to protect your information, you can help to keep yourself safe from these attacks.

 

C++ Switch Case Statement Program Page 188 number 7

/****JDS***********************
DATE      : 3/15/2022  
CREATED BY: James Strickland
CLASS     : IT-301 - Intro to Programming 
PURPOSE   : Switch Statement, employee 
            program. 

****JDS***********************/

#include 
#include 
#include 
#include 
using namespace std;

int main() {

    char department;
    double salary = 0.0;
    double raise_amount = 0.0;

    do { // start a do - while loop

        // "start" screen, menu
        cout << " +--+--+--+--+--+--+--+--+--+--+" << endl;
        cout << " |D|e|p|a|r|t|m|e|n|t|" << endl;
        cout << " +--+--+--+--+--+--+--+--+--+--+" << endl << endl;

        cout << "       Departments list" << endl;
        cout << "\t Department A" << endl;
        cout << "\t Department B" << endl;
        cout << "\t Department C" << endl;
        cout << "\t Department D" << endl;
        cout << "Please enter Deptartment A, B, C, D [Q to quit]: "; cin >> department; // get user input

        switch (department) { // begin switch statement

        case 'a': case 'A':
        case 'b': case 'B':

            cout << "Enter salary of the employee: "; cin >> salary;
            raise_amount = (salary * 0.02);
            cout << "Raise amount: ";
            cout << setprecision(2) << fixed << raise_amount << endl;
            system("pause");
            cout << "\033[2J\033[1;1H";
            break;

        case 'c': case 'C':

            cout << "Enter salary of the employee: "; cin >> salary;
            raise_amount = (salary * 0.15);
            cout << "Raise amount: ";
            cout << setprecision(2) << fixed << raise_amount << endl;
            system("pause");
            cout << "\033[2J\033[1;1H";
            break;

        case 'd': case 'D':

            cout << "Enter salary of the employee: "; cin >> salary;
            raise_amount = (salary * 0.03);
            cout << "Raise amount: ";
            cout << setprecision(2) << fixed << raise_amount << endl;
            system("pause");
            cout << "\033[2J\033[1;1H";
            break;

        default:

            cout << "Invalid Selection. " << endl;
            cout << "\033[2J\033[1;1H";
            break;

        } // end switch statement
    } while (!((department == 'Q') || (department == 'q'))); // last of the do-while loop. Q or q break from loop.

    system("pause");
    return 0;
} // main bracket


Turkey Brine Recipe

Turkey Brine Recipe
Prep Time1 day
Cook Time25 minutes
Course: Main Course
Cuisine: American
Keyword: brine, christmas, dinner, thanksgiving, turkey
Servings: 6 people
Author: Dan

Ingredients

  • 1/2 gal Water For concentrated brine
  • 1 cup Salt
  • 1 cup Brown Sugar
  • 5 cloves Garlic
  • 1 tbsp Black Pepper
  • 1 tbsp Cloves
  • 1 tbps Green Cardamon
  • 1 tbsp Allspice
  • 1 Whole Onion Roughly chopped
  • Fresh Rosemary
  • Fresh Thyme
  • Fresh Parsley

Instructions

  • Let boil for a couple minutes, then kill heat. Let sit overnight. Pour hot brine in a container, add ice to cool down letting ice melt. Then add Turkey. Let sit overnight... 12-15 hours.
  • source: https://www.youtube.com/watch?v=yGc68dldZwU&ab_channel=QVCOriginals

Notes

source: https://www.youtube.com/watch?v=yGc68dldZwU&ab_channel=QVCOriginals
Â