Random Useful Information Part 1

Randy Bacon Random Useful Info

I enjoy learning and sharing with others what I have learned but sometimes these little things I learn are not enough to actually write a whole blog post about. To make up for this, I have decide to start something new called Random Useful Information. I hope you find one of these tips useful.

Blog Post Writing Tools


If you are using Ghost to create and manage your blog, you may be in love with the interface and resource usage but a little disappointed in the editor. Don't get me wrong, the default editor in Ghost is great, but the lack of spell checking is really a no-go for me. After some searching and trying several markdown editors, I decided to use MarkdownPad 2.

The only con for me in regards to this application is that it is Windows only. I would love to use the same application on my Mac without having to use VirtualBox...

I decided to purchase the full version for the following reasons:

  • To support the developer (I highly encourage this ;-)
  • The ability to customize the editor (I HATE having to edit on a white background in any application)
  • The ability to link in custom style sheets. I created a style sheet that is very close to this site so the live preview will be very close to what is actually published.
  • Auto-save - this feature LITERALLY kept me from having to rewrite a couple of paragraphs in my last post
  • Commercial use - I can dream of someday being a real writer right?


Yes I actually started storing all my articles and related content in a Git repository. I create a directory for each article with a unique images directory. As I'm writing (or maybe when I am done), I commit my changes to Git and have an automatic back up.


To share code, I use GitHub's Gist. If you already have a GitHub account, it is easy to set up Gists. Also you can mark these Gists as private to just share with only others that have access to the Gist link.

Capitalize Your Title

Do you remember all those rules from English class about title capitalization? I don't either, but this little website titlecapitalization.com will do it for you.

Dynamic DNS

Several times in the last month, Comcast has randomly decided to assign me a new IP address at home. I have NAT set up on my router, along with an open port forwarding to my machine for remote desktop. In the past, I have tried to keep an A record up-to-date on my DNS but it was becoming a pain. DuckDNS is a great free option to keep track of your home machine IP. To set up DuckDNS first go to the site and log in via the top right using an OAuth service. The authors have decided to not maintain their own user store, so you will have to use a service to log in.

Once you have logged in, create a domain for the machine you want to track. I am using the Windows Powershell script to keep my entry up-to-date. This Powershell script runs every 5 minutes and persists after restart. To check the status of this Powershell script, you can use the following Powershell command:

 Get-Job | foreach{ $_.Name + ' ' + $_.PSBeginTime + ' ' + $_.State }

Finding Your IP via Google

This is a quick tip - go to google.com and enter "what is my IP" in the search box. Amazing right?

DNS Tools

Recently I moved my domains to a new web server on a completely new IP. I found several tools that were very useful in this process. The first is intoDNS. This service offers a full dump of all things DNS related to your domain.

Google offers a free DNS lookup tool via the Google Apps Toolbox at https://toolbox.googleapps.com/apps/dig/. Additionally in this Apps Toolbox, the Browserinfo section is very useful.

Flush Google's public DNS cache for a record can be done via https://developers.google.com/speed/public-dns/cache.

Additionally, sometimes Google Chrome will seem to get "stuck" on bad DNS records. If you open chrome://net-internals/#dns in Chrome, you can click a button to clear the host cache.

Removing Really Long File Names in Windows

Recently I botched a Robocopy and ended up with a bunch of recursive directories that I could not remove because the files paths were "too long". I guess that is a "feature" of Windows. I found this tip via Stack Overflow. To remove the bunk directory, create a temp empty directory and use the following command:

robocopy empty_dir base_nested_dir /purge

Fixed Orphaned Users in MSSQL

After restoring a backup in MSSQL, you will often end up with "orphaned" users. Here are a few quick commands to help fix these accounts:

--list all orphaned users
EXEC sp_change_users_login 'Report'

--fix the user
EXEC sp_change_users_login 'Auto_Fix', 'user'

--create a new user for a give user
--EXEC sp_change_users_login 'Auto_Fix', 'user', 'login', 'password'

--delete user
--DROP USER user


Hopefully you found one of these random items useful. Until next time - happy coding!