Windows Command Prompt Recursively Delete .DS_Store

del /s /q /f /a .DS_STORE


We Got Hacked By… Bingbot?

Actual line from server log file (host ip and domain name altered):

Line 6618: 2017-01-30 21:12:44 W3SVC923663 WEB728 GET /companies.asp remove=1723 443 – HTTP/1.1 Mozilla/5.0+(compatible;+bingbot/2.0;++ – – 200 0 0 24266 352 2515

Web application written using classic asp on IIS7 with SQL Server and hosted remotely.

  • No robots.txt.
  • Forced login only on the index.asp page.
  • All other pages don’t check for authorization.
  • All pages include navigation.asp.
  • Search.asp has <a href=’search.asp?selection=’all”>search all</a>.
  • Companies.asp has <a href=’companies.asp?remove=123′>delete</a>

True story. Today.

Reset 10.5 Leopard & 10.6 Snow Leopard password

Reset 10.5 Leopard & 10.6 Snow Leopard password

  1. Power on or restart your Mac.
  2. At the chime (or grey screen if your chime is turned off), hold down Command+S on your keyboard to enter single-user mode.
  3. This step is optional, but it’s a good idea because it checks the consistency of the hard disk before moving on. At the prompt, type fsck -fy and press Enter/Return. Wait for the checks to complete before going to the next step.
  4. Type mount -uw / and press Enter.
  5. Type launchctl load /System/Library/LaunchDaemons/ and press Enter.
  6. Type ls /Users and press Enter. This lists all of the usernames on the computer – helpful if you don’t know or remember what these are.
  7. Type dscl . -passwd /Users/username password and replace “username” with one of the users displayed in the previous step. Replace “password” with a new password of your choice. Press Enter.
  8. Type reboot and press Enter. 


SQL Select Beginning and End of Months

CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(getdate())-1),getdate()),101) as [Beginning of this month]
,CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,getdate()))),DATEADD(mm,1,getdate())),101) as [End of this month]

, CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,getdate()))-1),DATEADD(mm,1,getdate())),101) as [Beginning of next month]
,CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,getdate()))),DATEADD(mm,2,getdate())),101) as [End of next month]

, CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,getdate()))-1),DATEADD(mm,2,getdate())),101) as [Beginning of two months from now]
,CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,getdate()))),DATEADD(mm,3,getdate())),101) as [End of two months from now]

, CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,getdate()))-1),DATEADD(mm,3,getdate())),101) as [Beginning of three months from now]
,CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,getdate()))),DATEADD(mm,4,getdate())),101) as [End of three months from now]

Connect to a Server on a Different Network in Windows 10

My work PC’s IP address is and a server that I recovered from a co-location facility has a static IP of  So, of course, when I connected the server to our network and ping, I get no replies.


I go to Control Panel > Network and Internet > Network Connections, right-click, Properties, select Internet Protocol Version 4 (TCP/IPv4) and click Properties.


Our network, like most, has a DHCP service.  I’ll need to change to a static IP so that I can add a second IP address to the NIC (multihomed).  I’ll run ipconfig /all to get my current IP.


Select the Use the following IP address: radio button, retype my static IP information then click Advanced.


Under the IP address section click the Add button and enter an IP address and Subnet mask in the same class as the server I’m trying to connect to – in this case I used and


Click OK to all of that and run ipconfig /all to confirm the additional IP address.


Now I ping and I get replies.


And I can remote into the server.