Posts

Getting Started with GitHub and Visual Studio 2017

Image
Introduction Want to get started using git with Visual Studio but you're not sure what to do, how to get started, or you are confused by the command line? Good news, everyone! You can do nearly everything you want right from within Visual Studio 2017. All you need is the GitHub extension for Visual Studio, and a GitHub account. For my demonstration I am using a Pro account so I have the option for private repositories but this will work for free accounts as well. I wrote this because I couldn't find a step by step instruction how-to that didn't assume you were using Microsoft Team Services or using the git command line. In my usual style, this is terse and to the point, and a little rough around the edges. I hope you find this useful. Enjoy! Prerequisites Install Visual Studio 2017 Install GitHub extension for Visual Studio How To #1: Push an existing project into GitHub (and connect to GitHub for the first time) Open ex

Changing the service account credentials in SQL Server

Image
Like most people, when I first start out setting up something new I take the defaults, and that usually is good enough.  Then down the road, while learning more about how the product works, I discover that the defaults don't cut it in some cases.  Microsoft SQL Server is one example.  Out of the box it defaults to using a local account for its services, "nt service\mssql$instancename".  That works fine until you start doing stuff like replication, mirroring, or interacting with active directory with impersonation.  These functions need a domain account, either to share credentials, or to have access to read active directory. Seems simple enough -- go into the SQL Server Configuration Manager, change the old local account name associated with the service ("nt service\mssql$prod") to a domain account ("ad1\mssql$prod"), and set the account password.  I had previously set up another instance of sql server with this new account, so I know that it was grant

Extending VB.NET objects that are marked as NotInheritable

One of the neat things in VB.Net is something called an "Extension" which allows you to extend the ability of other classes (even if its not possible to subclass the object with inheritance).  For example, in vb6 a lot of times we use Left$() and Right$() to work with strings, and there is a  vb.net  version of these (right() and left()) but it doesn't exist as a method as part of the string itself.  For example, dim MyString as string = "hello" debug.print left(myString,1) <-- prints 'h' but you can use the ToUpper method right off the string itself... debug.print myString.ToUpper <-- the same as ucase(myString) The code below adds 'left' and 'right' extensions to the string class so you can do this .. Imports  Example .Code.StringExtensions debug.print mystring.toupper. left(1)  I also added 'qptrim' as an extension of the trim method that strips out nulls as well.   debug.print mystring.qptrim Below is how you implement e

Installing OTRS 4.0 on Ubuntu Linux 14.04 with a MSSQL Backend

A couple of quick notes... this is not my usual style, this is fairly cutting edge with OTRS 4.0 released yesterday. I've been tinkering around with the beta for a while, and I wanted to do the install from scratch AND use Microsoft SQL Server for the data store. If you have been trying to do this yourself, like me you discovered it's not officially supported. The OTRS group wants you to install on Windows (blech). I'm here to tell you, this is possible, with some extra fiddling around. The biggest fiddle is getting an ODBC driver installed on Linux that will talk to Microsoft SQL Server, and is free. I used Microsoft SQL Server 2008 as my backend server, but I imagine any SQL Server version will do. Without further adieu, here's my notes. This is basically a rough draft, if you find this interesting and need more info, leave a comment. # Download source cd /opt wget http://ftp.otrs.org/pub/otrs/otrs-4.0.1.tar.gz # Install Pre-requisites apt-get install apache

that new old thing: a date2num implementation in vb.net

Hell must be freezing over because I'm doing a lot more VB.NET development these days. Visual Studio 2013 and the .NET 4.5 framework are, in my opinion, the first usable versions of these products. As part of a project to port some of our legacy code from VB6 to VB.NET I've been converting all of the common functions and shared utility libraries we've built up over the years. Some libraries date back to the migration from QuickBasic/PDS 7 on DOS to Visual Basic on Windows. Back in those days we used very simple yet powerful functions to do things like date math accurately. For example, in the old days, programmers had to account for leap year manually, if they didn't have a good toolset on hand. One of those toolsets was called QuickPak, a library of handy functions written in Assembler that could be linked to your BASIC program to do these things accurately and easily. The function that sold systems -- our systems -- as being the most accurate product on the m

Handy OpenSSL Commands

To convert a certificate from PEM to DER: openssl x509 -in cert.txt -inform PEM -out cert.bin -outform DER To convert a certificate from DER to PEM: openssl x509 -in cert.bin -inform DER -out cert.txt -outform PEM To convert a key from PEM to DER: openssl rsa -in key.txt -inform PEM -out key.bin -outform DER To convert a key from DER to PEM: openssl rsa -in key.bin -inform DER -out key.txt -outform PEM Convert a PEM+KEY to PKCS12: openssl pkcs12 -export -out client.pfx -inkey keyfile.txt -in cert.txt -certfile root.txt Extract Private Key from PKCS12: openssl pkcs12 -in client.pfx -nocerts -out keyfile.txt Extract Public Cert from PKCS12: openssl pkcs12 -in client.pfx -clcerts -nokeys -out cert.txt Remove Password from Private Key: openssl rsa -in keyfile.txt -out unpassworded.txt Generate a client key: openssl genrsa -out client.key 4096 Build a certificate request: openssl req -key client.key -new -out client.req Build a certificate request (advanced): openssl req -n

Updating Firmware on legacy Dell Hardware in Ubuntu Linux

It took a bit of Google searching and hocus-pocus to figure out how to patch the BIOS rev A04 on our old Dell PowerEdge SC1420 Server. Here's the magic incantation. ############################################################ # Dell Firmware Update for Ubuntu Linux, on Legacy Hardware ############################################################ # Install firmware update tool out of the universe repository apt-get install firmware-addon-dell # Not sure if this is needed, I didn't need it, but it's documented modprobe dell_rbu # Dump a list of all device ids in the system bootstrap_firmware -a # open http://linux.dell.com/repo/firmware/bios-hdrs in a browser # search for IDs that appear in bootstrap_firmware output # In my case, the SC1420 is system_bios_ven_0x1028_dev_0x0173 wget http://linux.dell.com/repo/firmware/bios-hdrs/system_bios_ven_0x1028_dev_0x0173_version_a04/bios.hdr # Queue the new bios to be updated durning the next warm-boot dellBiosUpdate -u --force-mono -