Posts

Showing posts from November, 2014

Changeset 1

On occasion, I'm asked at work to look into an application with which I don't usually work. So, I go into Team Foundation Server, check it out, do my work, check it in, and go on with life. After awhile though, the number of random mappings from TFS to my local machine start to bug me. It's not that I'm liable to run out disk space or, for that matter, because of anything significant. It just bugs me. I used to go to Windows Explorer, open up the folder that mapped to the root of my TFS workspace, and then navigate downward until I found the offending folder, and delete it. This works to a point: sure, when you're breezing through source control you no longer see random folders checked out or marked as being the latest. But, if you ever need to go back and get some or all the files again, TFS won't because you haven't told TFS you removed the local files! If you truly want to remove the files and make sure TFS knows it, then you should get changeset

Weekly Raspberry Pi Maintenance

I have three Raspberry Pi Model B  machines I use for Mono experiments. Like any other system, these require periodic maintenance. Prior to getting the Raspberry Pi machines, it had been years since I did anything with Linux (mostly Slackware and Red Hat Linux, circa 2000 or so) and, as a result, I was forever looking up the steps and parameters I need to keep the software up to date and the free space maximized. So, mostly for my own sanity, I've listed my weekly maintenance steps here. sudo apt-get update Use this to download the list of package from the repositories and discover the newest versions of packages and their dependencies. sudo apt-get dist-upgrade Since these aren't production machines, I'm comfortable using dist-upgrade rather than upgrade . If these machines were for something other than goofing around, then I'd be concerned with system predictability and switch over to upgrade . sudo apt-get clean This option clears out the local repository of

I Should be Embarrassed...

Image
but despite all the tools the company provides to keep track of tasks, I still fall back to sticky notes: It's immediate & readily available, doesn't get covered up by stuff on my Windows desktop, and provides coworkers and managers an at-a-glance view of what's on my plate. But, dang, it's so old school and non-technical. Update/Clarification: This is mostly for stuff that doesn't already reside in Agile projects.

Providing External (non-localhost) Access to Kibana

Image
I'm still on my ELK stack kick and finally got Kibana running. Once it was running on my machine I fired off an email to coworkers to let them know they could hit the temporary website I had configured on my machine with Kibana. Well, of course, I had rush through things and gotten ahead of myself. Within a few minutes Jeff had IM'd me and said he was getting a blank dashboard. There were a few things I had to adjust in the elasticsearch configuration file, the Kibana configuration file, plus some firewall rules I had to add to my machine before the rest of the team could enjoy Kibana goodness. Configuring elasticsearch elasticsearch configuration settings can be found in the kivana file /bin/elasticsearch.yml . Specifically, we want to look at the settings relating to HTTP access control (CORS) : The two settings are: http.cors.enabled: true #http.cors.allow-origin: * If you haven't messed with your configuration file too much, then you'll find these set

Fixing the NullPointerException When Querying an elasticsearch Cluster

To retain, search, and analyze the logs of a Windows Service with which we're having performance problems, I installed logstash and elasticsearch . (I'll post more on that later.) This arrangement has been great, as it allows us to scoop the log files from the server (via logstash) and retain them (in elasticsearch) even though the log files are frequently overwritten on the Windows server. And, once I've got more proficient with elasticsearch Query DSL  I'm sure we'll be able to tease all sorts of interesting information from our logs. Anyway, all has been working well. We've been gathering logs for four days now and it's now time to dig into them and see what we find. My first step was to get a list of the indices in the elasticsearch cluster. I did this via the command: http://localhost:9200/_cat/indices What I expected to get was a list of indices (similar to database in a SQL system). What I received instead was an HTTP status code of 500 and the

Removing White Space from an XML Fragment

I recently encountered the need to remove extraneous white space from a string containing valid XML. Well, it probably wasn't absolutely necessary but I was tired of seeing a ton of "\r\n" and tabs in the values displayed in the Visual Studio debugger. In any case, a quick search of the web uncovered a variety of approaches, most centering on setting the XmlDocument property preserveWhiteSpace to false. These didn't work for me since I wasn't dealing with an XML document but, rather, a string or fragment that contained XML. However, I found on CodeProject.com an elegant solution using regular expressions : xmlText = Regex.Replace( xmlText, @" (?=<[^=]+?>)(?=</?\w+\s+\w+)(<.*?)(\s+)(.*?>)" , @" $1_$3" , RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); where xmlText is the string which contains your XML fragment.