Quick Tip – Clearing Cache/Cookies for a Specific Website in Chrome Instead of Getting Logged Out of Everything

It’s 2021 – literally everything is a web app now.

“Did you clear your cookies and cache for your web browser?” – It used to be the favorite thing IT Helpdesk said when we had users call in.

Nowadays if you’re like me, you avoid this like the plague because it means you have to log back into all 50 of your corporate applications that are spread out across different URLs if you clear the browser cache.

Today I took some time to research how to do this in a targeted “single website” fashion because I had a rogue cache that was preventing my access to a documentation site on an internal network.

Manual Steps:

  1. Click the three dots on the top right of your Chrome Web Browser and Click “Settings”
  2. Left hand toolbar – click “Privacy and Security”
  3. Middle section – click “Cookies and other site data”
  4. Scroll down – click “See all cookies and site data”
  5. Middle Top there’s a search box called “Search Cookies” – type your domain
    • Example – “google.com”
  6. Click the Trash Can on the sites that you want to reset the cache/cookies on
  7. You’re done! Next time you navigate to this site it’ll be a completely fresh session and require relogin or etc.

Advanced Steps:

  1. Create a bookmark on your toolbar for the following URL:
    • chrome://settings/siteData
  2. Click this bookmark anytime you want to get to this – is a bypass for steps 1-4
  3. Middle Top there’s a search box called “Search Cookies” – type your domain
    • Example – “google.com”
  4. Click the Trash Can on the sites that you want to reset the cache/cookies on
  5. You’re done! Next time you navigate to this site it’ll be a completely fresh session and require relogin or etc.

Thoughts on Recent LastPass Changes with the Free Tier from a Biased Tech Geek

Starting today LastPass will be charging 3 dollars per month for usage across multiple devices.

Personally, I still stand behind how secure, reliable, and versatile their service is and am going to begin paying for their product for our household.

I’ve used the service for a long time now and think it’s a no brainer to continue using them thanks to the great sense of security and organization it has brought my family.

Regarding Recent Bad Press, Competitors, and Track Records

A lot of formidable competitors are popping up on the market as a mass exodus of users are looking for other options. In my opinion, this is attributed to many recent misleading tech articles coming out around tracking and general disgruntled users who don’t believe in paying for services that they receive which is extremely unfortunate.

With surface level reading I’ve done on some of these companies a few of them seem to be flashy startup companies attempting to cash in or companies that in my opinion don’t have enough of a history yet to completely earn my trust due to their lacking historical track record.

To elaborate, what I mean to say is for me personally, these companies haven’t been around long enough to prove that they aren’t going anywhere in a year or two due to bankruptcy and/or dropping support for their products (password managers) or as some of us call it pulling a Google and adding it to the Google Graveyard.

It sounds awfully cliché to say it in this day and age considering everyone’s hate for corporations, but LastPass the product/service has a giant corporate backing from LogMeIn who has been in business for well over 18 years – to me this establishes trust that this application isn’t going anywhere anytime soon – which is something I need in my family as I don’t intend to jump between password managers every year each time a new flashy option comes along.

Regarding Security

For those that bring up the concerns of security – I highly encourage you to subscribe to the train of thought that it is extremely damaging to LogMeIn Corporate for anything security wise to happen with something as serious as a password manager so it’s in their best interest to continually keep this product secure and up to date especially with our current fragile cybersecurity climate.

Regarding Pricing

For those that bring up the concern of having to pay for a service – LogMeIn/LastPass has kept the free tier for 5+ years and it was only a matter of time before things had to change, it’s honestly insane that it was free for as long as it was. If you can’t swing 3 dollars a month due to financial hardships – I completely respect that and maybe the alternative options on the market are for you – but otherwise 3 dollars a month is a small price to pay for an extremely well managed application/service.

Conclusion

In conclusion, if you are thinking about other options, I still think you should highly consider continuing usage of LastPass regardless of the new pricing structure for these reasons – but then again this is only my personal extremely biased tech geek hail corporate opinion. 🙂

Linux Bash – Yum – Installing a Specific Version of a Package or Application

Note to self – never update Visual Studio Code on Linux – aka today was FUN.

I found out via a vague GitHub Issue that Microsoft’s latest versions of VSCode are built using some higher version of “libstdc++” and “CXXABI_1.3.9” that most if not all currently existing versions of Linux are currently not compatible with.

The error in question:

The terminal process failed to launch: A native exception occurred during launch (/lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/share/code/resources/app/node_modules.asar.unpacked/node-pty/build/Release/pty.node)).

In this below GitHub thread there is a long list of angry developers since 02/04/2021 including an IT representative that works on a Navy Ship that are all just absolutely pissed off – it’s a fun read.

https://github.com/microsoft/vscode/issues/115784

So as a result of this fun exploratory task I had to find a way to revert VSCode to an older – working version that is compatible with my distro.

Here are the steps I took – credit to the Navy IT Tech who goes by “appurist” on this GitHub thread – I used part of his solution and found other solutions to pair together to find the ideal version numbers for my Linux Distro.

  1. Open Terminal
  2. Type the following command:
    • yum list –showduplicates | grep code.x86
  3. This will bring back a list of versions for your desired application that you want to downgrade
  4. Copy your desired version string and create the package name as follows:
    • Structure Example:
      • Package Name
      • Hyphen –
      • Version String
    • Actual Example
      • code-1.52.1-1608137084.el7
  5. Either of the two following command styles:
    • Uninstall Application – Reinstall Application
      • yum -y remove code
      • yum -y install code-1.52.1-1608137084.el7
    • Downgrade Application and Version Lock to prevent updates
      • yum downgrade code-1.52.1-1608137084.el7
      • yum install yum-plugin-versionlock
      • yum versionlock code

Outlook Quick Tip – Getting Caught Up on Emails Received Between a Specific Timeframe

A few weeks ago Robyn and I welcomed our son Mason into the world. We are truly blessed to have this little dude.

As a result, you go on Paternity Leave and put your work life on hold, as you should. 🙂

However, when you get back now there is a mountain of emails to sort through, so today I’m sharing a handy tip I used to sort through all these communications.

Giving credit where credit is due, I found this nice tip on the following website:

https://smallbusiness.chron.com/emails-between-certain-dates-outlook-79638.html

Steps for Usage:

  1. Open Outlook on Windows 10 or Mac OS
  2. Highlight your inbox
  3. Use the following template and swap date values to when OOO started and ended
    • received:>=02/17/2021 AND received:<=03/13/2021
  4. Scroll all the way to the bottom of the email list and work your way up to the top reading and/or replying to emails

Debugging what Event is Preventing a Computer from going to Sleep

The saga continues…

On a previous blog post I detailed my attempts to debug Windows 10 and it’s constant issues keeping a computer from being able to sleep peacefully.

Well, I encountered a new issue and I’m about ready to set Microsoft on fire for their lack of QA Testing.

Here are a list of optimal steps I took to find the culprit:

  1. Open a Command Prompt as Administrator
  2. Type powercfg -requests
  3. Look for offending processes and start googling steps to mitigate based off the *.exe name

Well it turned out this time it was a core Windows process that was causing the issue and it seemed that many many many people have reported this since July 2020, see below identifier message.

EXECUTION:
[PROCESS] \Device\HarddiskVolume2\Windows\System32\MoUsoCoreWorker.exe
USO Worker

I didn’t believe in blindly disabling the “Update Orchestrator” as some people suggested – instead I opted to search for what was actually causing the issue and happened upon this solution from /u/MsWolf88 on the below Reddit post.

So here are the steps I took as a result of /u/MsWolf88’s information:

  1. Fresh reboot of Windows 10 computer
  2. In the Start Menu type “Check for Updates” and open it
  3. Check for any outstanding updates and install them – not necessarily the optional updates.
    • If reboots are required as a result of this step do as the prompts say and resume on the next step after all pending updates are satisfied
  4. Close all windows and applications that may be open – specifically the Windows Update window if still open
  5. In the Start Menu type “Services” and open it
  6. Find “Windows Update” in the menu that comes up – right click it and click restart
  7. In the Start Menu type “Check for Updates” and open it
  8. Check for any outstanding updates and install them – not necessarily the optional updates.
    • If reboots are required as a result of this step do as the prompts say and resume on the next step after all pending updates are satisfied

In my case it turned out that their was a hung update that required a restart of the “Windows Update” service but wouldn’t show it was pending despite many reboots (I shut my computer down manually daily) and after triggering the forceful restart of “Windows Update” service it showed the offending update that needed to be applied.

Now, my computer goes to sleep after one minute as God Microsoft Bill Gates intended and no longer has Insomnia until I find the next stupid QA Issue that Microsoft missed.

Simple Log File Handler in Python

For the next time I need to use this…

import logging
import sys

def setup_custom_logger(name):
    formatter = logging.Formatter(fmt='%(asctime)s %(levelname)-8s %(message)s',
                                  datefmt='%Y-%m-%d %H:%M:%S')
    handler = logging.FileHandler('log.txt', mode='w')
    handler.setFormatter(formatter)
    screen_handler = logging.StreamHandler(stream=sys.stdout)
    screen_handler.setFormatter(formatter)
    logger = logging.getLogger(name)
    logger.setLevel(logging.DEBUG)
    logger.addHandler(handler)
    logger.addHandler(screen_handler)
    return logger

>>> logger = setup_custom_logger('myapp')
>>> logger.info('This is a message!')
2015-02-04 15:07:12 INFO     This is a message!
>>> logger.error('Here is another')
2015-02-04 15:07:30 ERROR    Here is another

Credit to paidhima on the below Stack Overflow answer:

Simple Example for Multithreading in Python

Had a need today to create a multithreaded for loop that calls a specific function – trying to speed up a program I wrote as it’s way too slow in a single threaded context but not spin off so many threads that it crashes the computer.

Not enough simple examples for this online – when I did this in C#, I could always find a result within 10 min on Google.

Here’s this for anyone in the future – picture and code below:

from concurrent.futures import ThreadPoolExecutor

#If wanting to not have python take the computer over and slow it down to a crawl
#executor = ThreadPoolExecutor(max_workers=2)
    
#If max_workers is None or not given, it will default to the number of processors on the machine, multiplied by 5, assuming that ThreadPoolExecutor is often used to overlap I/O instead of CPU work and the number of workers should be higher than the number of workers for ProcessPoolExecutor.
executor = ThreadPoolExecutor()

futures = []

path = './test_multi.log'

def testFunction(param1):
    import time
    time.sleep(1)
    with open(path, 'a') as the_file:
        the_file.write("hithere" + param1 + '\n')

items = []

for i in range(1000):
    items.append(str("test " + str(i)))

for item in items:
    a = executor.submit(testFunction, item)
    futures.append(a)

#Wait for all the jobs to finish before moving on
executor.shutdown(wait=True)

#Loop futures to see any failures - only hits exception block if failure detected
for future in futures:
    try:
        future.result()
    except Exception as e:
        print("Detected failed task in threadpool - " + str(e))
        import traceback
        print(traceback.format_exc())

Using Wake on LAN With Google Wifi

Taking the time to write this one up for some other poor soul like me in the future who couldn’t find adequate answers.

Long story short – yes – “Wake on LAN” does work with Google Wifi.

Here are some steps:

  1. Know your IPv4 external address and/or bind it to a Dynamic DNS Service like No-Ip or DuckDNS
    • It is very common for an ISP to just flat give you a new IP address – you have to know this address and understand that if your IPv4 address changes you cannot do a damn thing about it other than mitigate ahead of time
    • We as residential customers have little to no guarantee on our parameters with bandwidth or otherwise – because we’re residential
  2. Have Wake on LAN up and working in a Local IPv4 context first
    • Aka connected to home wifi network – issue the “Magic Packet” – AT HOME
    • If you can’t get it working using your 192.168.* version of your IP while you’re sitting at home – you absolutely have to figure that out first – so stop reading and go figure that out before attempting an external context
  3. Set the following parameters on the Google Wifi Android or iPhone Application:
    • Google Wifi App -> Network & General -> Advanced Networking -> DHCP IP reservations -> Plus Button -> Choose Computer -> Leave Number Default -> Next -> Done
      • Change default if you want but unless you are truly looking for more debug and/or actually require a custom IP number – just leave it alone – no one cares about your fancy 3 digit number other than you – no one will see it – just leave it default
    • Google Wifi App -> Network & General -> Advanced Networking -> Port Management -> Plus Button -> Choose Computer – Use below settings and hit Done
      • Internal Port – 7
      • External Port – 1337
      • Remarks:
        • Internal Port – 7 is default what your computer will listen on locally and/or 9 – but 7 is what my computer responds on
        • External Port – Goal is to choose literally any number other than that is a valid port number – some notes I saw online suggested that our ISP’s have potentially gotten in the habit of straight up blocking these before they even reach the modem – so usage of a nonstandard port fixes this issue
  4. For your test case – I highly suggest starting with the physical numeric IPv4 address before attempting to use any Dynamic DNS solution – just so you know it works bare minumum and can rule out any other variables
  5. Connected to your Home Wifi – go google “what is my current ip address ipv4”
    • Write that down or screenshot it
  6. Disconnected from Home Wifi – Download a Wake on LAN application on your phone and do the below settings based off previous data in this guide
    • I used the app “Wake on LAN” on Android
    • IP/Hostname/Etc – input data from Step 5
    • Port – 1337 (or whatever you customized it to – remember my note around blockage and usage of nonstandard ports)
    • Send WOL packet – should work assuming you followed guidance on Step 2 – if you can’t get Wake On Lan working on your home network first you’re only wasting your own time by adding extra debug steps

Let me know in the comments down below your experience – despite Google Support stating that WOL isn’t supported in a few searches I saw – worked just fine for me.

Debugging what event woke a sleeping Windows Computer

I’m on a mission right now to keep my system OFF as much as possible after the recent failure of my GTX 980.

The Great GPU Shortage of 2020/2021 is no joke – I finally found a GTX 3070 and I intend to keep this card running for years to come. Hindsight though – 7 years from a electrical component is extremely impressive for a computer I used to leave on day in and out.

Shoutout to Henry in Atlanta for being an absolute wonderful human being and selling local AND not scalping – faith in humanity restored!

Right so back to the subject at hand – I’m working on implementing aggressive sleep policies for decreased system up time and overall lower temperatures to kill wear and tear.

I’ve migrated my computer to a cabinet in my living room so it’s absolutely critical that the computer stays off as much as possible in the event someone accidentally closes the cabinet door when it’s not in use.

The below command will show what woke your computer from its slumber last.

powercfg -lastwake

Imagine my surprise when I found out a Hard Drive Imaging/Backup Application that was installed years ago – EaseUs ToDo Backup – was the culprit.

As I continue this journey to peak sleep zen I’ll update this article further with my personal findings.

Recursive pkgdiff for WAR and JAR comparison in Java

This’ll be one of the most useful utilities I’ve written to date

Features:

  • Whitelisting of Desired JAR String Matches
  • Option to enable/disable whitelisting
  • pkgdiff over parent WARs and all children JAR files
  • Option to enable/disable decompiling
    • Decompiles all detected/whitelisted (if enabled) jar files and attaches source back to jar file
    • Used for delta analysis in html report that pkgdiff creates
  • Timestamped Reports – Both Zipped and Regular Folders
    • Each time script is ran clears current working report directory
    • At end of script takes output and copies to timestamped directory
    • At end of script zips the timestamped directory for portability

The idea is to do the following:

  1. Runs pkgdiff on the initial two WAR files
  2. Unzips the WAR files
  3. Searches for any JAR files in each unzipped path and indexes them
  4. Attempts to find a JAR match across both of the unzipped WAR paths
    • Strips version numbers from the jar filenames
    • Checks the whitelist to see if the JAR matches ones you desire to be processed
  5. (Optional) Runs JD Decompiler and attaches the decompiled code back to the JAR
  6. Runs pkgdiff on the matched jar files
  7. Repeat steps 4-6 on all jars
  8. Takes output and copies all to timestamped directory
  9. Zips timestamped directory for portability
    • Does not remove timestamped directory just zips it

Repo URLhttps://github.com/qwertycody/Recursive_PkgDiff_Java