<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Namespace on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/namespace/</link>
    <description>Recent content in Namespace on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Thu, 05 Jan 2023 00:00:00 +0100</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/namespace/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Importing a Sitemap XML into Google Sheets</title>
      <link>https://www.hascode.com/importing-a-sitemap-xml-into-google-sheets/</link>
      <pubDate>Thu, 05 Jan 2023 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/importing-a-sitemap-xml-into-google-sheets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_the_goal&#34;&gt;The Goal&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short article, we want to import data from an existing sitemap XML file into a new Google Sheet document.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The sheet must pull the sitemap via HTTP protocol and extract all the URLs from the sitemap and insert them. into the sheet.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_implementation&#34;&gt;Implementation&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Now let’s implement it .. it only takes 1 minute …​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;For demonstration purpose, I’m going to use the sitemap from my old blog, to be found at &lt;code&gt;&lt;a href=&#34;https://www.hascode.com/sitemap.xml&#34; class=&#34;bare&#34;&gt;https://www.hascode.com/sitemap.xml&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Kubernetes Snippets</title>
      <link>https://www.hascode.com/kubernetes-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/kubernetes-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_fetch_and_decode_secret&#34;&gt;Fetch and Decode Secret&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;You need to have &lt;code&gt;jq&lt;/code&gt; installed to use this snippet!&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl --context=my-context -n my-namespace get secret my-secret-name -o json | jq &amp;#39;.data | map_values(@base64d)&amp;#39;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_rerun_existing_completed_job&#34;&gt;Rerun existing completed Job&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;admonitionblock caution&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-caution&#34; title=&#34;Caution&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
kubectl replace deletes the old job, if there is any error, your job definition is lost, don’t forget to save it first!
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;title&#34;&gt;Replace an existing Job with itself&lt;/div&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl get job JOBNAME -o yaml | kubectl replace --force -f -&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>XML Snippets</title>
      <link>https://www.hascode.com/xml-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/xml-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_ignore_namespaces_in_xpath_query&#34;&gt;Ignore Namespaces in XPath Query&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;e.g. Query for all &lt;code&gt;xxx&lt;/code&gt; nodes ignoring their namespace:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;xmllint --xpath &amp;#39;//*[local-name()=&amp;#34;xxx&amp;#34;]&amp;#39; input.xml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;admonitionblock tip&#34;&gt;
&lt;table&gt;
&lt;tbody&gt;&lt;tr&gt;
&lt;td class=&#34;icon&#34;&gt;
&lt;i class=&#34;fa icon-tip&#34; title=&#34;Tip&#34;&gt;&lt;/i&gt;
&lt;/td&gt;
&lt;td class=&#34;content&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;An example parsing URLs from a sitemap XML.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The URLs are located in //url/loc where all nodes are bound to the namespace &lt;code&gt;&lt;a href=&#34;http://www.sitemaps.org/schemas/sitemap/0.9&#34; class=&#34;bare&#34;&gt;http://www.sitemaps.org/schemas/sitemap/0.9&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The following query ignores the namespace&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;xmllint --xpath &amp;#39;//*[local-name()=&amp;#34;url&amp;#34;]/*[local-name()=&amp;#34;loc&amp;#34;]&amp;#39; sitemap.xml&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_pretty_print_xml_in_the_console_using_xmllint&#34;&gt;Pretty Print XML in the Console using xmllint&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;echo &amp;#39;&amp;lt;blogs&amp;gt;&amp;lt;blog url=&amp;#34;https://www.hascode.com/&amp;#34;&amp;gt;hasCode.com&amp;lt;/blog&amp;gt;&amp;lt;/blogs&amp;gt;&amp;#39; | xmllint --format -
&amp;lt;?xml version=&amp;#34;1.0&amp;#34;?&amp;gt;
&amp;lt;blogs&amp;gt;
    &amp;lt;blog url=&amp;#34;https://www.hascode.com/&amp;#34;&amp;gt;hasCode.com&amp;lt;/blog&amp;gt;
&amp;lt;/blogs&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
