Recovering Data from a Crashed NAS in Windows with VirtualBox and Ubuntu

john.kingNotes, Technical TipsLeave a Comment

Home NAS: Having a Network Attached Storage (NAS) is great and convenient, in that all of your data is typically backed up with 2 or more hard drives in a RAID setup in many modern systems. Such was the case with my home Synology Diskstation DS212. The idea is: one of the 2+ drives fails, you buy a new hard drive to replace the bad one, and the data from the good drive(s) automatically copy onto the newly installed blank hard drive, and you’re back up and running again. The Problem: What happens when both drives fail in a 2-drive … Read More

Increasing Code Coverage to Include Catch Blocks [Salesforce]

john.kingSalesforce, Technical TipsLeave a Comment

In Salesforce, it can sometimes be frustrating driving your Apex Class & Trigger Code Coverage up to get beyond the 75%, 80%, or 85%+ marks.  Some of the more difficult parts of that process can be covering all scenarios to achieve this. In particular, this post focuses on code not executed within the try-catch constructs count against the overall Code Coverage calculations. With a simple refactor, we can remedy that without changing the underlying functionality of the core class — just the test class. The try-catch we will start with before our changes have the following format: try { // … Read More

Adding a Wait / Sleep / Pause for Salesforce Unit Testing

john.kingSalesforce, Technical TipsLeave a Comment

There are certain scenarios where there are timing issues that cannot be avoided in Salesforce. For instance: in a trigger handler class, you may have to institute some logic to only execute a block of code if certain conditions are met such as an object hasn’t been modified in the last X seconds, perhaps even due to some 3rd party packages your organization has adopted that requires you to work around timing. Or something has a very short cache life in order to prevent many back-to-back SOQL calls. But then when it comes time to test that class, how do … Read More

Upgrading a PC SATA drive to SSD

john.kingTechnical TipsLeave a Comment

Upgrading a Windows 10 Mechanical Hard Drive to SSD diagram

In my journey to upgrade my new Windows 10 laptop from its SATA mechanical hard drive to a much snappier SSD, I came across several stumbling blocks that were not all addressed within a single blog post or YouTube instructional. Here is my attempt to remedy that. *NOTE* Before you purchase an SSD and undertake this mission, we urge you to please research that your particular laptop model can indeed be upgraded to SSD. Background: If you’re buying a laptop today (early 2016) and looking to upgrade its hard drive (HD) to SSD, you can probably accomplish this upgrade for … Read More

Visualizing the Protection of California’s Coast in a Timeline

john.kingCase Studies, Offerings, Technical TipsLeave a Comment

“Passed by the California State Legislature in 1999, the Marine Life Protection Act (MLPA) required the California Department of Fish and Wildlife to redesign its system of marine protected areas (MPAs) to increase its coherence and effectiveness at protecting the state’s marine life, habitats, and ecosystems. For the purposes of MPA planning, a public-private partnership commonly referred to as the MLPA Initiative was established, and the state was split into five distinct regions (four coastal and the San Francisco Bay) each of which had its own MPA planning process. All four coastal regions have completed these individual planning processes.” – … Read More

A Strong, Secure, Complex Password That Even I Can Remember!

john.kingIndustry Trends, Technical TipsLeave a Comment

In the wake of the LinkedIn password theft, I would like to offer up a simple process for creating strong and memorable passwords. These would be less susceptible to cracking if a maliciuous group got their hands on a hashed password list, as they would likely be at least in the 1% toughest to crack category that would require brute force. In general, a “strong” password should: never contain any words be at least 8 characters (the longer the better) contain at least 1 of each of the following: lowercase letter: a-z uppercase letter: A-Z number: 0-9 special character (when … Read More

Remote Desktop – From Maximized to Full Screen (Windows 7)

john.kingTechnical Tips39 Comments

If you’re running Windows 7, and you’ve used the Remote Desktop Connection program (mstsc.exe), then you may have experienced the following: you start the program in Full Screen mode, then you go back to your computer at some point. But when you return to your Remote Desktop Connection session, it no longer goes to Full Screen — it just looks like a maximized window. With a few keystrokes, here’s how to remedy that with the Remote Desktop Window being in focus: [Ctrl]+[Alt]+[Pause Break] If your computer doesn’t have a “Pause Break” key, then maybe it has “Pause” or “Break”; if … Read More

First and Last Day of Month – Oracle SQL Syntax Examples

john.kingTechnical Tips8 Comments

First Day of Current Month 1 SELECT trunc(sysdate) – (to_number(to_char(sysdate,’DD’)) – 1) FROM dualselect trunc(sysdate) – (to_number(to_char(sysdate,’DD’)) – 1) from dual Last Day of Current Month 1 SELECT add_months(trunc(sysdate) – (to_number(to_char(sysdate,’DD’)) – 1), 1) -1 FROM dualselect add_months(trunc(sysdate) – (to_number(to_char(sysdate,’DD’)) – 1), 1) -1 from dual