Linux notes

A collection of code snippets and notes from working with linux.

Powershell profile for Java and Maven

As we gradually replace regular windows command line with powershell, it will be useful to set up a powershell environment for Java / Maven development.

Powershell script to change SSRS Subscription Owner

We leverage Reporting Services subscriptions a lot to deliver reports via email. A problem we run into frequently is when the user who created the subscription loses permission (leaving the company, changing jobs, etc.) then all of the subscriptions they created stop working. This is because they are the Owner of the subscription and SSRS won’t allow the subscription to run when the owner no longer has permission. Here is a quick powershell script you can use to change the owner using the ReportingService2010 web service endpoint.

Use jQuery to call the Microsoft Translator AJAX API

First, make sure you have subscribed to the Microsoft Translator API on Azure Marketplace and registered your application Azure DataMarket. For testing, you can use the free subscription which lets you submit up to 2 million characters a month. Registering your app will create a Client ID and a Client Secret which you need to get authorization.

In order to protect your Client Secret, you’ll need to write server-side code to get your access token. The access code is then passed to the Microsoft Translator API via AJAX.

Convert from HandySafe to Sky Wallet

I wrote a small python script to help convert Handy Safe to Sky Wallet. I definitely learned a lot about python and even though I wasn’t very familiar with the available API I was able to come up with a pretty nifty script.

Using slices in Golang

I started helping my brother with some GO projects. One really interesting concept in Go are slices… which make working with arrays easier. At anytime you can “chop” out interesting portions of a slice to use using [start:finish]. There is the special append keyword to add things onto the end of the slice dynamically (as opposed to using the make keyword to declare it up front). And there is a range keyword to mimic how foreach works in a higher level language.

Adding minified javascript/css files to ClearCase

I had an issue trying to add some minified JavaScript files to ClearCase. Error adding '[file]' to source control. Created branch "dev" from "[file]" version "\main\0". Type manager "text_file_delta" failed create_version operation. It looks like files that have over 8000 characters on a single row are unable to be added to version control using normal methods. Thankfully, I was able to find a solution here: cleartool mkelem -eltype compressed_file jquery-1.

Top 3 Features missing from SSRS 2008 R2

A list of gripes about features I feel are missing from Microsoft SQL Server Reporting Services 2008 R2.

My experience with a fresh Ubuntu 12.04 install

After my botched Windows 8 install, I decided to go back to Ubuntu. I still would like to figure out a solution with Windows on this laptop so that I could use it for work but right now having linux is better. I decided to document some of the issues I ran into in case I need them later.

Web services proxy: Unable to generate a temporary class

I ran across a strange error while deploying a very simple DLL. It contained only one class; a web services proxy class to the Lists SharePoint web service that I generated using the wsdl tool. Here is the error:

Unable to generate a temporary class (result=1).

error CS2001: Source file ‘C:\WINDOWS\TEMP_zm3ve2y.0.cs’ could not be found

error CS2008: No inputs specified