The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,862 other subscribers

Archive for April, 2014

Lowering in language design, part one | Fabulous adventures in coding

Posted by jpluimers on 2014/04/30

I’ll keep an eye on this series by Eric Lippert: Lowering in language design, part one | Fabulous adventures in coding.

–jeroen

Posted in Development, Software Development | Leave a Comment »

Redirect to another web-site using a frame/frameset

Posted by jpluimers on 2014/04/30

Every once in a while, you have a domain but the hosting is at another party that does not allow setting the “Host header” for name based virtual hosting.

So then you want to redirect the page to the hosting party, preferably with keeping the URL in the address bar.
Some how, when searching how to do this (I do it once every couple of years), I always miss the WikiPedia entry at the bottom of this post.

Basically, there are a couple of ways for this:

  1. frameset
  2. head meta refresh
  3. JavaScript window.location.href (which is different from top.location.href)

Only the first one keeps the current URL in the address bar of the browser. The other ones will show the new target url in the address bar.

Notes:

  • in HTML5, the noframes part is not allowed any more.
  • the meta refresh has no extra quotes around the URL, the quotes are around the full text of “0; url=http://TARGET.URL/PATH”

Examples:

Read the rest of this entry »

Posted in Development, HTML, HTML5, Software Development, Web Development | Leave a Comment »

Google Maps: Blue and Yellow Stars For (via: Kristian Köhntopp – Google+)

Posted by jpluimers on 2014/04/29

Kristian Köhntopp had a note post about Google Maps: Blue and Yellow Stars which he could not remove from within Google Maps.

In the end these appear to be bookmarks that you have to remove from Google Bookmarks.

He calls this a “complete UI disaster” to which I totally agree.

Thanks Kristian for sorting that out, as I did give up on that one.

–jeroen

via: Kristian Köhntopp – Google+ – Google Maps: Blue and Yellow Stars For some reasons there….

 

Posted in Google, GoogleBookmarks, GoogleMaps, Power User | Leave a Comment »

Linux: getting the correct license file for AntiVir

Posted by jpluimers on 2014/04/29

I needed AntiVir on an openSUSE workstation.

Too bad the default installation package from YaST installed an old license: AntiVir would not work, and I was getting emails like these at regular intervals:

<br />Date: Thu, 25 Apr 2014 08:57:11 +0200<br />From: Cron Daemon &lt;root@....&gt;<br />To: root@....<br />Subject: Cron &lt;root@...&gt; /usr/lib/AntiVir/guard/avupdate-guard --product=Scanner &gt; /dev/null<br /><br />Error: No valid license was found<br />

After searching the web for a while, I found a lot of posts with wrong information, basically coming down to these 2:

At the bottom of the post, you will find a small shell script that I use to keep the hbedv.key up-to-date.

First some more about HBEDV, then how I found about the new download location, and a command to show you the current license information. Read the rest of this entry »

Posted in *nix, bash, Development, Linux, openSuSE, Power User, Scripting, Software Development, SuSE Linux, wget | 3 Comments »

Asperges in Lijnden

Posted by jpluimers on 2014/04/29

Grond onder de rook van Amsterdam perfect voor asperges http://www.parool.nl/parool/nl/4/AMSTERDAM/article/detail/3643503/2014/04/28/Grond-onder-de-rook-van-Amsterdam-perfect-voor-asperges.dhtml

Hoofdweg, nummer 132, in Lijnden

–jeroen

Posted in Uncategorized | Leave a Comment »

Easiest way to grant/query “Log on as a service” to a Windows user from the command-line? (my question on Super User)

Posted by jpluimers on 2014/04/28

I want to script an install where a service needs to be run as a user. I want to be able to specify the user.

Creating the user is easy through the [Wayback/Archive] NET USER /ADD command.

Specifying the user for the service can also be done: the [Wayback/ArchiveSC CONFIG command [Wayback/Archiveallows this (thanks [Wayback/Archive] wmz and [Wayback/Archive] ofiris).

Now the missing link: granting the user the [Wayback/Archive] “Log on as a service” privilege as a [Wayback/Archivelogon right (SeServiceLogonRight). Is there a command for this? Or a simple script for PowerShell?

(I know only Local Service can do this out of the box, and [Wayback/Archiveno other accounts by default are, but I want to have control over the account and what other privileges that account has).

Edit: solved. Thanks [Wayback/Archive] Mathias R. Jessen.

Here is the solution, including a few comments.

The easiest way to do this from a command line is definitely using NTRights.exe from the Windows Server 2003 Resource Toolkit.

ntrights +r SeServiceLogonRight -u jeroen -m \%COMPUTERNAME%

I changed the command-line a bit:

ntrights +r SeServiceLogonRight -u %USERNAME% -m \%COMPUTERNAME%

Note that

whoami /all

doesn’t show any change (not even after a reboot, it does not matter if you run it with or without UAC token).

secpol.msc

does show the change however, and does not require UAC (follow the tree to “Security Settings -> Local Policies -> User Rights Management -> Log on as a service” to see the users having the permission).

–jeroen

via: [Wayback/Archive] Easiest way to grant “Log on as a service” to a Windows user from the command-line? – Super User.

PS: Later I found out it is way easier to query the right:

accesschk.exe /accepteula -q -a SeServiceLogonRight

It will list the users having that right, for instance:

        IIS APPPOOLClassic .NET AppPool
        NT SERVICEALL SERVICES
        VCS-CIContinuaCI

There are similar rights one might want to query:

SeBatchLogonRight
SeDenyBatchLogonRight
SeInteractiveLogonRight
SeDenyInteractiveLogonRight
SeServiceLogonRight
SeDenyServiceLogonRight
SeNetworkLogonRight
SeDenyNetworkLogonRight

Thanks [Wayback/Archivetwasbrillig for explaining that at as answer to [Wayback/Archivepowershell – How to view user privileges using windows cmd? – Stack Overflow

Posted in Batch-Files, CommandLine, Development, Power User, PowerShell, Scripting, Software Development, Windows, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Vista | Leave a Comment »

Building URLs to Old WordPress.com Stats (from a date in the past; via: Planet Botch)

Posted by jpluimers on 2014/04/28

Every once in a while you want to browse back to WordPress visitor stats from a while ago.

Well, you can hand-build your URLs like this:

Stats at the end of last year for the default WordPress.com blog:

The Old WordPress.com Stats – How to Access Them | Planet Botch post explains how to do this for non-default blogs as well.

–jeroen

via: Old WordPress.com Stats – How to Access Them | Planet Botch.

Posted in Power User, SocialMedia, WordPress | Leave a Comment »

C# and VB are open sourced | Fabulous Adventures In Coding

Posted by jpluimers on 2014/04/27

Reminder to self:

  1. Watch the relevant Channel 9 videos.
  2. Sync the Roslyn repository regularly.

–jeroen

via: C# and VB are open sourced | Fabulous Adventures In Coding.

Posted in .NET, C#, C# 6 (Roslyn), Development, Software Development | Leave a Comment »

On my buying list: The WOZPAK Special Edition (1978 Apple I/II materials digitally enhanced)

Posted by jpluimers on 2014/04/27

At USD 50, this seems like a bargain for Apple I / Apple II lovers.

From the The WOZPAK Special Edition – Overview page:

In 1978, The WOZPAK was a 300 page technical manual produced by Apple Pugetsound Program Library Exchange.  The poor resolution of copy machines and fax machines of the era made The WOZPAK an illegible and challenging to use collection of handwritten and typed notes.  This collection as a whole was provided to the A.P.P.L.E. by Apple Computer, Inc. co-founder Steve Wozniak and then company president Mike Scott.  

Thanks to the encouragement of a number of computer industry legends, and the efforts of Apple historians, Brian Wiser and Bill Martens, we now have a completely refurbished and dramatically enhanced version of The WOZPAK.  The WOZPAK Special Edition comes complete with the original materials from The WOZPAK and The WOZPAK II as well as some new materials provided by Apple legends from their personal libraries.

–jeroen

via: The WOZPAK Special Edition – Overview.

Posted in //e, 6502, Apple, Apple Pascal, Apple ][, Assembly Language, Development, History, Pascal, Power User, Software Development | Leave a Comment »

How Do Young Go-Getters Get With Old Git? (via: Dr. Dobb’s – Google+)

Posted by jpluimers on 2014/04/25

Interesting:

How Do Young Go-Getters Get With Old Git?

fournova launches Git learning platform — from command-line interface to GUI

–jeroen

via: Dr. Dobb’s – Google+ – How Do Young Go-Getters Get With Old Git?….

Posted in Development, DVCS - Distributed Version Control, git, Source Code Management | Leave a Comment »