Skip to content

Instantly share code, notes, and snippets.

@sturdy5
sturdy5 / README.md
Last active July 3, 2017 16:07
Dashing BitBucket Repo Stats

Description

This is a Dashing widget that is based on the Dashing GitHub Stats widget. This widget displays Last Activity, Open Issues, Open Pulls, Forks, and Watchers of a given set of BitBucket repositories.

Setup

  1. You can either copy and paste these files on your own, or you can use dashing install 15a542122b198449903d to copy the files into your dashing directory in place.
  2. Edit the bitbucket.yml file to configure the widget. An example configuration is below.
  3. Add bitbucket_rest_api and actionview gems to your Gemfile and run bundle install
  4. Add the widget to your dashboard erb file. The data-id value is the repository you want to display information for. An example is below.
@sturdy5
sturdy5 / virtualbox-issues.md
Last active August 29, 2015 14:16
VirtualBox Installation Issues

History

I've been using VirtualBox for quite some time now. It has been a great tool to isolate my normal working environment from any changes I may make to the OS. It also allows me to work in my preferred OS - linux; even when I'm at work and am forced to use Windows. The road over the last year has been fairly easy. I've installed VirtualBox on a number of workstations and I even have one setup so that if the Windows box restarts, then one of the VirtualBox images automatically starts up (if I can remember how I did that I will updated this post).

Issue 1 - Installation Unexpectedly Failed

Yeah, that's the error message I got one day when I was trying to upgrade the version of VirtualBox. To this day, I don't know what caused it. I suspect that there was some update to the server done by the server operations people that had some adverse affect on VirtualBox. Don't get me wrong - I don't think that the ops people messed anything up, I just think that what they pushed had some unintended consequence

@sturdy5
sturdy5 / libreoffice-for-s390.md
Last active September 8, 2015 14:56
Building LibreOffice for the S390

Overview

Sometimes you find yourself working on a product that needs LibreOffice to do something. Maybe it is document conversions, maybe it is something else. The idea though, is that it needs a headless version of LibreOffice to be able to do something. To make this more complicated, this needs to be compiled on a S/390 mainframe. Well I can guarantee that LibreOffice doesn't offer pre-packaged versions for a mainframe. This is a guide on how to compile a headless version of LibreOffice for a mainframe running SLES on zLinux.

I know, you are saying that linux is linux and we should just be able to follow the guide on Building On Linux. Mostly that will be true, so by all means, use it as a guide. I ran into a few issues that I had to work around, so use both.

Dependencies

So we sta

@sturdy5
sturdy5 / ruby-connecting-to-sql-server-on-linux.md
Last active August 29, 2015 14:13
Ruby Connecting to SQL Server on Linux

First, many thanks to this article from Ben Scheirman. It went a long way to helping me get this working. I am redocumenting only because there were some additional steps that I had to go through to get it done.

Environment

This was done on LinuxMint 17.

Get unixODBC

We are planning on connecting to the MSSQL server through ODBC, so we need to grab the unixODBC software

sudo apt-get install unixodbc-dev
@sturdy5
sturdy5 / concept.png
Last active August 29, 2015 14:12
Docfinity SSO
concept.png
@sturdy5
sturdy5 / EclipsePreferenceFiles.md
Last active January 21, 2016 21:37
Eclipse Preference Files

Creating Preference Files

Some times we have a need to create preference file that will pull in only specific things. We don't want to share our entire workspace settings with other developers, but they do want some of our settings. There seem to be different rules based on the type of Eclipse that you use, but the following worked for me using Rational Application Developer (which is just a commercialized version of the J2EE version of Eclipse).

The one key that seems to be absolutely necessary for the preference files to be imported is file_export_version. At the time of this writing, the value for that field should be 3.0. Without this field defined, the preferences will not be imported.

Here is an example of a preference file that I put together to share classpath variables

# this line is needed in order for eclipse to import properly
@sturdy5
sturdy5 / citrix-on-opensuse.md
Created August 9, 2014 19:19
Citrix on OpenSUSE

Introduction

Once every so often, I upgrade my laptop to use some new and interesting version of linux. Most of the time, I take for granted that the Citrix receiver works, but I often forget that I have to jump through some hoops to get it to work. This time, I'm going to try to write some of it down for future reference.

Getting the Receiver

This is really the easy part. The receiver can be downloaded from the citrix website. The site (at least right now) to find that download is here.

Once downloaded, use your favorite package manager to install it. In the case of OpenSUSE, I downloaded the rpm and just opened the file, the OS took care of the rest.

@sturdy5
sturdy5 / DatabaseUtilities.php
Created July 14, 2014 20:37
Attempting to write a class that can be used to abstract the database that is being used within a php application. Currently supports mysqli and sqlite.
<?php
class DatabaseUtility {
/**
* Opens the connection to the database and returns the database handler.
*
* @param $db_server - the name of the server that hosts the database
* @param $db_user - the name of the user to use to access the database
* @param $db_password - the password for the user to access the database
@sturdy5
sturdy5 / dashing-dashboards.md
Last active March 30, 2017 03:58
Dashboards with Dashing on Ubuntu

Setting up Dashing

Introduction

Dashing is a pretty nifty little dashboard app written in ruby. It was first introduced to me through the works of Adafruit Industries with a post about setting up some dashboards using Raspberry Pi. If you are interested here is the post. For my work, dashboards and metrics seem to be everything recently, so this was an experiment to see how easy it was to setup a dashboard using dashing.

Installation

According to the Dashing website, the first step to trying out Dashing is to install it using gems

@sturdy5
sturdy5 / JunitOutline.md
Created June 23, 2014 18:58
JUnit Outline

JUnit Overview

Before Reading This

I refer to an IDE in this article that not everyone may be familiar with - RAD. RAD stands for Rational Application Developer and is an IDE provided by IBM. It is pretty much a commercialized version of Eclipse. If you think Eclipse every time you see a reference to RAD, you will be fine. Nothing in this is specific to RAD and I could have substituted "Eclipse" in place of "RAD".

About Unit testing

Unit testing is testing each component of a piece of software as a unit of work. The percentage of code which is covered as part of the test is typically called code coverage. Unit tests help ensure that the code is working as it is supposed to. It also acts as living documentation on how to use the code. Lastly, unit testing provides a protective blanket for refactoring/updating code. Unit tests are inherintly bug repellant. Unit tests should be: