Thursday, December 20, 2018

Work

So, I had this big long rambling post about my work history and the bosses that I have had. I decided not to post that but to condense it down to this:

A leader can make your job enjoyable enough that you stay despite everything, or they can make you want to leave as quick as possible.

I've had both kinds... I'm fortunate enough that my current leader is awesome.

Sunday, June 3, 2018

Coding

I love to code. Its as simple as that. If I had a job where I couldn't code, I probably wouldn't stay in that job very long.

I don't especially care what the language is because I can figure it out (with my pal Google). I've coded in a lot of different languages. I'm sure there are more than this but these are the ones I can think of off the top of my head: Basic, Assembly, Pascal / Delphi, Today, Progress, Cobol, dBase, Hibol, C, C++, C#, VB, VBScript, VB.Net, Java, JavaScript, Perl, PowerShell, PHP, Various other "shell" batch languages

I loved doing Assembly when I was deep into it (many, many moons ago). The system was there for all to see and I was tweaking the heck out of it. I doubt that I would know where to begin on a 'modern' system.

I'm not sure that I have a favorite language. If I'm going to do something web based then I would probably choose PHP (with lots of JavaScript). If I'm going to do something Windows based then its probably going to be C#. If I just need a script then most likely it will be PowerShell or Bash (depending on the OS :)).

My advice to you, learn all you can and follow your passion. The more you know, the more valuable you are and the more hire-able you will be.

Thursday, January 11, 2018

Chrome in C#

Recently I got a new NAS and wanted to monitor the heath on a regular basis. So I wrote an app to log into the web admin portal and display the system status dashboard. I used the CefSharp toolkit found here: https://github.com/cefsharp/CefSharp

It was super easy to use. I just created a form then added the following code:

       
public ChromiumWebBrowser chromeBrowser;

CefSettings cefSettings = new CefSettings();
Cef.Initialize(cefSettings);

chromeBrowser = new ChromiumWebBrowser("INSERT_WEB_URL_HERE");

this.Controls.Add(chromeBrowser);

// fill the window minus the menu
chromeBrowser.Dock = DockStyle.None;
chromeBrowser.Top = menuStrip1.Height;
chromeBrowser.Height = this.ClientSize.Height - menuStrip1.Height;
chromeBrowser.Width = this.ClientSize.Width;
chromeBrowser.Anchor = AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
      
 

Then you can do things like this:

       
chromeBrowser.ExecuteScriptAsync("document.getElementById(\"ext-comp-1091\").click();"); // stats web menu item
      
 

Fun times.
Copyright Realm Laboratories, LLC