ict.ken.be

Delivering solid user friendly software solutions since the dawn of time.

This section of the website is used as a technical dump and knowledge database. Plenty of times we run into issues we have seen before or problems that come back again and again. we plot down notes and check points, so we can come back here and use them as a reference. Do not expect long tutorials. Just the core things you need, nothing more.

Use any of this information carefully and at your own risk, but feel free to contact us if you spot any issues.

Stop Teamcity build when other build starts 

Categories: Windows

Most likely you want to stop running your long end-2-end tests when a new deployment is ready.
You will lose the correlation between when the error happened, but at least you can move on.
The easiest way to do this in Teamcity (as there is no support at this writing),
is to add an additional step before the deployment build configuration using the following powershell script.

So you basically cancel the test build configuration when the deployment starts.

$buildConfigurationId = '%E2ETestBuildConfigurationId%'
If (![string]::IsNullOrWhitespace($buildConfigurationId)) { 
    Write-Host "Finding test builds"
    $user = '%system.teamcity.auth.userId%'
    $pass = '%system.teamcity.auth.password%'
    $pair = "${user}:${pass}"
    $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair)
    $base64 = [System.Convert]::ToBase64String($bytes)
    $basicAuthValue = "Basic $base64"
    $headers = @{ Authorization = $basicAuthValue; "Content-Type" = "application/xml" }
    $response = Invoke-WebRequest -Uri "http://teamcity.conseur.org/app/rest/builds?locator=buildType:($buildConfigurationId),state:queued" -Method GET -Headers $headers
    $postParams = "<buildCancelRequest comment='Build was canceled because of new deployment.' readdIntoQueue='true' />"
    Foreach($buildId in ([xml]$response.Content).builds.build.id) 
    {
        Write-Host "Cancel queued buildId: $buildId"
        Invoke-WebRequest -Uri "http://teamcity.conseur.org/app/rest/buildQueue/id:$buildId" -Headers $headers -Method POST -Body $postParams
    }
    $response = Invoke-WebRequest -Uri "http://teamcity.conseur.org/app/rest/builds?locator=buildType:($buildConfigurationId),state:running" -Method GET -Headers $headers
    $postParams = "<buildCancelRequest comment='Build was canceled because of new deployment.' readdIntoQueue='false' />"
    Foreach($buildId in ([xml]$response.Content).builds.build.id) 
    {
        Write-Host "Cancel running buildId: $buildId"
        Invoke-WebRequest -Uri "http://teamcity.conseur.org/app/rest/builds/id:$buildId" -Headers $headers -Method POST -Body $postParams
    }
}

Jekyll regeneration does not stop 

Categories: Visual Studio

Most likely your editor is writing settings to the folder you are running Jekyll from. For example, try running 'jekyll serve' and then open the folder with Visual Studio 2017 and you will see it starts regenerating.

Command line showing Jekyll regenerating issue

Developer tools show only custom window properties 

Categories: Javascript

You can run this code in your browser console and then add a watch for the windowCustomized variable. It will have only custom added window properties or leaks.

windowCustomized = {};
var iframe = document.createElement('iframe');
iframe.onload = function() {
var standardGlobals = Object.keys(iframe.contentWindow);
for(var b in window) {
const prop = window[b];
if(window.hasOwnProperty(b) && prop && !prop.toString().includes('native code') && !standardGlobals.includes(b)) {
windowCustomized[b] = prop;
}
}
//console.info(windowCustomized)
};
iframe.src = 'about:blank';
document.body.appendChild(iframe);
//inspect(windowCustomized);

Set network adaptor order for windows 7 or 2008R2 

Categories: Windows

You can re-order the priority of your network connestions through the adapter settings window, but you need to know the secret key...

Control Panel -> Network and Sharing Center -> Change adapter settings -> Press Alt Key to make the Advanced menu visible -> Advanced Settings.

0x80004005 - CIFS SMB Sambo Network Share Error 

Categories: Network

So you are using windows 2008r2 or any of it variants and you are trying to connect to a network share in some workgroup.

You get this unspecified error when your network adaptor does not include 'Client for Microsoft Networks', which is often forgotten when virtual network adaptors are created automatically.

  • Control Panel > Network and Sharing > Change Adaptor settings > Select your current network adaptor > Install > Client > Client for Microsoft Networks > OK > ... > restart or enable/disable network adaptor
Page 1 of 40 1 2 3 4 5 6 7 8 9 10 20 > >>