﻿<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>blog.kleczkowski.info</title>
  <id>http://blog.kleczkowski.info/</id>
  <subtitle>Blog about IT Technologies mainly C#, SQL, Angular</subtitle>
  <generator uri="https://blog.kleczkowski.info" version="1.0">blog.kleczkowski.info</generator>
  <updated>2021-08-22T18:02:00Z</updated>
  <entry>
    <id>http://blog.kleczkowski.info/2021/8/22/install-unif-controller-on-ubuntu</id>
    <title>install unif controller on Ubuntu</title>
    <updated>Sun, 22 Aug 2021 18:02:01 GMT</updated>
    <published>Sun, 22 Aug 2021 18:02:00 GMT</published>
    <link href="http://blog.kleczkowski.info/2021/8/22/install-unif-controller-on-ubuntu" />
    <author>
      <name>Jacek</name>
      <email>jacek@kleczkowski.info</email>
    </author>
    <category term="ubuntu" />
    <category term="unifi" />
    <content type="html">&lt;p&gt;&lt;em style="box-sizing: inherit; border: 0px solid rgba(0, 0, 0, 0.1); color: #666666; font-family: monospace, monospace; font-size: 10.2px;"&gt;rm unifi-latest.sh &amp;amp;&amp;gt; /dev/null;&amp;nbsp;&lt;/em&gt;&lt;span style="color: #666666; font-family: monospace, monospace; font-size: 10.2px; font-style: italic; background-color: rgba(0, 122, 255, 0.08);"&gt;wget https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh &amp;amp;&amp;amp; bash unifi-latest.sh&lt;/span&gt;&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>http://blog.kleczkowski.info/2019/12/16/change-powershell-codepage-to-utf8</id>
    <title>Change powershell codepage to UTF8</title>
    <updated>Mon, 16 Dec 2019 18:00:52 GMT</updated>
    <published>Mon, 16 Dec 2019 18:00:52 GMT</published>
    <link href="http://blog.kleczkowski.info/2019/12/16/change-powershell-codepage-to-utf8" />
    <author>
      <name>Jacek</name>
      <email>jacek@kleczkowski.info</email>
    </author>
    <category term="powershell" />
    <category term="tips" />
    <content type="html">&lt;p&gt;To change powershell console code page&amp;nbsp;&lt;/p&gt;
&lt;pre&gt;PS&amp;gt; CHCP 65001&lt;/pre&gt;
&lt;p&gt;Permament via reg file:&lt;/p&gt;
&lt;pre&gt;Windows Registry Editor Version 5.00&lt;br /&gt;[HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe]&lt;br /&gt;"CodePage"=dword:fde9&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>http://blog.kleczkowski.info/2019/11/21/git-hints</id>
    <title>git hints</title>
    <updated>Thu, 21 Nov 2019 19:31:08 GMT</updated>
    <published>Thu, 21 Nov 2019 19:31:08 GMT</published>
    <link href="http://blog.kleczkowski.info/2019/11/21/git-hints" />
    <author>
      <name>Jacek</name>
      <email>jacek@kleczkowski.info</email>
    </author>
    <category term="git" />
    <category term="merge" />
    <category term="pr" />
    <category term="pull-request" />
    <content type="html">&lt;p&gt;1. fetch PR into current branch&lt;/p&gt;
&lt;pre&gt;   git fetch origin refs/pull-requests/&lt;em&gt;&amp;lt;PR-id&amp;gt;&lt;/em&gt;/from:&lt;em&gt;new-branch-name&lt;br /&gt;&lt;/em&gt;&lt;/pre&gt;</content>
  </entry>
  <entry>
    <id>http://blog.kleczkowski.info/2019/8/20/multiline-echo-to-file</id>
    <title>Multiline echo to file</title>
    <updated>Tue, 20 Aug 2019 15:26:43 GMT</updated>
    <published>Tue, 20 Aug 2019 15:25:48 GMT</published>
    <link href="http://blog.kleczkowski.info/2019/8/20/multiline-echo-to-file" />
    <author>
      <name>Jacek</name>
      <email>jacek@kleczkowski.info</email>
    </author>
    <category term="echo" />
    <category term="eof" />
    <category term="linux" />
    <content type="html">&lt;pre&gt;&lt;code&gt;cat&lt;/code&gt;&lt;code&gt; &amp;lt;&amp;lt; EOF &amp;gt; /path_to_file&lt;/code&gt;&lt;br /&gt;multi&lt;br /&gt;line&lt;br /&gt;content&lt;br /&gt;&lt;code&gt;EOF&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>http://blog.kleczkowski.info/2018/10/19/openvpn-client-in-ubuntu</id>
    <title>OpenVPN Client in Ubuntu</title>
    <updated>Fri, 19 Oct 2018 06:07:19 GMT</updated>
    <published>Fri, 19 Oct 2018 06:07:19 GMT</published>
    <link href="http://blog.kleczkowski.info/2018/10/19/openvpn-client-in-ubuntu" />
    <author>
      <name>Jacek</name>
      <email>jacek@kleczkowski.info</email>
    </author>
    <category term="network" />
    <category term="openvpn" />
    <category term="ubuntu" />
    <category term="vpn" />
    <content type="html">&lt;p&gt;There is only one thing to do&lt;/p&gt;
&lt;pre&gt;sudo apt install -y network-manager-opentvpn-gnome&amp;nbsp;&lt;/pre&gt;</content>
  </entry>
  <entry>
    <id>http://blog.kleczkowski.info/2018/10/14/azure-tips</id>
    <title>Azure Tips</title>
    <updated>Sun, 14 Oct 2018 12:13:50 GMT</updated>
    <published>Sun, 14 Oct 2018 12:13:50 GMT</published>
    <link href="http://blog.kleczkowski.info/2018/10/14/azure-tips" />
    <author>
      <name>Jacek</name>
      <email>jacek@kleczkowski.info</email>
    </author>
    <category term="azure" />
    <category term="tips" />
    <content type="html">&lt;ol&gt;
&lt;li&gt;redeploy vm from azure cli&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;az vm redeploy --resource-group CONTAIER_NAME --name VM_NAME&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>http://blog.kleczkowski.info/2018/8/9/node-sass-build-failed</id>
    <title>node-sass build failed</title>
    <updated>Thu, 09 Aug 2018 07:01:20 GMT</updated>
    <published>Thu, 09 Aug 2018 07:00:51 GMT</published>
    <link href="http://blog.kleczkowski.info/2018/8/9/node-sass-build-failed" />
    <author>
      <name>Jacek</name>
      <email>jacek@kleczkowski.info</email>
    </author>
    <category term="angular" />
    <category term="angular6" />
    <category term="build-tools" />
    <category term="msvsversion" />
    <category term="ng-build" />
    <category term="node-gyp" />
    <category term="node-sass" />
    <category term="windows-build-tools" />
    <content type="html">&lt;p&gt;Example error output:&lt;/p&gt;
&lt;pre&gt;gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit ([....]\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:225:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Source\\_nodejs\\node.exe" "[....]node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="&lt;br /&gt;gyp ERR! cwd [....]node_modules\node-sass&lt;br /&gt;gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1&lt;/pre&gt;
&lt;p&gt;Solution for this is installing build tools.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open Poershell with Administrator privilages&lt;/li&gt;
&lt;li&gt;Run following command:&lt;/li&gt;
&lt;/ol&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;span lang="EN-US" style="font-size: 9.0pt; font-family: Consolas; color: #24292e; mso-ansi-language: EN-US;"&gt;npm install -g windows-build-tools&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately this must be called after VisualStudio Update&amp;nbsp; :(&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>http://blog.kleczkowski.info/2018/1/15/docker-tips</id>
    <title>Docker Tips</title>
    <updated>Mon, 08 Oct 2018 19:08:55 GMT</updated>
    <published>Mon, 15 Jan 2018 09:15:26 GMT</published>
    <link href="http://blog.kleczkowski.info/2018/1/15/docker-tips" />
    <author>
      <name>Jacek</name>
      <email>jacek@kleczkowski.info</email>
    </author>
    <category term="docker" />
    <category term="docker-image" />
    <category term="tips" />
    <content type="html">&lt;p&gt;1. Cleaning docker unused images&lt;/p&gt;
&lt;p&gt;&lt;code class="language-bash"&gt;docker images --no-trunc -aqf "dangling=true" | xargs docker rmi&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;2. Run docker with socket and tcp endpoint&lt;/p&gt;
&lt;pre&gt;#edit /lib/systemd/system/docker.service and change line starting with &lt;strong&gt;ExecStart&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;ExecStart=/usr/bin/dockerd  -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2376 --dns 8.8.8.8 --dns 8.8.4.4
&lt;br /&gt;#save file and run following commands&lt;br /&gt;&lt;br /&gt;systemctl daemon-reload
service docker restart
&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content>
  </entry>
  <entry>
    <id>http://blog.kleczkowski.info/2017/11/4/no-executable-found-matching-command-dotnet-watch</id>
    <title>No executable found matching command "dotnet-watch"</title>
    <updated>Mon, 22 Jan 2018 12:23:30 GMT</updated>
    <published>Sat, 04 Nov 2017 19:44:51 GMT</published>
    <link href="http://blog.kleczkowski.info/2017/11/4/no-executable-found-matching-command-dotnet-watch" />
    <author>
      <name>Jacek</name>
      <email>jacek@kleczkowski.info</email>
    </author>
    <category term="add-migration" />
    <category term="core" />
    <category term="dotnet" />
    <category term="dotnet-ef" />
    <category term="entityframework" />
    <category term="update-database" />
    <content type="html">&lt;p&gt;1. Check if You have csproj inside directory of command execution&lt;/p&gt;
&lt;p&gt;2. Check if there is a reference to the "watcher" tool in the project file (csproj)&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-xml"&gt;&amp;lt;ItemGroup&amp;gt;
    &amp;lt;DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0"/&amp;gt;
&amp;lt;/ItemGroup&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and then execute&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;dotnet restore&lt;/code&gt;&lt;/pre&gt;</content>
  </entry>
  <entry>
    <id>http://blog.kleczkowski.info/2017/8/31/call-background-thread</id>
    <title>Call background thread</title>
    <updated>Mon, 22 Jan 2018 12:23:30 GMT</updated>
    <published>Thu, 31 Aug 2017 12:11:34 GMT</published>
    <link href="http://blog.kleczkowski.info/2017/8/31/call-background-thread" />
    <author>
      <name>Jacek</name>
      <email>jacek@kleczkowski.info</email>
    </author>
    <category term="background-call" />
    <category term="csharp" />
    <category term="dotnet" />
    <category term="threads" />
    <content type="html">&lt;pre&gt;&lt;code class="language-csharp"&gt;public void TheGentlemansApproach()
{
    // straight onto the threadpool - what could be better?
    ThreadPool.QueueUserWorkItem(_ =&amp;gt; BackgroundMethod("The Gentleman's Approach"));
}
&lt;/code&gt;&lt;/pre&gt;</content>
  </entry></feed>