Struggles by Lars C.https://startbigthinksmall.wordpress.com
... routine is the enemy.Thu, 30 Jun 2016 14:55:52 +0000enhourly1http://wordpress.com/https://secure.gravatar.com/blavatar/48f9c77eeb6e0e94151481ef285fe3a1?s=96&d=https%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.pngStruggles by Lars C.https://startbigthinksmall.wordpress.com
New Minimod: Generate CSV-files in MVC-Application using CsvHelperhttps://startbigthinksmall.wordpress.com/2014/10/01/new-minimod-generate-csv-files-in-mvc-application-using-csvhelper/
https://startbigthinksmall.wordpress.com/2014/10/01/new-minimod-generate-csv-files-in-mvc-application-using-csvhelper/#respondWed, 01 Oct 2014 13:40:19 +0000http://startbigthinksmall.wordpress.com/?p=672]]>Just uploaded a new Minimod for simple generation of CSV files from a MvcControllers’ action with the help of CsvHelper.

]]>https://startbigthinksmall.wordpress.com/2012/06/02/tracking-mailto-anchors-and-external-links-with-google-analytics/feed/27larscorneliussenHow to authorize Local System Account for OpenSSHhttps://startbigthinksmall.wordpress.com/2012/04/26/how-to-authorize-local-system-account-for-openssh/
https://startbigthinksmall.wordpress.com/2012/04/26/how-to-authorize-local-system-account-for-openssh/#commentsThu, 26 Apr 2012 12:50:58 +0000http://startbigthinksmall.wordpress.com/?p=639]]>We have Jenkins installed and want it to pull from bitbucket and github – authorization should happen through Open SSH (Public Keys).

Jenkins runs as Local System.

The problem

How to find and then place id_rsa into ~/.ssh? How to get it to add things to ~/.ss/known_hosts?

The solution

As always: fake it until you make it!

Run this command in an elevated command prompt on the server, in order to start a command prompt as Local System user:

The Interactive Services Detection will now bring up a dialog (probably in the background) where it asks you to “View the message” in order to display the service session where the command window will run.

Run echo %userprofile% to see where your storage is… In my case it is "C:\Windows\system32\config\systemprofile”. Odd, but true: Sadly, when i try to put the id_rsa file into that directory from my normal user session, it somehow doesn’t make it into the local system accounts profile.

From here you can open the git bash by running C:\Program Files (x86)\Git\bin\sh –login –i

Then run cd ~ to switch to your home directory.

Then copy your id_rsa file here with a simple cp <id_rsa-location> .

Now run ssh git@bitbucket.org in order to try to authenticate and accept the host as known host.

BTW: also make sure you run git.cmd, not git.exe!!

Other posts that helped (and confused) me:

]]>https://startbigthinksmall.wordpress.com/2012/04/26/how-to-authorize-local-system-account-for-openssh/feed/7larscorneliussenWhat the Azure Tools do to your Cloud Service Configurationhttps://startbigthinksmall.wordpress.com/2011/12/27/what-the-azure-tools-do-to-your-cloud-service-configuration/
https://startbigthinksmall.wordpress.com/2011/12/27/what-the-azure-tools-do-to-your-cloud-service-configuration/#respondTue, 27 Dec 2011 15:59:56 +0000http://startbigthinksmall.wordpress.com/?p=634]]>For my current work on Azure integration for NPanday I’m investigating what the Azure Tools do with the Service Configuration (*.cscfg) on publish, since the file in Visual Studio it isn’t the same as one which is deployed along with the Cloud Service Package (*.cspkg).

The build & package part for Azure Cloud Services can be found in %Program Files (x86)%\MSBuild\Microsoft\VisualStudio\v10.0\Windows Azure Tools\1.6\Microsoft.WindowsAzure.targets

Find and copy

First, the build tries to figure out which configuration to build use as input by checking for ServiceConfiguration.$(TargetProfile).ccfg and ServiceConfiguration.ccfg, while$(TargetProfile) is “Cloud” by default.

As a part of the build, after being copied, the configuration file is augmented with more settings.

Add “file generated” comment

That was why I noticed, that the files are different. The comment in the target file makes it look like the file is generated from scratch, but instead it is just a copy which changed here and there. By default, the comment is the only change

Connection String Override

If ‘ShouldUpdateDiagnosticsConnectionStringOnPublish’ is set to true, the diagnostics connection string is overridden for all roles in order to prevent the default setting “UseDevelopmentStorage=true” to be published to the cloud.

This is one of the typical “Microsoft demo-ready” features. Most certainly you’ll have multiple role-spanning connection strings or settings that you’d like to change on publish, but this is the only one needed to get demos to run, right?

Corresponding parameters in NPanday

The most complex part in the build is the setup for profiling and IntelliTrace; currently we have no plans on supporting these in NPanday. We will rather just deploy from Visual Studio, in case we need profiling or IntelliTrace.

I still have to look at how RDP and MSDeploy can be added to the configured service configuration; for a first release of NPanday that may have to be done manually.

]]>https://startbigthinksmall.wordpress.com/2011/12/27/what-the-azure-tools-do-to-your-cloud-service-configuration/feed/0larscorneliussenPlexus Container Annotations and Maven 2 Mojoshttps://startbigthinksmall.wordpress.com/2011/12/05/plexus-container-annotations-and-maven-2-mojos/
https://startbigthinksmall.wordpress.com/2011/12/05/plexus-container-annotations-and-maven-2-mojos/#respondMon, 05 Dec 2011 18:44:39 +0000http://startbigthinksmall.wordpress.com/?p=629]]>I’ll make it short: it’s a mess. You can’t use plexus container 1.5-tooling (with java annotations), if you have to load your components in a plexus 1.0.x-container – which is the case, if your components are utilized in a Maven 2.2.x Mojo. This is simply because plexus container 1.5.x uses “default” as a default role-hint, while NULL is the default in plexus 1.0.x.

But you can use the old tooling, plexus-maven-plugin. But by default it fails if it sees any annotation in your source code, because it uses a version of qdox that doesn’t know annotations yet.

Also, when generating the component descriptor it doesn’t merge with the manually defined one in src/resources (the new one does).

And since, by default, the merge-descriptors goal runs before descriptor (generate) goal, you have to do some back flips to get that running too.

Well here is a configuration that works. At least in my project. Today.

]]>https://startbigthinksmall.wordpress.com/2011/12/05/plexus-container-annotations-and-maven-2-mojos/feed/0larscorneliussenCreate branches with Maven Release Plugin (SVN)https://startbigthinksmall.wordpress.com/2011/11/29/create-branches-with-maven-release-plugin-svn/
https://startbigthinksmall.wordpress.com/2011/11/29/create-branches-with-maven-release-plugin-svn/#commentsTue, 29 Nov 2011 07:59:15 +0000http://startbigthinksmall.wordpress.com/?p=624]]>I’m currently working on Azure and web packaging (MSDeploy) support for NPanday. I want to do that on a separate SVN branch, which I’ll then reintegrate later on.

The current trunk version is 1.4.1-incubating-SNAPSHOT, and since we are about to release that upcoming version1.4.1-incubating soon, I don’t want to pollute it with half-baked changes, while I’ll still need to develop on the trunk in parallel.

I’ll also need to be able to install both the current trunk and my experimental branch in my local Maven repository at the same time, hence I need a new temporary version for my branch. All this can be achieved using the Maven Release Plugin, in particular the branch goal. Maven Release supports 14 SCMs through the same interface; in this case we use SVN, though.

The name for the branch to be created. When on trunk, Maven figures out to use the default SVN layout for branches and tags. You can optionally define the branch base using the parameter branchBase like this: –DbranchBase=https://svn.apache.org/repos/asf/incubator/npanday/branches/

-DautoVersionSubmodules=true

When ran, Maven will prompt for the version to be used in the branch. I provided 1.5.0-azuresupport-SNAPSHOT. Since autoVersionSubmodules is set to true, Maven Release will automatically use this versions for all submodules and hence also update all inner-project dependencies to that version.

The next four settings go hand-in-hand.

-DsuppressCommitBeforeBranch=true

By default, Maven Releases creates intermediate commits to the current working copy. I’m not sure of the reason, but I think it was because some VCS do not support branching/tagging of modified working copies. This parameter makes sure, no intermediate commits are made to the working copy.

-DremoteTagging=false

With SVN, by default, tags are created remotely. If you want to ommit intermediate commits, this must be set to false.

-DupdateBranchVersions=true

-DupdateWorkingCopyVersions=false

When branching, you can either define new versions for the current working copy, or the new branch, or both. As set here, the working copy will be left alone, and the plugin will ask for a new version for the branch.

Now I can switch forth and back between the trunk and the new branch, but still build and deploy artifacts side-by-side.

Defaults in POM

You may also provide the fixed values in the POM. And if you want to avoid interfering with other Maven Release actions, you might want to use a profile.

Now it will be enough, when I run mvn release:branch –DbranchName=1.5.0-azuresupport

]]>https://startbigthinksmall.wordpress.com/2011/11/29/create-branches-with-maven-release-plugin-svn/feed/3larscorneliussenActivity Log Profiler: Find out which extension is slowing down your Visual Studiohttps://startbigthinksmall.wordpress.com/2011/11/08/activity-log-profiler-find-out-which-extension-is-slowing-down-your-visual-studio/
https://startbigthinksmall.wordpress.com/2011/11/08/activity-log-profiler-find-out-which-extension-is-slowing-down-your-visual-studio/#respondTue, 08 Nov 2011 12:50:06 +0000http://startbigthinksmall.wordpress.com/2011/11/08/activity-log-profiler-find-out-which-extension-is-slowing-down-your-visual-studio/]]>As I’m doing some work for the NPanday Visual Studio Addin, I bugs me even more that my Visual Studio 2010 currently needs about 40 seconds to start.

Actually I do not wonder at all, as I installed every single extension I ever found interesting. But, should I now disable them all, or rather find out which one takes the most time?

There it says, that if you start VS using devenv /Log, it will log it’s acitivity to %AppData%\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml (for VS 2010). And it even comes with an XML that provides some output:

New XSL with Profiling Capabilities

So I tweaked the XSL to be a little bit more “profiling-friendly”. It will now:

Hotspots

Download and use with GIT

Run deploy.cmd (will overwrite default ActivityLog.xsl in parent folder; Visual Studio will replace it after restart!)

Open ActivityLog.xml in Internet Explorer

You can also download it manually (from here) and replace %AppData%\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xsl manually after each Visual Studio Run.

But with GIT you can easily get updates; and it makes it easier to submit patches, which I’ll be happy to apply.

Attention: Now you only have to repeat 3) and 4) to produce new logs, as Visual Studio will recreate both ActivityLog.xml and ActivityLog.xsl each time it is started with ‘/Log’.

]]>https://startbigthinksmall.wordpress.com/2011/11/08/activity-log-profiler-find-out-which-extension-is-slowing-down-your-visual-studio/feed/0larscorneliussenimageimageimageimageEasily install Fitnesse (or any Java App) as Windows Service / NT Servicehttps://startbigthinksmall.wordpress.com/2011/10/27/easily-install-fitnesse-or-any-java-app-as-windows-service-nt-service/
https://startbigthinksmall.wordpress.com/2011/10/27/easily-install-fitnesse-or-any-java-app-as-windows-service-nt-service/#commentsThu, 27 Oct 2011 19:50:53 +0000http://startbigthinksmall.wordpress.com/2011/10/27/easily-install-fitnesse-or-any-java-app-as-windows-service-nt-service/]]>After I had to search for this solution all to long, I thought I’d share it: