Practical .NET, software, and AI tutorials by Gerard Beckerleg, a developer in Sydney.
- Decommissioning Old Databases
Occasionally I inherit an old development database server containing many databases and I usually have no idea which are no longer in use. I came across the following script that allows you to see the last time a database was accessed:
- Find Pair With Given Sum in Array
As I’m moving more and more into management I need ways to keep my coding foo fresh so I have taken to solving small problems from various sites on the internet in my spare time. I also miss that feeling of being in the zone and fully engaged in something just difficult enough to stretch myself.
- Hugo - Failed to find a valid digest in the 'integrity' attribute for resource
After cloning my Hugo site to a new machine and running: hugo server No CSS would load and the console was reporting the following error: Failed to find a valid digest in the 'integrity' attribute for resource The problem was that the CSS for the theme is using the integrity attribute to allow the browser to guarantee that the file downloaded has not been manipulated from the source. For some reason Hugo was regenerating the CSS with a different hash than what was expected, I suspect this might be a git line ending issue.
- Hugo NoSuchKey on Sub Folders After Deploying to Amazon S3 and CloudFront
After deploying this blog to Amazon S3 with CloudFront the main page rendered correctly but any pages in sub folders like /posts or /posts/post-vanity-url would recieve the following error: <Error> <Code>NoSuchKey</Code> <Message>The specified key does not exist.</Message> <Key>{path}</Key> <RequestId>{RequestId}</RequestId> <HostId> {HostId} </HostId> </Error> Hugo uses directory URLs by default (posts/post-vanity-url) instead of files names (/posts/post-vanity-url/index.html). S3 is an object storage system not a file system. When a directory URL is passed to the server, it looks for the default root object in that directory. Asking for a directory fails to retrieve the index.html file in that folder.
- Building Hugo Extended on AWS CodeBuild
After upgrading my Hugo theme to the Hyde inspired Hyde-Hyde theme I also needed to switch from the standard Hugo build to the extended build in order to use the pipes feature. After successfully installing the new theme locally I hit into problems running the extended version of Hugo on AWS CodeBuild. First I received the following error:
- Open ID & OAUTH 2.0
I do security work often but not often enough that I don’t end up Googling many of the terms and concepts every time. Here is a list of the best articles as a quick goto: OAUTH-OPENID: YOU’RE BARKING UP THE WRONG TREE IF YOU THINK THEY’RE THE SAME THING OpenID versus OAuth from the user’s perspective An introduction to OpenID Connect in ASP.NET Core Creating your own OpenID Connect server with ASOS: introduction
- Quick SSL Certs For Local IIS Development
You can use selfssl from the IIS 6 Resource Kit to quickly add self signed SSL certs for local development. When installing select custom install and only install selfssl.exe. Then you can run the following command: selfssl /N:CN=site.local /V:9999 /T /S:2 CN is the hostname you want to register.
- Eclipse AEM Plugin and AEM 6.2 org.apache.sling.api.scripting.ScriptEvaluationException
Using a fresh install of Eclipse and the Adobe AEM Plugin with AEM 6.2 you will get the following exception when trying to install a bundle: org.apache.sling.api.scripting.ScriptEvaluationException From http://stackoverflow.com/questions/38474627/service-component-missing-in-aem add the following line to the pom.xml of the core project:
- Reinstall Umbraco 7 and Delete Content
To reinstall Umbraco 7 you need to reset the following items in the web.config and go to /install to re-run the installation: <connectionStrings> <remove name="umbracoDbDSN" /> <add name="umbracoDbDSN" connectionString="" providerName="" /> </connectionStrings> <add key="umbracoConfigurationStatus" value="" />
- AEM (Adobe Experience Manager) WebDAV Windows 10
When trying to connect to AEM (Adobe Experience Manager) using WebDAV on Windows 10 I received the following error: Add Network Location The folder you entered does not appear to be valid. Please choose another. According to this Stack Overflow answer you need to change the value of the following registry key to 2 or more and restart your machine: