Category: Web development
-
Configure InvoiceShelf to use MailHog
I enjoy InvoiceShelf since I migrated to it in December 2024. InvoiceShelf is open-source invoicing software. I do not allow it to send emails, but I’m exploring the idea. How to prevent local web apps from sending emails I run MailHog. It’s an open-source email catcher that allows me to see what emails sites running…
-
Set up Drupal on Laravel Valet
Screenshot Here is a screenshot of https://p8hd.test after running the installer:
-
Laravel Valet PHP.ini Path
The path to the php.ini file my Laravel Valet uses is /opt/homebrew/etc/php/8.1/php.ini In order to see changes in phpInfo() calls, the valet restart command is not good enough. I must use the command brew services restart php@8.1
-
Microsoft Azure SqlServer
Check the status of CREATE DATABASE and ALTER DATABASE queries List all users and roles
-
Troubleshooting VS Code, xDebug, and Laravel Valet on macOS
Problem: xDebug is not showing up in phpInfo() output Run <?php phpInfo(); in a browser and look for “with Xdebug” like is shown near the bottom left of this screenshot: There’s also a large section of xDebug settings near the bottom of the page. Here’s mine: If you do not see xDebug in these locations…
-
Solving a Confusing MigrationBlocker While Moving to Azure SQL Database
This week, I’m altering functions and stored procedures in a SQL Server 2008 database so that it can be migrated to Azure. The Data Migration Assistant does a great job of generating reports identifying MigrationBlockers, but one type of error was vague enough to confuse me for a few minutes. Here’s an example of that…
-
Detecting mixed case strings in ASP Classic
I needed to detect a mixed case string in classic ASP. I define a mixed case string as containing both upper and lower case characters, like AuxagGsrLpa. I could not find a free function on the web to make this decision, so I wrote one. = 65 and asc( currentChar ) = 97 and asc(…
-
Matching MD5 hashes in ASP.NET and ASP Classic
The goal of this page is to put two MD5 code samples on the same web page, one for ASP classic and one for ASP.NET. String formatting (like ASCII vs UTF-8) can trip up coding these two routines. These two code samples will produce the same MD5 hash output. Classic ASP/VBScript MD5 The ASP code…
-
“Time ago” formatting in ASP classic
Today, I needed to convert a time stamp like “1/25/2011 10:42:11 AM” to a readable sentence format like “2 months and 6 hours ago.” Here’s the code I came up with: function timeAgo( byval time ) sentence = “” hits = 0 piecesAgo = array( 0, 0, 0, 0, 0, 0 ) piecesTotals = array(…
-
Clear default text from input boxes using Javascript
Providing labels is a great way to help users interact with your website properly. I like to put instructional text inside text boxes to save space. Users get annoyed when the text inside the box they click on does not disappear when they are ready to type. Users do not want to backspace default instructional…
-
Classic ASP and Server.GetLastError in IIS7
My classic ASP error logging scripts were dead in the water when I moved them to a Windows Server 2008 with IIS 7.0. Some code like this is useful to record errors in a database: dim objErrorInfo, errorStringStr set objErrorInfo = Server.GetLastError errorStringStr = objErrorInfo.File & “, line: ” & objErrorInfo.Line & “, error: “…
-
Disguise Email Addresses for online publishing
Disguise your email address or any text with this character obfuscation. This code corey@example.com will show up on a web page as corey@example.com. You can share your email address without worrying that it will be collected by a spam bot. Enter some plain text Obfuscate Some losers send spam email for a living, and will…