Author Archives: Berend de Jong

Configure crond on your PlayonHD from A.C. Ryan

OLYMPUS DIGITAL CAMERATwo weeks ago I bought a PlayonHD put together by A.C. Ryan. When I bought the box I was not aware of the fact that I bought a little Unix box. It turns out that you can telnet to the box and have a complete Linux system at your hands: it is called BusyBox.
Knowing that, I was wondering, if it was possible to backup (part of) the internal harddrive (2TB) periodical to a USB connected harddrive.

I knew this should be possible with the crond deamon; this tool takes care for executing a command every given time.

Out of the box my Playonhd Busybox version did not have a crond deamon compiled in. Luckily I could find one on the internet here (use save as and copy onto your PlayonHD).

For a list of commands available within the BusyBox you use take a look here.

The crond file should be created in

/tmp/spool/cron/crontabs/[uname]

uname is probably root.

Example contents (every minute a echo to the specified file; take a look here to examine the crontab file format):

* * * * * echo “some text” >> /var/crondtest_bdej

Start the crond daemon with:

./busybox1.16.1 crond

(execute this in the diretcory where your new busybox bin is saved.

Now instead of this simple echo comand specify your copy commands here and voila; you can automatically backup your data to a USB drive.

To share your USB drive on the network edit your SAMBA configuration file; this file is stored at /usr/local/etc/package/samba/lib and is called smb.conf

Add the following to the end of the configuration file

[USB1]
path=/tmp/usbmounts/sdb1
hide dot files=yes
hide files=/.*/lost+found/
guest ok=yes
writable=yes
force create mode=0775
force directory mode=0775

The USB drive is visible on the network with the name USB1.

Share

MSBuild notes

To examine what types of values the well-known metadata returns, take a look at the example below:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <PrjFile Include="Helloworld.proj" />
  </ItemGroup>
  <Target Name="Well known metadata">
    <Message Text="%40(PrjFile->'%25(Fullpath)'):@(PrjFile->'%(Fullpath)')"/>
    <Message Text="%40(PrjFile->'%25(Rootdir)'):@(PrjFile->'%(Rootdir)')"/>
    <Message Text="%40(PrjFile->'%25(Filename)'):@(PrjFile->'%(Filename)')"/>
    <Message Text="%40(PrjFile->'%25(Extension)'):@(PrjFile->'%(Extension)')"/>
    <Message Text="%40(PrjFile->'%25(RelativeDir)'):@(PrjFile->'%(RelativeDir)')"/>
    <Message Text="%40(PrjFile->'%25(Directory)'):@(PrjFile->'%(Directory)')"/>
    <Message Text="%40(PrjFile->'%25(RecursiveDir)'):@(PrjFile->'%(RecursiveDir)')"/>
    <Message Text="%40(PrjFile->'%25(Identity)'):@(PrjFile->'%(Identity)')"/>
    <Message Text="%40(PrjFile->'%25(ModifiedTime)'):@(PrjFile->'%(ModifiedTime)')"/>
    <Message Text="%40(PrjFile->'%25(CreatedTime)'):@(PrjFile->'%(CreatedTime)')"/>
    <Message Text="%40(PrjFile->'%25(AccessedTime)'):@(PrjFile->'%(AccessedTime)')"/>
  </Target>
</Project>
Share

How to Retrieve image from Windows Live Album

namespace WindowsFormsApplication1
{
    using System;
    using System.ComponentModel;
    using System.Net;
    using System.Windows.Forms;

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string url =  http://public.blu.livefilestore.com/xyz/012.jpg";
            WebClient client = new WebClient();
            client.Proxy.Credentials =  new NetworkCredential("uname", "upwd", "udomain");
            client.DownloadFileCompleted += 
               new AsyncCompletedEventHandler(client_DownloadFileCompleted);
            client.DownloadFile(new Uri(url), @"c:localfile.jpg");
        }

        void client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
        {
            MessageBox.Show("Download completed");
        }
    }
} 
Share

SSL and Certificates for IIS6.0

Installation of certificates in Windows 2003; you will be your own Certicate Authority.

Install the necessary software:

Internet Information Server
Certificate Services (for making your own certificates)
After installation a Default WebSite is created (check with inetmgr). This website contains a virtual directory called CertServ.

A CA can process certificate requests; browse to the URL http://ServerName/CertServ. On this site you can also retrieve the CA certificate.

Request a certicate
Start inetmgr
Create a new website e.g. SSLWebSite. Leave everything default

Share

TFS Commands Tips and Tricks part 1

Below are some TFS commands and tips that might be useful:

Delete a build:

tfsbuild.exe delete http://:8080 “” “” /noprompt

Delete a label:

tf label /server:http://:8080 @ /delete

Delete a TeamProject (be careful):

TfsDeleteProject.exe /q /server: /force

Tip: The reporting site is not properly deleted! Go to http://servername/Reports; click on “Show details”; check the teamproject and press delete.

Check your latest warehouse run:
In the database TfsWarehouse a table dbo._Warehouseconfigexists. Check the row with IDLastProcessTimeStamp

Stop a running build (TFS2005):
Go to your buildserver and navigate to the directory Program filesMicrosoft Visual Studio 8Common7IDE; start the command:

tfsbuild.exe stop “>teamproject>” “”

You can remove the build with

tfsbuild.exe delete “” “”

Deleting the TeamProject does not delete the Report or the WSS site (location on wss server is http://localhost/sites/[TEAMPROJECTNAME]. You can delete this components in their respective programs.

All sharepoint sites defined on the server can be retrieved from the SQL table: STS_Config_TFS.dbo.sites

Share

Team Foundation Server Single Server installation

This is a very basic Team Foundation install. It is a Single Server install; Application Tier and Database Tier all on a single machine.

  1. Install Windows 2003 SE including IIS / ASP.NET.
  2. Install SQL Server 2005 Enterprise Edition:
    1. On the Components to Install page, select the following components, and then click Advanced; select:
      SQL Server Database Services.
      Analysis Services.
      Reporting Services.
      Integration Services.
      Workstation components, Books Online, and development tools.
    2. On the Feature Selection page (after pressing Advanced), expand the following nodes and specify the following options.
    3. Under Database Services, click the icon for Replication and select Entire feature will be unavailable.
    4. On the Instance Name page, select Default instance, and then click Next.
    5. In “Start services at the end of setup”, select all services: SQL Server, SQL Server Agent, Analysis Services, Reporting Services, and SQL Browser,and then click Next.
    6. On the Authentication Mode page, select Windows Authentication Mode, and then click Next.
    7. On the Collation Settings page, select the appropriate collation for your language, and then click Next.
    8. On the Report Server Installation Options page, select Install the default configuration, and then click Next.
    9. On the Error and Usage Report Settings page, you can optionally select Automatically send Error reports for SQL Server 2005 to Microsoft or your corporate error reporting server and Automatically send Feature Usage data for SQL Server 2005 to Microsoft, and then click Next.
    10. On the Ready to Install page, you can review the list of components to be installed, and then click Install.
  3. Install the latest Service Pack for SQL Server.
  4. Install the SqlServerKB update located on the TFS cd in the root folder.
  5. Installing the Microsoft .NET Framework 2.0 Hotfix located on the TFS cd in the KB913393 folder.
  6. Installing Microsoft Windows SharePoint Services (http://go.microsoft.com/fwlink/?linkid=55087)
    CAUTION Install for Server Farm!
  7. Create users:
    ?TFSREPORTS
    ?TFSSERVICE
  8. Ensure IIS is installed on your server.
  9. Install Team Foundation Server itself.
  10. Install the Build component of TFS in the Build directory on the cd (use the TFSSERVICE account for the installation).
  11. Install the Team Explorer on your TFS/SQL machine.
  12. Start Visual Studio 2005.
  13. Choose Tools -> Connect to Team Foundation Server…
  14. Give the TFSSERVICE user access to the Team Foundation server:
  15. Right-click the servername in the Team explorer.
  16. Select “Team Foundation Server settings”.
  17. Select “Group Member Ship…”.
  18. Select the group “SERVERTeam Foundation Licensed Users”.
  19. Select Properties.
  20. Select in the Add member group “Windows user or group”.
  21. Add the TFSSERVICE user. (see also http://blogs.msdn.com/vstsue/articles/556043.aspx).
  22. Create a share on the buildserver e.g. BuildDrop.
  23. Create a build directory on the buildserver e.g. BuildDir.
  24. Create a team project with a solution in it. Create a team build type and build it.

That’s all

Share