Friday

make ubuntu business casual

to make ubuntu business casual - make it black remove background:
         

gsettings set org.gnome.desktop.background picture-options 'none'
gsettings set org.gnome.desktop.background picture-uri ''
gsettings set org.gnome.desktop.background primary-color '#000000'
gsettings set org.gnome.desktop.background color-shading-type 'solid'

Wednesday

here is powershell script on how to get list of files from changesets associated with one tfs task

  
$dllPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer"
Add-Type -Path "$dllPath\Microsoft.TeamFoundation.Client.dll"
Add-Type -Path "$dllPath\Microsoft.TeamFoundation.WorkItemTracking.Client.dll"
Add-Type -Path "$dllPath\Microsoft.TeamFoundation.VersionControl.Client.dll"

# Connect to TFS
$tfsUri = "https://tfs2.domain.net/tfs/project"
$username = "DOMAIN1\user1"     # or just "your-username" if no domain
$password = "-password-here"

# Create secure credentials
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force
$credentials = New-Object System.Net.NetworkCredential($username, $securePassword)

# Create TFS connection using credentials
$uri = New-Object System.Uri($tfsUri)
$tfs = New-Object Microsoft.TeamFoundation.Client.TfsTeamProjectCollection($uri, $credentials)

$tfs = [Microsoft.TeamFoundation.Client.TfsTeamProjectCollection]::new($tfsUri)
$tfs.EnsureAuthenticated()

# Get services
$workItemStore = $tfs.GetService([Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore])
$versionControl = $tfs.GetService([Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer])

# Get work item (replace with your Task ID)
$workItem = $workItemStore.GetWorkItem(29574)

$dict=@{}
# Loop over links to find associated changesets
foreach ($link in $workItem.Links) {
    if ($link -is [Microsoft.TeamFoundation.WorkItemTracking.Client.ExternalLink] -and
        $link.ArtifactLinkType.Name -eq "Fixed in Changeset") {

        $csId = [int]($link.LinkedArtifactUri -replace ".+changeset\/", "")
        $changeset = $versionControl.GetChangeset($csId)

        #Write-Output "Changeset $csId"
        foreach ($change in $changeset.Changes) {
            #Write-Output " - $($change.Item.ServerItem)"
            $key=$change.Item.ServerItem
            if (-not $dict.ContainsKey($key)) {
                $dict[$key] = $csId
}
            }
    }
}
foreach ($key in $dict.Keys) {
    #Write-Output "$key : $($dict[$key])"
    Write-Output $key
    Add-Content -Path "output.txt" -Value $key
}

Thursday

test smtp server with powershell

Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body "Hi, this is a test email sent via PowerShell to test the STMP relay server"

Wednesday

add new fields to csv file using powershell


$z = Import-Csv zerotrac.csv
$nums= Import-Csv allleetcode.csv
$md=@{}
#converting one csv into hashmap for quicker search
foreach($r in $nums){
    $md.add($r.frontendQuestionId,$r)
}

foreach($r in $z){
    $nr=$md[$r.id]
    if ($nr){
     $r | Add-Member -MemberType NoteProperty -Name "isPaidOnly" -Value $nr.isPaidOnly
     $r | Add-Member -MemberType NoteProperty -Name "difficulty" -Value $nr.difficulty
     $r | Add-Member -MemberType NoteProperty -Name "topicTags" -Value $nr.topicTags

}

}


$z | Export-Csv -Path "C:\temp\newzerotrac1.csv" -NoTypeInformation

Saturday

how to configure server while Running sql and BizTalk on same server

XML viewer to see Biztalk XML messages and convert them into excel or word documents:

When running SQL Server and BizTalk Server on the same machine, it’s crucial to configure both to ensure optimal performance and avoid resource contention. Here are some best practices and configuration steps to follow:

1. Hardware Considerations

  • Memory (RAM): Ensure you have adequate memory, ideally 16 GB or more. SQL Server and BizTalk are both memory-intensive applications, so having sufficient RAM is essential.
  • CPU: Multi-core processors are recommended, ideally at least 4 cores. Assign CPU affinity if necessary to allocate specific cores to each application.
  • Disk Storage: Use separate physical disks (or separate logical partitions if physical separation isn’t possible) for BizTalk’s database files, log files, and BizTalk’s tracking data. This separation minimizes I/O contention.

2. SQL Server Configuration

  • Limit SQL Server Memory Usage: To prevent SQL Server from consuming all available memory, set a maximum memory limit for SQL Server. Go to SQL Server Properties -> Memory and set a reasonable cap (e.g., if you have 16 GB, allocate 8-10 GB for SQL).
  • Configure TempDB: TempDB can be heavily utilized by BizTalk, so ensure it has multiple data files (one per CPU core, up to 8 files). Each should be set to the same initial size and auto-growth increment.
  • Optimize Disk I/O: Place data files and log files on separate drives, if possible, to reduce contention. If the machine uses SSDs, this will significantly improve performance.
  • Backup and Maintenance Plans: Regularly back up BizTalk databases, and configure SQL Server Agent jobs to manage and maintain indexes and statistics, especially for message box and tracking databases.
  • Disable Unnecessary SQL Server Features: Turn off features that BizTalk doesn’t need, such as SQL Agent jobs unrelated to BizTalk, unnecessary SQL Server features, or components.

3. BizTalk Server Configuration

  • Optimize Host Instances: Separate processing, tracking, and adapter communication into different hosts to avoid performance bottlenecks.
    • In-process hosts: For orchestration processing and message processing.
    • Receive hosts: For receiving adapter processing.
    • Send hosts: For sending adapter processing.
  • Configure Throttling Settings: Adjust BizTalk throttling settings in the Administration Console to optimize memory and CPU usage, particularly if the server is under heavy load.
  • Disable Tracking (if not required): Disable tracking for specific hosts if it’s not needed to save disk space and reduce CPU usage.
  • Limit Maximum Message Size: Set maximum message sizes for BizTalk to avoid excessively large messages slowing down processing or overwhelming SQL.

4. Operating System and Network Configuration

  • Power Settings: Set the server’s power plan to High Performance to avoid CPU throttling.
  • Disk Write Caching: Enable write caching on the disk but be cautious; ensure the server has UPS protection as write caching can cause data loss if there’s a sudden power failure.
  • Network Optimization: Use dedicated network interfaces for SQL Server and BizTalk network traffic if possible. This helps avoid network contention on a single interface.
  • Firewall and Security Settings: Ensure proper firewall rules are in place to allow only necessary traffic to SQL and BizTalk services.

5. BizTalk Database Maintenance

  • BizTalk Database Jobs: Enable and regularly monitor BizTalk’s built-in SQL jobs, such as Backup BizTalk Server (BizTalkMgmtDb), DTA Purge and Archive (BizTalkDTADb), and MessageBox_Message_Cleanup_BizTalkMsgBoxDb. These jobs help maintain database health and performance.
  • MessageBox and Tracking Database Size: Keep the BizTalkMsgBoxDb and BizTalkDTADb databases at optimal sizes. Purge data regularly, especially if tracking is enabled, to prevent database growth from impacting performance.

6. Monitor Performance Regularly

  • Use Performance Monitor (PerfMon) to track critical counters, such as:
    • BizTalk: Messaging Database Size, Host Throttling State
    • SQL Server: Buffer Cache Hit Ratio, Page Life Expectancy, Batch Requests/Sec
    • System: CPU Usage, Available Memory, Disk I/O
  • Implement alerts for critical counters so you can take action before performance issues arise.

7. Consider Virtualization and Licensing

If SQL Server and BizTalk are sharing a virtualized environment, consider separating them into different VMs to allow easier scaling and isolation. Also, review SQL and BizTalk licensing requirements to ensure compliance when running both on the same server.

By following these steps, you can run SQL Server and BizTalk Server on the same machine in a way that minimizes resource contention, ensuring smooth operations.

Tuesday

BinBuilder - equivalent of StringBuilder for binary objects

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


public class BinBuilder
{

    public BinaryWriter writer;
    public MemoryStream requestMemoryStream = new MemoryStream();

    public BinBuilder(string a)
        : this(ASCIIEncoding.Default.GetBytes(a))
    {
    }

    public  BinBuilder(byte[] init):this()
    {
        writer.Write(init);
    }

    public void Append(ushort us)
    {
        this.Append(BitConverter.GetBytes(us));
    }

    public void AppendCRC(ushort us)
    {
        var a=BitConverter.GetBytes(us);
        writer.Write(a[1]);
        writer.Write(a[0]);
    }

    public void Append(char us)
    {
        this.Append(BitConverter.GetBytes((ushort)us));
    }


    public void Append(byte[] init)
    {
        writer.Write(init);
    }


    public BinBuilder()
    {
        writer = new BinaryWriter(requestMemoryStream);
    }

    public byte[] ToArray()
    {
        writer.Flush();
        return requestMemoryStream.ToArray();
    }

}

tsql SEQUENCE create usage and list of current values


CREATE SEQUENCE dbo.GenericSequenceNumber
AS INT
 START WITH 1
 INCREMENT BY 1
 MINVALUE 1
 MAXVALUE 999999
 CYCLE ;
GO

--usage
SELECT NEXT VALUE FOR dbo.bbGenericSequenceNumber


--to list all of sequesnces inlcuding their values do:
SELECT
  name,
  cast(start_value AS NUMERIC)   AS start_value,
  cast(increment AS NUMERIC)     AS increment,
  cast(current_value AS NUMERIC) AS current_value
FROM sys.sequences;

Friday

Fix Error 0x800F0954 Installing .NET Framework 3.5 or Any Optional Feature

[Fix] Error 0x800F0954 Installing .NET Framework 3.5 or Any Optional Feature

If the error 0x800f0954 occurs installing optional Windows features, it may be because the system is unable to access the Windows Update server. This is especially true in case of domain-joined computers which is configured to downloads updates from a WSUS server. It could also be possible that your computer was once a part or a corporate or domain network and the group policy setting is still in place.

Method 1: Bypass WSUS to Install Features/Updates Directly from Windows Update

To fix the problem, temporarily bypass WSUS server using the following registry edit (requires administrator privileges).

  1. Right-click Start, and click Run
  2. Type regedit.exe and click OK
  3. Go to the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
  4. On the right-pane, if the value named UseWUServer exists, set its data to 0
  5. Exit the Registry Editor
  6. Restart Windows.

Sunday

imagemagic add text to image

rem different types of text annotations on existing images
rem cyan yellow orange gold 
rem -gravity SouthWest
rem draw text and annotate
rem C:\me\tools\magic\convert.exe  -fill cyan -pointsize 120 -gravity center -draw "text 0,300 '%~1' "   %2  out%2
rem  C:\me\tools\magic\convert.exe %2  -undercolor white -pointsize 120 -gravity SouthWest -fill cyan  -annotate 0      %1 out%2

rem - klasnij horizontal append
rem C:\me\tools\magic\convert.exe %2  -background white -pointsize 120 label:%1  -gravity Center -append    out%2
rem C:\me\tools\magic\convert.exe %2 ( -size 600x -background red -fill black label:%1 -rotate 90 -trim +repage ) -gravity west -geometry +20+0 -composite out%2 
rem wow pashe vertical append 
rem C:\me\tools\magic\convert.exe %2 ( -size 1000x -background white -fill black label:%1 -rotate 90 -trim +repage ) -gravity east  +append out%2 

rem changing image size with horisontal append 
rem C:\me\tools\magic\convert.exe %2 ( -size 1500x -background white -fill black label:%1  -trim +repage ) -gravity east  +append out%2 

rem cool annotation with changing image size 
C:\me\tools\magic\convert.exe %2 ( -size 1500x -background white -fill black label:%1  -trim +repage ) -gravity center -append out%2

note that %~1 is command line argument without double quotes.

Wednesday

powershell compare two csv files and output differences

 I had to compare data returned from two APIs - one JSON another XML so

1. I used this  viewer to convert json to csv and this app to save xml to csv

2. I used this PowerShell to show difference between two csv files:


Start-Transcript -Path result-10.csv


$mas = Import-Csv 1.csv
$marko = Import-Csv 2.csv

$md=@{}
#converting one csv into hashmap for quicker search
foreach($r in $mas){
    foreach($a in $r.psobject.properties){
        $fn=$a.name
        $val=$a.value
        $md.Add($fn.ToLower(),$val)
    }
}

echo "fieldName,csv1,csv2"

    foreach($r in $marko){
        foreach($a in $r.psobject.properties){

            $k=$a.name.replace("_","").toLower()
            if ($md.ContainsKey($k)){
                if ($md[$k] -ne $a.value){
                  echo "$($a.name),$($a.value),$($md[$k])"
                }
            }
        }
    }
Stop-Transcript

tmux session management

In tmux, you can create a new session using the tmux command followed by the new-session command. Here's the basic syntax:

bash
tmux new-session -s session_name

Replace session_name with the desired name for your new session. If you don't specify a name, tmux will assign a default name.

Here are a few examples:

  1. To create a new session named "mysession":

    bash
  • tmux new-session -s mysession
  • To create a new session without specifying a name:

    bash
    1. tmux new-session

    After running the new-session command, you will be switched to the new session. You can then use tmux commands to manage and navigate between sessions.

    Here are some useful tmux session management commands:

    • Switching between sessions:

      • Switch to the last session: tmux switch-client -n
      • Switch to a specific session by name: tmux switch-client -t session_name
    • Listing sessions:

      • List existing sessions: tmux list-sessions or tmux ls
    • Detaching from a session:

      • Detach from the current session (leave it running in the background): tmux detach-client
    • Attaching to a session:

      • Attach to the last session: tmux attach
      • Attach to a specific session by name: tmux attach -t session_name
    • Killing a session:

      • Kill a session: tmux kill-session -t session_name

    Remember that you can customize the key bindings and create scripts to simplify these commands based on your preferences. To customize tmux behavior, you can add configurations to your ~/.tmux.conf file.

    Tuesday

    what is best javascript framework for showing large grids of data (research)

    As of my last knowledge update in January 2022, some popular JavaScript frameworks and libraries for displaying large grids of data include:

    1. Ag-Grid:

      • Description: Ag-Grid is a feature-rich data grid that is highly customizable and optimized for large datasets. It supports a wide range of features such as sorting, filtering, grouping, and virtual scrolling.
      • Website: Ag-Grid
    2. React Data Grid:

      • Description: React Data Grid is part of the AdapTable library and is built specifically for React applications. It offers features like sorting, filtering, and customizable cell rendering.
      • Website: React Data Grid
    3. Handsontable:

      • Description: Handsontable is a data grid library that provides a spreadsheet-like interface. It supports features like sorting, filtering, and data validation.
      • Website: Handsontable
    4. SlickGrid:

      • Description: SlickGrid is a fast, customizable, and lightweight grid control. It's designed for handling large amounts of data with features like sorting, filtering, and cell editing.
      • GitHub: SlickGrid
    5. Vue Table Component:

      • Description: Vue Table Component is a simple and lightweight grid component for Vue.js. It allows you to display data with features like sorting and pagination.
      • GitHub: Vue Table Component
    6. DataTables:

      • Description: DataTables is a jQuery-based plugin that provides a flexible and feature-rich solution for displaying data in tables. It supports server-side processing for handling large datasets.
      • Website: DataTables
    7. Angular Material Table:

      • Description: Angular Material provides a table component that is well-integrated with Angular. It supports features like sorting, pagination, and filtering.
      • Documentation: Angular Material Table

    Keep in mind that the "best" framework or library depends on your specific requirements, such as the framework you are using (React, Angular, Vue, etc.) and the features you need. Additionally, the landscape may have evolved, and new libraries may have been introduced since my last update. Always check the latest documentation and community feedback to make an informed decision.

    Saturday

    midnight commander shortcuts cheatsheet

     In the shortcuts below, "C" stands for CTRL and "A" stands for "ALT". This is a convention

    used in the Midnight Commander documentation and was kept here.
    
    You can also use "ESC" instead of "ALT", which is useful on Macbooks.
    
    Main View
    ---------------------------------------------------------------
    - File/directory operations
        F3                        View file
        Shift + F3                View raw file (disregard extension)
        F5                        Copy selected files
        F6                        Move selected files
        Shift + F6                Rename file under cursor
        Shift-F4                  Create a new file
        C-x d                     Compare directories
        C-x c                     Chmod dialog
        C-x o                     Chown dialog
        C-x C-s                   Edit symlink
        C-x s                     Create symlink dialog
        C-x l                     Create hard link dialog
        C-x v                     Run relative symbolic link tool on selected or tagged items
        C-x a                     List active VFS directories
    
    - Selection
        Insert / C-t              Select/deselect file
        *                         Invert selection on files
        +                         Specify file selection options (including custom pattern)
        -                         Same as above, but for deselecting
    
    - Navigation
        TAB /  / C-i              Jump from one panel to the other
        F9                        Select the top menu bar
        Esc Esc                   Quickly dismiss menus/pop-ups (skip the timeout for "Single press" from the configuration)
        A-c                       Quick cd dialog
        A-?                       Search dialog
        C-s                       Search for item
        A-s                       Incremental search (A-s again to jump to next occurence)
        A-y                       Move to the previous directory in the directory history
        A-u                       Move to the next directory in the directory history
        A-Shift-h                 Show path history
        C-\                       Directory Hotlist
        C-p / Up arrow            Move selection bar to the previous entry in the panel
        C-n / Down arrow          Move selection bar to the next entry in the panel
        A-g                       Move selection bar to the first visible item in the panel
        A-r                       Move selection bar to the middle item in the panel
        A-j                       Move selection bar to the last visible item in the panel
        A-v / Page up             Move selection bar one page up
        A-p / Page down           Move selection bar one page down
        A-< / Home                Move selection bar to the top (first entry)
        A-> / End                 Move selection bar to the bottom (last entry)
    
    - Display
        C-r                       Refresh current panel
        C-u                       Swap panels
        A-,                       Toggle panel layout (horizontal/vertical)
        C-x i                     Toggle other panel to information mode
        C-x q                     Toggle other panel to quick view mode
        A-i                       Make the other panel show the same directory as the current
        A-o                       Display the contents of the highlighted dir in the other panel
        A-t                       Change panel view (full, brief, long)
        A-.                       Toggle "Show Hidden Files" feature
    
    - Command prompt
        C-o                       Drop to the console
        A-Enter                   Put the name of the highlighted file on command line
        C-x t                     Put the name of the selected items on command line
        C-Shift-Enter             Put the full path of the highlighted file on command line
        A-a / C-x p               Put the full path of the pane directory on the command line
        A-h                       Show command history
        A-n / A-p                 Navigate up/down through the command history
        C-x !                     External Panelize (fill current panel with the output of a command)
        C-x j                     Show background jobs
        F2-@                      Run a command on the currently highlighted item, e.g.:
            F2-@ unzip                Unzip selected file
            F2-@ zip -r foo.zip       Zip current directory as foo.zip
            F2-@ 7za x                Extract selected file with 7zip
            F2-@ 7za a foo.7z         7zip current directory as foo.7z
    
    - Others
        Shift-F10                 Quiet exit, without confirmation
    
    
    File View
    ---------------------------------------------------------------
        C-f                           View the next file
        C-b                           View the previous file

    Tuesday

    How to add subsections in 'for xml' sql statement

    SELECT 
        O.OrderID AS '@OrderID',
        O.OrderDate AS '@OrderDate',
        (
            SELECT
                OD.ProductID AS '@ProductID',
                OD.Quantity AS '@Quantity'
            FROM OrderDetails OD
            WHERE OD.OrderID = O.OrderID
            FOR XML PATH('OrderDetail'), TYPE
        ) AS 'OrderDetails'
    FROM Orders O
    FOR XML PATH('Order'), ROOT('Orders')
    

    result

    
    
    <Orders>
      <Order OrderID="1" OrderDate="2023-01-01">
        <OrderDetails>
          <OrderDetail ProductID="101" Quantity="3" />
          <OrderDetail ProductID="102" Quantity="2" />
        </OrderDetails>
      </Order>
      <!-- More Order elements -->
    </Orders>
    

    there is a way to have OrderDetail as elements:

    SELECT 
        O.OrderID AS '@OrderID',
        O.OrderDate AS '@OrderDate',
        (
            SELECT
                OD.ProductID AS 'ProductID',
                OD.Quantity AS 'Quantity'
            FROM OrderDetails OD
            WHERE OD.OrderID = O.OrderID
            FOR XML PATH('OrderDetail'), TYPE
        )
    FROM Orders O
    FOR XML PATH('Order'), ROOT('Orders')
    
    <Orders>
      <Order OrderID="1" OrderDate="2023-01-01">
        <OrderDetail>
          <ProductID>101</ProductID>
          <Quantity>3</Quantity>
        </OrderDetail>
        <OrderDetail>
          <ProductID>102</ProductID>
          <Quantity>2</Quantity>
        </OrderDetail>
      </Order>
      <!-- More Order elements -->
    </Orders>
    

    Wednesday

    sql server studio managemenet studio cutting very long data from the field, how to get complete data ?

    Export Data to a File:If you need to work with a large amount of data, consider exporting the data to a file using the "Save Results As" option. This way, you can save the complete data to a file and view it externally.

    create report with max length of elements in json array

    this script will create table of max length of array fields in test.txt json file.
    <html>
    <head>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"> </script>
    
    <script>
    var d1;
    var mt ={};
    var md ={};
        $(function() {
       $.getJSON('/test.txt', function(data) {
            d1=data;
            for (let i = 0; i < d1.length; i++) {       
                let ob=d1[i];
                for (prop in ob) {
                    if (!mt[prop]){
                        mt[prop]=0;
                        md[prop]="";
                    }
                    if (mt[prop] < ob[prop].length){
                        let s=ob[prop];
                        mt[prop]= s.length; 
                        md[prop]= s;
                    }       
                    //  console.log(prop + "has value: " + ob[prop]);
                }
            }
          
            for (prop in mt) {
              var tblRow = "<tr>" + "<td>" + prop + "</td>" +
               "<td>" + mt[prop] + "</td>" + "<td>" + md[prop] + "</td>" + "</tr>"
               $(tblRow).appendTo("#userdata tbody");
            }
       
       
       });
    
    });
    </script>
    </head>
    
    <body>
    
    <div class="wrapper">
    <div class="profile">
       <table id= "userdata" border="2">
      <thead>
                <th>field name </th>
                <th>max length</th>
                <th>example</th>
            </thead>
          <tbody>
    
           </tbody>
       </table>
    
    </div>
    </div>
    
    </body>
    </html>
    
    
    you can install LiveServer VsCode plugin in order to get this html working also I would change internal code a little to accommodate digital values and possible nulls and -1 to indicate field doesn't have value , here is my script
    <script>
    var d1;
    var mt ={};
    var md ={};
        $(function() {
       $.getJSON('/nutrition.txt', function(data) {
            d1=data.nutrition;
            console.log("loaded" +d1.length);
            for (let i = 0; i < d1.length; i++) {       
                let ob=d1[i];
                for (prop in ob) {
                    
                    if (!mt[prop]){
                        mt[prop]=-1;
                        md[prop]="";
                    }
                    if (!ob[prop]) continue;
    
                    if (mt[prop] < (""+ob[prop]).length){
                        let s=""+ob[prop];
                        mt[prop]= s.length; 
                        md[prop]= s;
                    }       
                    //  console.log(prop + "has value: " + ob[prop]);
                }
            }
          
            for (prop in mt) {
              var tblRow = "<tr>" + "<td>" + prop + "</td>" +
               "<td>" + mt[prop] + "</td>" + "<td>" + md[prop] + "</td>" + "</tr>"
               $(tblRow).appendTo("#userdata tbody");
            }
       
       
       });
    
    });
    </script>
    

    c# wcf logging

    from here, it's not perfect, but at least i can see internal API calls:
    <system.diagnostics>
      <sources>
        <source name="System.ServiceModel.MessageLogging">
          <listeners>
             <add name="messages"
                  type="System.Diagnostics.XmlWriterTraceListener"
                  initializeData="c:\temp\messages.svclog" />
            </listeners>
        </source>
      </sources>
    </system.diagnostics>
    
    <system.serviceModel>
      <diagnostics>
        <messageLogging
             logEntireMessage="true"
             logMalformedMessages="true"
             logMessagesAtServiceLevel="true"
             logMessagesAtTransportLevel="true"
             maxMessagesToLog="3000"
             maxSizeOfMessageToLog="2000"/>
      </diagnostics>
    </system.serviceModel>
    
    

    Saturday

    google spreadsheet macros to delete specific row

    /** @OnlyCurrentDoc */
    
    function del() {
    
      var sheet = SpreadsheetApp.getActiveSheet();
      var rows = sheet.getDataRange();
      var numRows = rows.getNumRows();
      var values = rows.getValues();
    
      var rowsDeleted = 0;
      for (var i = 0; i <= numRows - 1; i++) {
        var row = values[i];
        if (row[3] == '0ffb324737ee1cbf8c4ee2473665df9a' ) {
          // This searches all cells in columns A (change to row[1] for columns B and so on) and deletes row if cell is empty or has value 'delete'.
          sheet.deleteRow((parseInt(i)+1) - rowsDeleted);
          rowsDeleted++;
        }
      }
    
    };
    

    Wednesday

    Enable IIS 6 Metabase Compatibility using PowerShell

    Run powershell as admin and execute following comaands
    PS C:\Windows\system32> import-module servermanager
    PS C:\Windows\system32> install-windowsfeature web-metabase
    

    Friday

    mermaid diagram embedded into html page

    more examples here
          
    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="utf-8" />
      </head>
      <body>
        <pre class="mermaid">
      graph LR
          A --- B
          B-->C[fa:fa-ban forbidden]
          B-->D(fa:fa-spinner);
        </pre>
    <pre class="mermaid">
    erDiagram
              CUSTOMER }|..|{ DELIVERY-ADDRESS : has
              CUSTOMER ||--o{ ORDER : places
              CUSTOMER ||--o{ INVOICE : "liable for"
              DELIVERY-ADDRESS ||--o{ ORDER : receives
              INVOICE ||--|{ ORDER : covers
              ORDER ||--|{ ORDER-ITEM : includes
              PRODUCT-CATEGORY ||--|{ PRODUCT : contains
              PRODUCT ||--o{ ORDER-ITEM : "ordered in"
    </pre>
    
        <script type="module">
          import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@9/dist/mermaid.esm.min.mjs';
          mermaid.initialize({ startOnLoad: true });
        </script>
      </body>
    </html>
    
    

    make ubuntu business casual

    to make ubuntu business casual - make it black remove background: gsettings set org.gnome.desktop.background picture-options ...