<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2571767757762037468</id><updated>2026-06-29T13:08:54.384+01:00</updated><category term="iOS"/><category term="Raspberry Pi"/><category term="xcode"/><category term="MacOS"/><category term="SQL Server"/><category term=".NET"/><category term="Big Sur"/><category term="C#"/><category term="Drupal 8"/><category term="HTML"/><category term="LanMan"/><category term="RISC-OS"/><category term="RiscOS"/><category term="SAMBA"/><category term="Windows Server"/><category term="wxWidgets"/><category term="2008R2"/><category term="AirPrint"/><category term="BIErrorDomain 3"/><category term="Broken"/><category term="Canon MP560"/><category term="DataGridView"/><category term="F#"/><category term="HP Laserjet 6P"/><category term="IPv4"/><category term="MS-DOS"/><category term="Microsoft Advertising SDK"/><category term="OmniClient"/><category term="Perl"/><category term="Pi OS"/><category term="SMB2"/><category term="Server Core"/><category term="TFS"/><category term="ThingsBoard"/><category term="Ubuntu"/><category term="Uninstall"/><category term="Visual Studio"/><category term="WIX"/><category term="WM_GETDLGCODE"/><category term="WS_EX_CONTROLPARENT"/><category term="Windows 10"/><category term="Windows 8"/><category term="XML"/><category term="clang 9"/><category term="dead"/><category term="tvOS"/><category term="undeclared namespace"/><category term="watchOS"/><category term="wildcard&#xa;regex"/><title type='text'>Rob&#39;s Blog</title><subtitle type='html'>My programming notes and miscellaneous information</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>31</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-8844201508829131716</id><published>2026-06-29T12:56:58.154+01:00</published><updated>2026-06-29T13:08:54.384+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="xcode"/><title type='text'>Xcode Command Line Tools</title><content type='html'>&lt;style&gt;
.inline_code {
  background-color: black;
  border: none;
  color: #f2f2f2;
  font-family: monaco;
  font-size: 8pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
  padding: 0em 0.1em 0em 0.1em;
  white-space: nowrap;
}
  
.code_block{
  background: #202020;
  font-family: &quot;Cascadia Code&quot;, monospace;
  font-size: 10pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  overflow:auto;
  width:auto;
  border:solid gray;
  border-width:.1em .1em .1em .8em;
  padding:.2em .6em;
}

h1 {
  font-family: monaco;
  font-size: 10pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
}

body {
  font-family: monaco;
  font-size: 9pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
}

&lt;/style&gt;

&lt;h1&gt;Xcode command line tools standalone package removal&lt;/h1&gt;
&lt;p&gt;To remove the Xcode Command Line Tools standalone package, including the update prompts which occur when Apple releases new versions of the xcode command line tools, do the following:&lt;/p&gt;
&lt;ol style=&quot;text-align: left;&quot;&gt;
  &lt;li&gt;In a terminal, execute &lt;div class=&#39;code_block&#39;&gt;sudo rm -rf /Library/Developer/CommandLineTools&lt;/div&gt;&lt;/li&gt;
  &lt;li&gt;Shut down&lt;/li&gt;
  &lt;li&gt;Restart in Recovery Mode&lt;/li&gt;
  &lt;li&gt;Disable SIP. In a terminal (&amp;#8984;T, or from the Utilities menu), execute &lt;div class=&#39;code_block&#39;&gt;csrutil disable&lt;/div&gt;&lt;p&gt;Note you will be asked for an admin user and password&lt;/p&gt;&lt;/li&gt;
  &lt;li&gt;Restart normally and login&lt;/li&gt;
  &lt;li&gt;In a terminal, execute &lt;div class=&#39;code_block&#39;&gt;sudo rm /Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_*&lt;/div&gt;&lt;/li&gt;
  &lt;li&gt;Shut down&lt;/li&gt;
  &lt;li&gt;Restart in Recovery Mode&lt;/li&gt;
  &lt;li&gt;Enable SIP. In a terminal (&amp;#8984;T, or from the Utilities menu), execute &lt;div class=&#39;code_block&#39;&gt;csrutil enable&lt;/div&gt;&lt;p&gt;Note you will be asked for an admin user and password&lt;/p&gt;&lt;/li&gt;
  &lt;li&gt;Restart normally and login&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;Xcode command line tools information&lt;/h1&gt;
&lt;p&gt;If you have xcode installed and you need access to the command line tools, 
  you can either use the xcode preferences to set the path to the appropriate version of xcode which contains the command line tools you want to use,
  or you can use &lt;span class=&#39;inline_code&#39;&gt;xcode-select&lt;/span&gt; to select the appropriate version of xcode which contains the command line tools you want to use.&lt;/p&gt;
&lt;div class=&#39;code_block&#39;&gt;sudo xcode-select --switch /Applications/Xcode-26_5/Xcode.app&lt;/div&gt;
&lt;p&gt;To find out which version / the path of the xcode command line tools are in use, use&lt;p&gt;
&lt;div class=&#39;code_block&#39;&gt;sudo xcode-select -p&lt;/div&gt;
 </content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/8844201508829131716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2026/06/xcode-command-line-tools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/8844201508829131716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/8844201508829131716'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2026/06/xcode-command-line-tools.html' title='Xcode Command Line Tools'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-1878349774883897273</id><published>2024-03-04T17:46:00.003+00:00</published><updated>2024-03-25T14:47:24.424+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SAMBA"/><title type='text'>Adding Samba to a Windows Domain as a server</title><content type='html'>&lt;style&gt;
.inline_code {
  background-color: black;
  border: none;
  color: #f2f2f2;
  font-family: monaco;
  font-size: 8pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
  padding: 0em 0.1em 0em 0.1em;
  white-space: nowrap;
}
  
.code_block{
  background: #202020;
  font-family: &quot;Cascadia Code&quot;, monospace;
  font-size: 10pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  overflow:auto;
  width:auto;
  border:solid gray;
  border-width:.1em .1em .1em .8em;
  padding:.2em .6em;
}

h1 {
  font-family: monaco;
  font-size: 10pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
}

body {
  font-family: monaco;
  font-size: 9pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
}

&lt;/style&gt;

&lt;p&gt;My notes for adding SAMBA 4.20 on a Raspberry Pi 5 to a Windows 2019 Domain.&lt;/p&gt;

  &lt;ol style=&quot;text-align: left;&quot;&gt;
    &lt;li&gt;Build SAMBA 4.20 from source (see my previous post).&lt;/li&gt;
    &lt;li&gt;Setup kerberos&lt;div class=&quot;code_block&quot;&gt;kinit admin@DOMAIN.EX.INTERNAL&lt;br&gt;kinit&lt;/div&gt;Replace &lt;span class=&quot;inline_code&quot;&gt;DOMAIN.EX.INTERNAL&lt;/span&gt; with the uppercase version of the domain&lt;/li&gt;
    &lt;li&gt;Join to the domain
      &lt;div class=&quot;code_block&quot;&gt;sudo samba-tool domain join domain.ex.internal DC -U&quot;DOMAIN\administrator&quot;&lt;/div&gt;
      Also remember to change &lt;span class=&quot;inline_code&quot;&gt;DOMAIN\administrator&lt;/span&gt; to the name of an administrator for the DOMAIN domain/workgroup.
    &lt;/li&gt;
  &lt;/ol&gt;

&lt;p&gt;The problem is it fails with the error:
&lt;/p&gt;
&lt;pre class=&quot;code_block&quot;&gt;
Adding CN=PI-AD-SERVER,OU=Domain Controllers,DC=development,DC=4mation,DC=internal
Adding CN=PI-AD-SERVER,CN=Servers,CN=Default-First-Site,CN=Sites,CN=Configuration,DC=domain,DC=ex,DC=internal
Adding CN=NTDS Settings,CN=PI-AD-SERVER,CN=Servers,CN=Default-First-Site,CN=Sites,CN=Configuration,DC=domain,DC=ex,DC=internal
Join failed - cleaning up
Deleted CN=PI-AD-SERVER,OU=Domain Controllers,DC=domain,DC=ex,DC=internal
Deleted CN=PI-AD-SERVER,CN=Servers,CN=Default-First-Site,CN=Sites,CN=Configuration,DC=domain,DC=ex,DC=internal
ERROR(exception): uncaught exception - File [/usr/share/samba/setup/ad-schema/AD_DS_Attributes__Windows_Server_2012_R2.ldf] not found. Please install samba-ad-provision package
  File &quot;/usr/lib/python3/dist-packages/samba/netcmd/__init__.py&quot;, line 185, in _run
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File &quot;/usr/lib/python3/dist-packages/samba/netcmd/domain.py&quot;, line 702, in run
    join_DC(logger=logger, server=server, creds=creds, lp=lp, domain=domain,
  File &quot;/usr/lib/python3/dist-packages/samba/join.py&quot;, line 1598, in join_DC
    ctx.do_join()
  File &quot;/usr/lib/python3/dist-packages/samba/join.py&quot;, line 1486, in do_join
    ctx.join_add_objects()
  File &quot;/usr/lib/python3/dist-packages/samba/join.py&quot;, line 668, in join_add_objects
    ctx.join_add_ntdsdsa()
  File &quot;/usr/lib/python3/dist-packages/samba/join.py&quot;, line 593, in join_add_ntdsdsa
    ctx.DsAddEntry([rec])
  File &quot;/usr/lib/python3/dist-packages/samba/join.py&quot;, line 479, in DsAddEntry
    ctx.create_tmp_samdb()
  File &quot;/usr/lib/python3/dist-packages/samba/join.py&quot;, line 461, in create_tmp_samdb
    ctx.tmp_schema = Schema(ctx.domsid,
                     ^^^^^^^^^^^^^^^^^^
  File &quot;/usr/lib/python3/dist-packages/samba/schema.py&quot;, line 110, in __init__
    setup_path(&#39;ad-schema/%s&#39; % Schema.base_schemas[base_schema][0]),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File &quot;/usr/lib/python3/dist-packages/samba/provision/common.py&quot;, line 44, in setup_path
    raise Exception(&quot;File [%s] not found. Please install samba-ad-provision package&quot; % path)&lt;/pre&gt;

&lt;p&gt;Trying pulling the latest version from git and rebuilding it&lt;/p&gt;
&lt;p&gt;This didn&#39;t work but I discovered that there were some samba packages installed via apt so I removed them and this fixed the above error message when I tried to install.&lt;/p&gt;
&lt;p&gt;Now I have the issue of incompatible schema versions which was the reason I tried using the latest version of SAMBA in the first place.&lt;/p&gt;
&lt;p&gt;I guess I need to try and downgrade my Windows functional level.&lt;/p&gt;
&lt;p&gt;After downgrading the functional level I still have issues but with different errors. Adding &lt;span class=&quot;inline_code&quot;&gt;-d 3&lt;/span&gt; gives more details about the errors encountered as shown below.&lt;/p&gt;

&lt;div class=&quot;code_block&quot;&gt;sudo /usr/local/samba/bin/samba-tool domain join domain.ex.internal DC -U&quot;DOMAIN\administrator&quot; -d 3&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/1878349774883897273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2024/03/adding-samba-to-windows-domain-as-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/1878349774883897273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/1878349774883897273'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2024/03/adding-samba-to-windows-domain-as-server.html' title='Adding Samba to a Windows Domain as a server'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-6720772419003701320</id><published>2024-02-18T15:30:00.013+00:00</published><updated>2024-03-04T17:29:19.249+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Raspberry Pi"/><category scheme="http://www.blogger.com/atom/ns#" term="SAMBA"/><title type='text'>Building SAMBA 4.20 for use on a Raspberry Pi</title><content type='html'>&lt;style&gt;
.inline_code {
background-color: black;
border: none;
color: #f2f2f2;
font-family: monaco;
font-size: 8pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
line-height: normal;
padding: 0em 0.1em 0em 0.1em;
white-space: nowrap;
}
  
.code_block{
  background: #202020;
  font-family: &quot;Cascadia Code&quot;, monospace;
  font-size: 10pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  overflow:auto;
  width:auto;
  border:solid gray;
  border-width:.1em .1em .1em .8em;
  padding:.2em .6em;
}

  h1 {
font-family: monaco;
font-size: 10pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
line-height: normal;
}

body {
font-family: monaco;
font-size: 9pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
line-height: normal;
}

&lt;/style&gt;

&lt;p&gt;My notes for building SAMBA 4.20 on a Raspberry Pi 5 (or 4) with 8GB and a 2TB USB HDD.&lt;/p&gt;

  &lt;ol style=&quot;text-align: left;&quot;&gt;
    &lt;li&gt;Use the Raspberry Pi Imager to install &lt;span class=&quot;inline_code&quot;&gt;Raspberry Pi OS Lite (64-bit)&lt;/span&gt; on to the USB HDD with SSH enabled if configuration is going to be done headless.&lt;/li&gt;
    &lt;li&gt;Configure the Raspberry Pi to boot from USB (Pi 4 only - the Pi 5 seems to be able to do it by default).&lt;/li&gt;
    &lt;li&gt;Boot the Raspberry Pi from the HDD&lt;/li&gt;
    &lt;li&gt;Configure Pi OS to include the &lt;b&gt;en_us.utf8&lt;/b&gt; locale using &lt;span class=&quot;inline_code&quot;&gt;sudo raspi-config&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;Setup some extra swap space because the SAMBA self tests require it.
      &lt;ol&gt;&lt;li&gt;Disable swapping and edit the swapfile settings:
        &lt;div class=&quot;code_block&quot;&gt;sudo dphys-swapfile swapoff&lt;br&gt;sudo nano /etc/dphys-swapfile&lt;/div&gt;&lt;/li&gt;
        &lt;li&gt;Change &lt;span class=&quot;inline_code&quot;&gt;CONF_SWAPSIZE&lt;/span&gt; to be 81920 and &lt;span class=&quot;inline_code&quot;&gt;CONF_MAXSWAP&lt;/span&gt; to be at least 81920.
        This gives a &lt;span class=&quot;filename&quot;&gt;/etc/dphys-swapfile&lt;/span&gt; which looks something like:
        &lt;div class=&quot;code_block&quot;&gt;
# where we want the swapfile to be, this is the default&lt;br&gt;
#CONF_SWAPFILE=/var/swap&lt;br&gt;
&lt;br&gt;
# set size to absolute value, leaving empty (default) then uses computed value&lt;br&gt;
#   you most likely don&#39;t want this, unless you have an special disk situation&lt;br&gt;
#CONF_SWAPSIZE=100&lt;br&gt;
#80GB Swap size&lt;br&gt;
CONF_SWAPSIZE=81920&lt;br&gt;
&lt;br&gt;
# set size to computed value, this times RAM size, dynamically adapts,&lt;br&gt;
#   guarantees that there is enough swap without wasting disk space on excess&lt;br&gt;
#CONF_SWAPFACTOR=2&lt;br&gt;
&lt;br&gt;
# restrict size (computed and absolute!) to maximally this limit&lt;br&gt;
#   can be set to empty for no limit, but beware of filled partitions!&lt;br&gt;
#   this is/was a (outdated?) 32bit kernel limit (in MBytes), do not overrun it&lt;br&gt;
#   but is also sensible on 64bit to prevent filling /var or even / partition&lt;br&gt;
#CONF_MAXSWAP=2048&lt;br&gt;
#100GB MAX&lt;br&gt;
CONF_MAXSWAP=102400
          &lt;/div&gt;&lt;/li&gt;
    &lt;li&gt;Once that is saved enable swapping:
      &lt;div class=&quot;code_block&quot;&gt;sudo dphys-swapfile setup; sudo dphys-swapfile swapon&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;
    &lt;li&gt;Create some of the SAMBA folder structure because the self tests require it
        &lt;div class=&quot;code_block&quot;&gt;sudo mkdir -p /usr/local/samba/var&lt;br&gt;
        sudo chmod o+w,g+w /usr/local/samba/var&lt;/div&gt;
        or maybe there are some environment variables we could set to make the self test fully self contained&lt;/li&gt;
    &lt;li&gt;Install git and the build essentials&lt;div class=&quot;code_block&quot;&gt;sudo apt-get -y update&lt;br&gt;sudo apt-get -y install git&lt;/div&gt;&lt;/li&gt;
    &lt;li&gt;Clone the SAMBA git repo &lt;div class=&quot;code_block&quot;&gt;git clone https://git.samba.org/samba.git&lt;/div&gt;&lt;/li&gt;
    &lt;li&gt;Check out the required branch &lt;div class=&quot;code_block&quot;&gt;cd samba&lt;br&gt;git checkout samba-4.20.0rc2&lt;/div&gt;&lt;/li&gt;
    &lt;li&gt;Install the prerequisites &lt;div class=&quot;code_block&quot;&gt;cd bootstrap/generated-dists/debian12&lt;br&gt;sudo ./bootstrap.sh&lt;br&gt;cd ../../..&lt;/div&gt;&lt;/li&gt;
    &lt;li&gt;Configure the SAMBA build (include self tests) and to get the config from /etc/samba and to store the local state in /var/samba
      &lt;div class=&quot;code_block&quot;&gt;./configure --enable-selftest  --sysconfdir=/etc/samba --localstatedir=/var/samba --with-ads&lt;/div&gt;&lt;/li&gt;
    &lt;li&gt;Build SAMBA (using 4 jobs which is OK if swap space has been added otherwise miss off the &lt;i&gt;-j 4&lt;/i&gt;)
      &lt;div class=&quot;code_block&quot;&gt;make -j 4&lt;/div&gt;&lt;/li&gt;
    &lt;li&gt;Run the self tests to ensure that the build was successful 
      &lt;div class=&quot;code_block&quot;&gt;make quicktest&lt;/div&gt;
      which takes about half an hour to run on my Raspberry Pi 5.
    &lt;/li&gt;
    &lt;li&gt;Install SAMBA&lt;div class=&quot;code_block&quot;&gt;sudo make install&lt;/div&gt;&lt;/li&gt;
    &lt;li&gt;Add the SAMBA binaries directory to the path.
      &lt;div class=&quot;code_block&quot;&gt;export PATH=/usr/local/samba/bin/:/usr/local/samba/sbin/:$PATH&lt;/div&gt;
      Also remember to alter the system path definition in &lt;span class=&quot;inline_code&quot;&gt;/etc/profile&lt;/span&gt;
    &lt;/li&gt;
  &lt;/ol&gt;
&lt;p&gt;See the &lt;a href=&quot;https://wiki.samba.org/index.php/Build_Samba_from_Source&quot;&gt;SAMBA wiki website&lt;/a&gt; for more details on how to build SAMBA from source.&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/6720772419003701320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2024/02/building-samba-420-for-use-on-raspberry.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/6720772419003701320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/6720772419003701320'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2024/02/building-samba-420-for-use-on-raspberry.html' title='Building SAMBA 4.20 for use on a Raspberry Pi'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-7947873735610131858</id><published>2024-02-18T14:23:00.005+00:00</published><updated>2024-02-18T14:23:30.261+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="IPv4"/><category scheme="http://www.blogger.com/atom/ns#" term="Pi OS"/><category scheme="http://www.blogger.com/atom/ns#" term="Raspberry Pi"/><title type='text'>Configure Pi OS to use a static IPv4 Address</title><content type='html'>&lt;style&gt;
.filename {
margin-top:5pt;
padding:.2em .6em;
font-family: monaco;
font-size: 11pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
}
  
.code_block{
  background: #202020;
  font-family: &quot;Cascadia Code&quot;, monospace;
  font-size: 10pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  overflow:auto;
  width:auto;
  border:solid gray;
  border-width:.1em .1em .1em .8em;
  padding:.2em .6em;
}
  h1 {
font-family: monaco;
font-size: 10pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
line-height: normal;
}

body {
font-family: monaco;
font-size: 9pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
line-height: normal;
}

&lt;/style&gt;

&lt;p&gt;To configure Pi OS to use a static IPv4 address on the wired interface use the following commands:&lt;/p&gt;
&lt;div class=&quot;code_block&quot;&gt;
  sudo nmcli connection modify &#39;Wired connection 1&#39; ipv4.address 192.168.200.20/24
&lt;/div&gt;
&lt;p&gt;This sets the (first) wired interface&#39;s IPv4 address to 192.168.200.20 with a net mask of 255.255.255.0.&lt;/p&gt;
&lt;div class=&quot;code_block&quot;&gt;
sudo nmcli connection modify &#39;Wired connection 1&#39; ipv4.method manual
&lt;/div&gt;
&lt;p&gt;This sets the (first) wired interface&#39;s IPv4 address to be manually set.&lt;/p&gt;
&lt;div class=&quot;code_block&quot;&gt;
  sudo nmcli connection modify &#39;Wired connection 1&#39; ipv4.dns 192.168.200.10
&lt;/div&gt;
&lt;p&gt;This sets the (first) wired interface&#39;s IPv4 DNS server address to be 192.168.200.10.&lt;/p&gt;
&lt;div class=&quot;code_block&quot;&gt;
  sudo nmcli connection down &#39;Wired connection 1&#39; ;sudo nmcli connection up &#39;Wired connection 1&#39;
&lt;/div&gt;
&lt;p&gt;This resets the (first) wired interface by taking the connection down and the reestablishing it.&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/7947873735610131858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2024/02/configure-pi-os-to-use-static-ipv4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/7947873735610131858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/7947873735610131858'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2024/02/configure-pi-os-to-use-static-ipv4.html' title='Configure Pi OS to use a static IPv4 Address'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-6369634349961357488</id><published>2021-10-09T11:30:00.004+01:00</published><updated>2021-10-10T13:32:51.615+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><category scheme="http://www.blogger.com/atom/ns#" term="Perl"/><title type='text'>Finding website paths for Drupal modules</title><content type='html'>&lt;style&gt;
.filename {
margin-top:5pt;
padding:.2em .6em;
font-family: monaco;
font-size: 9pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
}
  
h1 {
font-family: monaco;
font-size: 10pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
line-height: normal;
}

body {
font-family: monaco;
font-size: 9pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
line-height: normal;
}
&lt;/style&gt;

&lt;p&gt;As part of my side projects, I have been helping a friend move his Drupal 8 website from a proof of concept towards going live. One of the problems I was facing was how modules map to URLs so I wrote a little Perl script to generate a URL tree from module routing files.&lt;/p&gt;

&lt;div class=&quot;filename&quot;&gt;tree_routes.pl&lt;/div&gt;
&lt;div&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;div style=&quot;background: #202020; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #999999; font-style: italic&quot;&gt;#!/usr/bin/perl&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;use&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;strict;&lt;/span&gt;
&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;use&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;warnings;&lt;/span&gt;
&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;use&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;diagnostics;&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;use&lt;/span&gt; &lt;span style=&quot;color: #447fcf; text-decoration: underline&quot;&gt;YAML::&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;Tiny;&lt;/span&gt;
&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;use&lt;/span&gt; &lt;span style=&quot;color: #447fcf; text-decoration: underline&quot;&gt;Data::&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;Dumper;&lt;/span&gt;
&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;use&lt;/span&gt; &lt;span style=&quot;color: #447fcf; text-decoration: underline&quot;&gt;Tree::&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;DAG_Node;&lt;/span&gt;

&lt;span style=&quot;color: #999999; font-style: italic&quot;&gt;# Nice Tree&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
   &lt;span style=&quot;color: #24909d&quot;&gt;package&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;NiceTree;&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;use&lt;/span&gt; &lt;span style=&quot;color: #447fcf; text-decoration: underline&quot;&gt;Tree::&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;DAG_Node;&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;our&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@ISA&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ffa500&quot;&gt;qw(Tree::DAG_Node)&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;sub &lt;/span&gt;&lt;span style=&quot;color: #447fcf&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$class&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;shift&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$options&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;shift&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$self&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;bless&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$class&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #447fcf; text-decoration: underline&quot;&gt;SUPER::&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;new(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$options&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$self&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;sub &lt;/span&gt;&lt;span style=&quot;color: #447fcf&quot;&gt;hashref2string&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$self&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$hashref&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@_&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #40ffff&quot;&gt;$hashref&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;||=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{};&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;join&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;quot;, &amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;map&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ffa500&quot;&gt;qq|$_ =&amp;gt; &amp;quot;$$hashref{$_}&amp;quot;|&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;sort&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;keys&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;%$hashref&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;sub &lt;/span&gt;&lt;span style=&quot;color: #447fcf&quot;&gt;format_node&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$self&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$options&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@_&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$s&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;name;&lt;/span&gt;

      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;keys&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;attributes&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #3677a9&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
         &lt;span style=&quot;color: #40ffff&quot;&gt;$s&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;.=&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;quot;\t&amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$self&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;hashref2string(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;attributes)&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(!&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$$options&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{no_attributes});&lt;/span&gt;
      &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$s&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;sub &lt;/span&gt;&lt;span style=&quot;color: #447fcf&quot;&gt;node2string&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$self&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$options&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$vert_dashes&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@_&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$depth&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;scalar&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;ancestors)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;||&lt;/span&gt; &lt;span style=&quot;color: #3677a9&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$sibling_count&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;defined&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;mother&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;scalar&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;self_and_sisters&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #3677a9&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$offset&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39; &amp;#39;&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;x&lt;/span&gt; &lt;span style=&quot;color: #3677a9&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;@indent&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;map&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$$vert_dashes&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$_&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;||&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$offset&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: #3677a9&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;..&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$depth&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;-&lt;/span&gt; &lt;span style=&quot;color: #3677a9&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #40ffff&quot;&gt;@$vert_dashes&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt;
         &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;
            &lt;span style=&quot;color: #40ffff&quot;&gt;@indent&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$sibling_count&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #3677a9&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$offset&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;  |&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;),&lt;/span&gt;
         &lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;

      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$sibling_count&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;my_daughter_index&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: #3677a9&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;))&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
         &lt;span style=&quot;color: #40ffff&quot;&gt;$$vert_dashes&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$depth&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;]&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$offset&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$x&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;((&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;scalar&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;daughters)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;||&lt;/span&gt; &lt;span style=&quot;color: #3677a9&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;  |--+ &amp;#39;&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;  |--- &amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;

      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;join&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;&amp;#39;&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@indent&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #3677a9&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;..&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$#indent&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;])&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$depth&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;?&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$x&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;:&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$self&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;format_node(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$options&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;

   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

&lt;span style=&quot;color: #999999; font-style: italic&quot;&gt;# Find files in path&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@paths&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;sub &lt;/span&gt;&lt;span style=&quot;color: #447fcf&quot;&gt;dir_listing&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$root&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@_&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #40ffff&quot;&gt;$root&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;.=&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;/&amp;#39;&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;unless&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$root&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=~&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt; /\/$/&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$f&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;glob&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;quot;$root*&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
         &lt;span style=&quot;color: #24909d&quot;&gt;push&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@paths&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
         &lt;span style=&quot;color: #d0d0d0&quot;&gt;dir_listing(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;-d&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$f&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
      &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@paths&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

&lt;span style=&quot;color: #999999; font-style: italic&quot;&gt;# Generate tree of URLs&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$path_tree&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;NiceTree-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;({&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;name&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;/&amp;#39;&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;});&lt;/span&gt;
   &lt;span style=&quot;color: #999999; font-style: italic&quot;&gt;# my $path_tree = Tree::DAG_Node-&amp;gt;new({ name =&amp;gt; &amp;#39;/&amp;#39; });&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;sub &lt;/span&gt;&lt;span style=&quot;color: #447fcf&quot;&gt;add_node&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$current_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$leaf&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@_&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #3677a9&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #3677a9&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;];&lt;/span&gt;

      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$new_daughter&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$current_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;new_daughter({&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;name&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$leaf&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;});&lt;/span&gt;

      &lt;span style=&quot;color: #999999; font-style: italic&quot;&gt;# Keep daughters in alphabetical order&lt;/span&gt;
      &lt;span style=&quot;color: #40ffff&quot;&gt;$current_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;set_daughters(&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;sort&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$a&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;name&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;cmp&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$b&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;name}&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$current_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;daughters);&lt;/span&gt;

      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$new_daughter&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;sub &lt;/span&gt;&lt;span style=&quot;color: #447fcf&quot;&gt;get_node_for_path&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@paths&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;split&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;/&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$_&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #3677a9&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;];&lt;/span&gt;

      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$current_node&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$path_tree&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt; &lt;span style=&quot;color: #999999; font-style: italic&quot;&gt;# Start at the root&lt;/span&gt;

      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;foreach&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$leaf&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;@paths&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
         &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$leaf&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;ne&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
            &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$found&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #3677a9&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@daughters&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$current_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;daughters();&lt;/span&gt;

            &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;@daughters&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
               &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;foreach&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$dau&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;@daughters&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
                  &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$dau&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;name&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;eq&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$leaf&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
                     &lt;span style=&quot;color: #40ffff&quot;&gt;$current_node&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$dau&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
                     &lt;span style=&quot;color: #40ffff&quot;&gt;$found&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #3677a9&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
                     &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;last&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
                  &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
               &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

            &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;not&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$found&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
               &lt;span style=&quot;color: #40ffff&quot;&gt;$current_node&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;add_node(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$current_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$leaf&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
         &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
      &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$current_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;


&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;sub &lt;/span&gt;&lt;span style=&quot;color: #447fcf&quot;&gt;process_requirements&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;%requirements&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@_&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$path_node&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$requirements&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;path_node&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;};&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;defined&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$requirements&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;_permission&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;})&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #40ffff&quot;&gt;$path_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;attributes-&amp;gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;Permission&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$requirements&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;_permission&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;};&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;defined&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$requirements&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;_entity_access&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;})&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #40ffff&quot;&gt;$path_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;attributes-&amp;gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;Access&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$requirements&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;_entity_access&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;};&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;


&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;sub &lt;/span&gt;&lt;span style=&quot;color: #447fcf&quot;&gt;process_defaults&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;%defaults&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@_&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$path_node&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$defaults&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;path_node&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;};&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;defined&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$defaults&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;_title&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;})&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #40ffff&quot;&gt;$path_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;attributes-&amp;gt;{Title}&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$defaults&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;_title&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;};&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;defined&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$defaults&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;_controller&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;})&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #40ffff&quot;&gt;$path_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;attributes-&amp;gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;Controller&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$defaults&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;_controller&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;};&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;defined&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$defaults&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;_entity_form&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;})&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #40ffff&quot;&gt;$path_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;attributes-&amp;gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;Entity_form&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$defaults&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;_entity_form&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;};&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;defined&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$defaults&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;_entity_list&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;})&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #40ffff&quot;&gt;$path_node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;attributes-&amp;gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;Entity_list&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$defaults&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;_entity_list&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;};&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;


&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;sub &lt;/span&gt;&lt;span style=&quot;color: #447fcf&quot;&gt;process_form&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;%form&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@_&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$filename&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$form&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;filename&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;};&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$formname&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$form&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;formname&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;};&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$path&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$form&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;path&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;};&lt;/span&gt;

   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;get_node_for_path(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$path&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;

   &lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;attributes-&amp;gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;Form&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;.=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$formname&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;quot;;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
   &lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;attributes-&amp;gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;File&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;.=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$filename&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;quot;;&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;

   &lt;span style=&quot;color: #d0d0d0&quot;&gt;process_defaults(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$form&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;defaults&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;}},&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;path_node&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;process_requirements(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$form&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;requirements&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;}},&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;path_node&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$node&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;


&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;sub &lt;/span&gt;&lt;span style=&quot;color: #447fcf&quot;&gt;process_yml_file&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$filename&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$_&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #3677a9&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;];&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$yaml&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #447fcf; text-decoration: underline&quot;&gt;YAML::&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;Tiny-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;read&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;

   &lt;span style=&quot;color: #999999; font-style: italic&quot;&gt;# print &amp;quot;File: @_\n&amp;quot;;&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;defined&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$yaml&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;[&lt;/span&gt;&lt;span style=&quot;color: #3677a9&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;])&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;

      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;%k&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$yaml&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;[&lt;/span&gt;&lt;span style=&quot;color: #3677a9&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;]};&lt;/span&gt;
      &lt;span style=&quot;color: #999999; font-style: italic&quot;&gt;# print Dumper(%k);&lt;/span&gt;

      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;for&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$form&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;keys&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;%k&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
         &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$form&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;ne&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
            &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #24909d&quot;&gt;ref&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$k&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$form&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;})&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;eq&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;HASH&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
               &lt;span style=&quot;color: #d0d0d0&quot;&gt;process_form(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;%&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$k&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$form&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;}},&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;filename&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$filename&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;formname&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$form&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
            &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
               &lt;span style=&quot;color: #24909d&quot;&gt;warn&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;quot;Form: $form in file $filename is &amp;quot;&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;ref&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$k&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$form&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;})&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;.&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;
            &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
         &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
      &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #24909d&quot;&gt;warn&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;quot;yaml file $filename is empty\n&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;


&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@paths&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;dir_listing(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;@ARGV&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;foreach&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$file&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;@paths&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
   &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$file&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=~&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt; /\.routing\.yml$/&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
      &lt;span style=&quot;color: #24909d&quot;&gt;eval&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
         &lt;span style=&quot;color: #d0d0d0&quot;&gt;process_yml_file(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$file&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt;
      &lt;span style=&quot;color: #d0d0d0&quot;&gt;};&lt;/span&gt;
      &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$@&lt;/span&gt; &lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;ne&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;
         &lt;span style=&quot;color: #24909d&quot;&gt;warn&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;quot;Error caught while processing file $file\n&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;
         &lt;span style=&quot;color: #24909d&quot;&gt;warn&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;@$&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;
      &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

   &lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: #d0d0d0&quot;&gt;}&lt;/span&gt;

&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;my&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;$tree&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #d0d0d0&quot;&gt;get_node_for_path(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;/&amp;#39;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;);&lt;/span&gt;
&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;print&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;quot;Tree is:\n&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;;&lt;/span&gt;
&lt;span style=&quot;color: #6ab825; font-weight: bold&quot;&gt;print&lt;/span&gt; &lt;span style=&quot;color: #24909d&quot;&gt;map&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;quot;$_\n&amp;quot;&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #40ffff&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt;$tree&lt;/span&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;-&amp;gt;tree2string});&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/6369634349961357488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2021/10/finding-website-paths-for-drupal-modules.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/6369634349961357488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/6369634349961357488'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2021/10/finding-website-paths-for-drupal-modules.html' title='Finding website paths for Drupal modules'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-6664216239878672050</id><published>2021-10-09T11:16:00.002+01:00</published><updated>2021-10-09T11:45:58.829+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Drupal 8"/><title type='text'>Drupal 8 custom module permissions</title><content type='html'>&lt;style&gt;
.inline_code {
background-color: black;
border: none;
color: #f2f2f2;
font-family: monaco;
font-size: 8pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
line-height: normal;
padding: 0em 0.1em 0em 0.1em;
white-space: nowrap;
}

.filename {
margin-top:5pt;
padding:.2em .6em;
font-family: monaco;
font-size: 9pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
}
  
h1 {
font-family: monaco;
font-size: 10pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
line-height: normal;
}

body {
font-family: monaco;
font-size: 9pt;
font-stretch: normal;
font-variant-ligatures: no-common-ligatures;
line-height: normal;
}
&lt;/style&gt;

&lt;div&gt;If like me you have been wondering how the Drupal 8/9 custom module &lt;span class=&quot;inline_code&quot;&gt;yml&lt;/span&gt; files link together, it goes something like this:&lt;/div&gt;

&lt;div class=&quot;filename&quot;&gt;xxxx.routing.yml&lt;/div&gt;
&lt;div&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;div style=&quot;background: #202020; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;free_resources_dashboard:&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;path:&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;/free-resources&amp;#39;&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;defaults:&lt;/span&gt;
      &lt;span style=&quot;color: #d0d0d0&quot;&gt;_controller:&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;\Drupal\free_resources\Controller\FreeResources::dashboard&amp;#39;&lt;/span&gt;
      &lt;span style=&quot;color: #d0d0d0&quot;&gt;_title:&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;My&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;Resources&amp;#39;&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;requirements:&lt;/span&gt;
      &lt;span style=&quot;color: #d0d0d0&quot;&gt;_permission:&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;free&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;resources&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;dashboard&amp;#39;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div class=&quot;filename&quot;&gt;xxxx.permissions.yml&lt;/div&gt;
&lt;div&gt;
&lt;!-- HTML generated using hilite.me --&gt;&lt;div style=&quot;background: #202020; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;&quot;&gt;&lt;pre style=&quot;margin: 0; line-height: 125%&quot;&gt;&lt;span style=&quot;color: #d0d0d0&quot;&gt;free resources dashboard:&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;title:&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;Free&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;Resources&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;Dashboard&amp;#39;&lt;/span&gt;
   &lt;span style=&quot;color: #d0d0d0&quot;&gt;description:&lt;/span&gt; &lt;span style=&quot;color: #ed9d13&quot;&gt;&amp;#39;Allow&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;access&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;to&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;the&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;free&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;resources&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;dashboard&lt;/span&gt;&lt;span style=&quot;color: #40ffff&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #ed9d13&quot;&gt;page&amp;#39;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;The &lt;span class=&quot;inline_code&quot;&gt;free resources dashboard:&lt;/span&gt; line in the xxxx.permissions.yml file links to the &lt;span class=&quot;inline_code&quot;&gt;_permissions: &#39;free resources dashboard&#39;&lt;/span&gt; line in the xxxx.routing.yml file. If the &lt;span class=&quot;inline_code&quot;&gt;_permissions:&lt;/span&gt; field does not match any of the defined permissions (for the site?) you will get a permissions error when you try and access your page.
&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/6664216239878672050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2021/10/drupal-8-custom-module-permissions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/6664216239878672050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/6664216239878672050'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2021/10/drupal-8-custom-module-permissions.html' title='Drupal 8 custom module permissions'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-9095428034624487920</id><published>2021-04-06T18:30:00.001+01:00</published><updated>2021-04-11T21:24:17.479+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AirPrint"/><category scheme="http://www.blogger.com/atom/ns#" term="Big Sur"/><category scheme="http://www.blogger.com/atom/ns#" term="Canon MP560"/><category scheme="http://www.blogger.com/atom/ns#" term="HP Laserjet 6P"/><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="MacOS"/><title type='text'>Sharing printers via AirPrint</title><content type='html'> &lt;style&gt;
.code_block {
    background-color: black;
    border: none;
    color: #f2f2f2;
    font-family: monaco;
    font-size: 8pt;
    font-stretch: normal;
    font-variant-ligatures: no-common-ligatures;
    line-height: normal;
    padding: 0.5em 0.5em 0.5em 0.5em;
    text-align: left;
    display: flex;
    flex-wrap: nowrap;
    overflow: auto;
    white-space: pre;
}

.inline_code {
    background-color: black;
    border: none;
    color: #f2f2f2;
    font-family: monaco;
    font-size: 8pt;
    font-stretch: normal;
    font-variant-ligatures: no-common-ligatures;
    line-height: normal;
    padding: 0em 0.1em 0em 0.1em;
    white-space: nowrap;
}

h1 {
    font-family: monaco;
    font-size: 10pt;
    font-stretch: normal;
    font-variant-ligatures: no-common-ligatures;
    line-height: normal;
}

body {
    font-family: monaco;
    font-size: 9pt;
    font-stretch: normal;
    font-variant-ligatures: no-common-ligatures;
    line-height: normal;
}
&lt;/style&gt;
&lt;p&gt;I had been struggling to get my old Canon MP560 to work with my new Mac Mini running Bir Sur. I decided to use my Raspberry Pi 4 running Ubuntu Server 20.04 as a printer server and at the same time to see if I could finally get printing to work from my iPhone.&lt;/p&gt;

&lt;p&gt;I discovered that it is relatively straight forward to setup printer sharing via AirPrint. I based my inital attempt on the &lt;a href=&quot;https://www.linux-magazine.com/Online/Features/AirPrint&quot; rel=&quot;nofollow&quot;&gt;Linux Magazine&#39;s atricle on setting up AirPrint&lt;/a&gt; but I have different settings for the cups configuration and didn&#39;t need to add the mime types. I also needed to adjust the firewall settings and get my printers working from Linux as I had not previously set them up for Linux, only for Windows and MacOS
&lt;/p&gt;

&lt;h1&gt;CUPS installation&lt;/h1&gt;
&lt;p&gt;For the CUPS installation I used the following packages:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;cups-bsd&lt;/li&gt;
  &lt;li&gt;avahi&lt;/li&gt;
  &lt;li&gt;printer-driver-gutenprint&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I installed CUPS and the Gutenprint printer drivers (which include drivers for both my Canon MP560 and HP Laserjet 6P) using the following steps:&lt;/p&gt;
&lt;div class=&quot;code_block&quot;&gt;sudo apt-get update
sudo apt-get install cups-bsd avahi-daemon printer-driver-gutenprint
sudo systemctl start cups
sudo systemctl enable cups
&lt;/div&gt;

&lt;p&gt;I then edited the CUPS configuration and changed only the bits shown below. I left the rest of the file alone.&lt;/p&gt;
&lt;div class=&quot;code_block&quot;&gt;# Only listen for connections from the local machine.
Port 631
Listen /run/cups/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseLocalProtocols dnssd

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Web interface setting...
WebInterface Yes

# Restrict access to the server...
&amp;lt;Location /&amp;gt;
  Order allow,deny
  Allow @LOCAL
&amp;lt;/Location&amp;gt;

# Restrict access to the admin pages...
&amp;lt;Location /admin&amp;gt;
  AuthType Default
  Require valid-user
  Order allow,deny
  Allow @LOCAL
&amp;lt;/Location&amp;gt;

# Restrict access to configuration files...
&amp;lt;Location /admin/conf&amp;gt;
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
&amp;lt;/Location&amp;gt;
&lt;/div&gt;  

&lt;p&gt;I then configured the firewall to allow access to CUPS and Avahi. Note the network this setup is on is 192.168.200.0 as seen in the config below - change as required.&lt;/p&gt; 
&lt;div class=&quot;code_block&quot;&gt;sudo ufw allow in from 192.168.200.0/24 to any port 631
sudo ufw allow 5353/udp
&lt;/div&gt;

&lt;p&gt;I then added any required users to the lpadmin group. eg &lt;span class=&quot;inline_code&quot;&gt;sudo adduser XXX lpadmin&lt;/span&gt; before restarting CUPS (&lt;span class=&quot;inline-code&quot;&gt;sudo systemctl restart cups&lt;/span&gt;) and starting and enabling avahi-daemon.&lt;/p&gt;
&lt;div class=&quot;code_block&quot;&gt;sudo systemctl start avahi-daemon
sudo systemctl enable avahi-daemon
sudo systemctl restart cups
&lt;/div&gt;

&lt;p&gt;I then connected to my Raspberry Pi on port 631 and used the CUPS admin interface to add my Canon MP560 and HP Laser 6P printers and checked that they worked by printing a test page for each.&lt;/p&gt;

&lt;h1&gt;AirPrint configuration&lt;/h1&gt;
&lt;p&gt;Once I had confirmed that the printers were setup and that the Raspberry Pi could successfully print from them, I used the &#39;airprint-generate.py&#39; script from &lt;a href=&quot;https://github.com/tjfontaine/airprint-generate/archive/refs/heads/master.zip&quot; rel=&quot;nofollow&quot;&gt;https://github.com/tjfontaine/airprint-generate/archive/refs/heads/master.zip&lt;/a&gt; to generate avahi service files. &#39;airprint-generate.py&#39; has the following dependencies:
&lt;/p&gt;&lt;ul&gt;&lt;li&gt;python3&lt;/li&gt;
  &lt;li&gt;python3-cups&lt;/li&gt;&lt;/ul&gt;
&lt;div class=&quot;code_block&quot;&gt;sudo apt-get install python3 python3-cups unzip
wget https://github.com/tjfontaine/airprint-generate/archive/refs/heads/master.zip
unzip master.zip
cd airprint-generate-master/
./airprint-generate.py
&lt;/div&gt;

&lt;p&gt;Both of my printers were now visible to and usable from both my iPhone and Mac Mini.&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/9095428034624487920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2021/04/sharing-printers-via-airprint.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/9095428034624487920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/9095428034624487920'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2021/04/sharing-printers-via-airprint.html' title='Sharing printers via AirPrint'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-4353210942645565517</id><published>2021-01-14T18:37:00.001+00:00</published><updated>2021-01-16T16:32:23.465+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="wildcard&#xa;regex"/><title type='text'>File name wildcards</title><content type='html'>&lt;style&gt;
.code_block {
  background-color: black;
  border: none;
  color: #f2f2f2;
  font-family: monaco;
  font-size: 8pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
  padding: 0.5em 0.5em 0.5em 0.5em;
  text-align: left;
  display: flex;
  flex-wrap: nowrap;
  overflow: auto;
  white-space: pre;
}

.inline_code {
  background-color: black;
  border: none;
  color: #f2f2f2;
  font-family: monaco;
  font-size: 8pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
  padding: 0em 0.1em 0em 0.1em;
  white-space: nowrap;
}

h1 {
  font-family: monaco;
  font-size: 10pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
}

body {
  font-family: monaco;
  font-size: 9pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
}
&lt;/style&gt;

&lt;p&gt;Earlier I was working on a command line utility that needed to take a list of potentially wildcarded files as input. I didn&#39;t want a fully blown regular expression as the input, just the normal ? and * options.&lt;/p&gt;

&lt;p&gt;I decided that the quickest way to do this was to convert the wildcarded filename to a regular expression and then use the STL &lt;span class=&quot;inline_code&quot;&gt;std::regex&lt;/span&gt; to do the matching.&lt;/p&gt;

&lt;p&gt;Here is a quick way to do it.&lt;/p&gt;

&lt;div class=&quot;code_block&quot;&gt;#pragma once

#include &amp;lt;regex&amp;gt;
#include &amp;lt;string&amp;gt;

inline std::regex convert_file_wildcards_to_regex(std::string file_pattern)
{
    std::string pattern;
    for (auto c : file_pattern)
    {
        switch (c)
        {
        default:
            pattern += c;
            break;
        case &#39;.&#39;:
            pattern += &quot;\\.&quot;;
            break;
        case &#39;\\&#39;:
            pattern += &quot;\\\\&quot;;
            break;
        case &#39;?&#39;:
            pattern += &quot;.&quot;;
            break;
        case &#39;*&#39;:
            pattern += &quot;.*&quot;;
            break;
        }
    }

    return std::regex(pattern, std::regex_constants::ECMAScript | std::regex_constants::icase);
}&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/4353210942645565517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2021/01/file-name-wildcards.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/4353210942645565517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/4353210942645565517'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2021/01/file-name-wildcards.html' title='File name wildcards'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-398187329037489819</id><published>2020-08-26T21:01:00.001+01:00</published><updated>2020-08-26T21:01:54.444+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode"/><title type='text'>Using configure scripts to make libraries for iOS</title><content type='html'>&lt;style&gt;
.code_block {
  background-color: black;
  border: none;
  color: #f2f2f2;
  font-family: monaco;
  font-size: 8pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
  padding: 0.5em 0.5em 0.5em 0.5em;
  text-align: left;
  display: flex;
  flex-wrap: nowrap;
  overflow: auto;
  white-space: pre;
}

.inline_code {
  background-color: black;
  border: none;
  color: #f2f2f2;
  font-family: monaco;
  font-size: 8pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
  padding: 0em 0.1em 0em 0.1em;
  white-space: nowrap;
}

h1 {
  font-family: monaco;
  font-size: 10pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
}

body {
  font-family: monaco;
  font-size: 9pt;
  font-stretch: normal;
  font-variant-ligatures: no-common-ligatures;
  line-height: normal;
}
&lt;/style&gt;


&lt;p&gt;While building a wxWidgets app for iOS, I wanted to build wxWidgets as a library, not include it as part of the application as the minimal iOS example does. The following script (based on&amp;nbsp;&lt;a href=&quot;https://github.com/szanni/ios-autotools&quot;&gt;ios-autotools&lt;/a&gt;) sets up the required environment and then calls the supplied configure script.&lt;/p&gt;

&lt;ol&gt;The main changes are:
  &lt;li&gt;the configure script is passed as a parameter so that it does not need to be in the same directory as the iconfigure script which keeps the source folder unchanged&lt;/li&gt;
  &lt;li&gt;if an SDK version is passed in and the SDK for that version of the SDK does not exist then the default SDK is used with the ios-min-version set to the specified version.&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&quot;code_block&quot;&gt;#!/bin/sh
set -e
usage () {
  echo &quot;Usage: [VARIABLE...] $(basename $0) architecture path&quot;
  echo &quot;&quot;
  echo &quot;  architecture  Target architecture. [armv7|armv7s|arm64|i386|x86_64]&quot;
  echo &quot;  path          path to configure script to run&quot;
  echo &quot;&quot;
  echo &quot;  VARIABLEs are:&quot;
  echo &quot;    SDKVERSION   Target a specific SDK version.&quot;
  echo &quot;    PREFIX       Custom install prefix, useful for local installs.&quot;
  echo &quot;    CHOST        Configure host, set if not deducable by ARCH.&quot;
  echo &quot;    SDK          SDK target, set if not deducable by ARCH. [iphoneos|iphonesimulator]&quot;
  echo &quot;&quot;
  echo &quot;    CFLAGS CPPFLAGS CXXFLAGS LDFLAGS PKG_CONFIG_PATH&quot;
  echo &quot;&quot;
  echo &quot;  All additional parameters are passed to the configure script.&quot;
  exit 1
}

# Sanity checks
if [ &quot;$#&quot; -lt 2 ]; then
  echo &quot;Please supply an architecture name and configure file&quot;
  usage
fi
  
# Build architecture
export ARCH=$1

# Configure script
CONFIG=$2

# Export supplied CHOST or deduce by ARCH
if [ ! -z &quot;$CHOST&quot; ]; then
  export CHOST
else
  case $ARCH in
    armv7 | armv7s )
      export CHOST=arm-apple-darwin
      ;;
    arm64 )
      export CHOST=aarch64-apple-darwin
      ;;
    i386 | x86_64 )
      export CHOST=$ARCH-apple-darwin
      ;;
    * )
      usage
    ;;
  esac
fi

# Export supplied SDK or deduce by ARCH
if [ ! -z &quot;$SDK&quot; ]; then
  export SDK
  echo Using supplied SDK of &quot;$SDK&quot;
else
  case $ARCH in
    armv7 | armv7s | arm64 )
      export SDK=iphoneos
      ;;
    i386 | x86_64 )
      export SDK=iphonesimulator
      ;;
    * )
      usage
    ;;
  esac
fi

# Export supplied SDKVERSION or use system default
if [ ! -z &quot;$SDKVERSION&quot; ]; then
  SDKNAME=$(basename $(xcrun --sdk $SDK --show-sdk-platform-path) .platform)
  export SDKVERSION
  export SDKROOT=$(xcrun --sdk $SDK --show-sdk-platform-path)&quot;/Developer/SDKs/$SDKNAME.$SDKVERSION.sdk&quot;

  # If the SDK for the supplied version doesn&#39;t exist, use the current one  
  if [ ! -d &quot;$SDKROOT&quot; ]; then
    export SDKROOT=$(xcrun --sdk $SDK --show-sdk-path) # current version
  fi

else
  export SDKVERSION=$(xcrun --sdk $SDK --show-sdk-version) # current version
  export SDKROOT=$(xcrun --sdk $SDK --show-sdk-path) # current version
fi

# Export supplied SDKVERSION or use system default
if [ ! -z &quot;$SDKVERSION&quot; ]; then
  SDKNAME=$(basename $(xcrun --sdk $SDK --show-sdk-platform-path) .platform)
  export SDKVERSION
  export SDKROOT=$(xcrun --sdk $SDK --show-sdk-platform-path)&quot;/Developer/SDKs/$SDKNAME.$SDKVERSION.sdk&quot;

  # If the SDK for the supplied version doesn&#39;t exist, use the current one  
  if [ ! -d &quot;$SDKROOT&quot; ]; then
    export SDKROOT=$(xcrun --sdk $SDK --show-sdk-path) # current version
  fi

else
  export SDKVERSION=$(xcrun --sdk $SDK --show-sdk-version) # current version
  export SDKROOT=$(xcrun --sdk $SDK --show-sdk-path) # current version
fi

# Export supplied PREFIX or use default
if [ ! -z &quot;$PREFIX&quot; ]; then
  export PREFIX
else
  export PREFIX=&quot;/opt/$SDK-$SDKVERSION/$ARCH&quot;
fi

# Binaries
export CC=$(xcrun --sdk $SDK --find gcc)
export CPP=$(xcrun --sdk $SDK --find gcc)&quot; -E&quot;
export CXX=$(xcrun --sdk $SDK --find g++)
export LD=$(xcrun --sdk $SDK --find ld)

# Flags
export CFLAGS=&quot;$CFLAGS -arch $ARCH -isysroot $SDKROOT -I$PREFIX/include -mios-version-min=$SDKVERSION&quot;
export CPPFLAGS=&quot;$CPPFLAGS -arch $ARCH -isysroot $SDKROOT -I$PREFIX/include -mios-version-min=$SDKVERSION&quot;
export CXXFLAGS=&quot;$CXXFLAGS -arch $ARCH -isysroot $SDKROOT -I$PREFIX/include&quot;
export LDFLAGS=&quot;$LDFLAGS -arch $ARCH -isysroot $SDKROOT -L$PREFIX/lib&quot;
export PKG_CONFIG_PATH=&quot;$PKG_CONFIG_PATH&quot;:&quot;$SDKROOT/usr/lib/pkgconfig&quot;:&quot;$PREFIX/lib/pkgconfig&quot;

echo CFLAGS=&quot;$CFLAGS&quot;

# Remove script parameters
shift 2

# Run configure
$CONFIG \
        --prefix=&quot;$PREFIX&quot; \
        --host=&quot;$CHOST&quot; \
        $@
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/398187329037489819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/08/using-configure-scripts-to-make.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/398187329037489819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/398187329037489819'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/08/using-configure-scripts-to-make.html' title='Using configure scripts to make libraries for iOS'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-8625050748784294732</id><published>2020-08-09T21:48:00.001+01:00</published><updated>2020-09-08T17:28:49.363+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="wxWidgets"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode"/><title type='text'>Issues using wxWidgets on iOS</title><content type='html'>&lt;style&gt;
  .code_block {
    white-space: nowrap;
    background-color: black;
    border: none;
    color: #f2f2f2; 
    font-family: monaco; font-size: 8pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
    padding: 0.5em 0.5em 0.5em 0.5em;
    text-align: left;
    white-space: pre;
    display: flex;
    flex-wrap: nowrap; 
    overflow: auto;
  }
  .inline_code {
    background-color: black;
    border: none;
    color: #f2f2f2;
    font-family: monaco; font-size: 8pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
    padding: 0em 0.1em 0em 0.1em;
    white-space: nowrap;
  }
  h1 {
    font-family: monaco; font-size: 10pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
  }
  body {
    font-family: monaco; font-size: 9pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
  }
&lt;/style&gt;

&lt;h1&gt;PNG files fail to load (in the Simulator - not tried a real device yet) using the &#39;builtin&#39; PNG library&lt;/h1&gt;
&lt;div class=&quot;code_block&quot;&gt;Warning: no bitmap handler for type 50 defined.
Warning: CgBI: unhandled critical chunk
Error: Couldn&#39;t load a PNG image - file is corrupted or not enough memory.
Warning: Unknown image data format.&lt;/div&gt;

&lt;p&gt;To fix set:
&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;inline_code&quot;&gt;Compress PNG Files&lt;/span&gt; to &lt;span class=&quot;inline_code&quot;&gt;NO&lt;/span&gt;&lt;/li&gt;
and
&lt;li&gt;&lt;span class=&quot;inline_code&quot;&gt;Remove Text Metadata From PNG Files&lt;/span&gt; to &lt;span class=&quot;inline_code&quot;&gt;NO&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/p&gt;

&lt;h1&gt;Full screen&lt;/h1&gt;
&lt;p&gt;Currently wxWidgets doesn&#39;t support switching between full screen and non-full screen but I&#39;m working on a patch.&lt;/p&gt;
&lt;p&gt;To get fullscreen to work in the current version (3.1.5) you need to set your application to have a lanch screen storyboard and hide the status bar in the setting panel of the target application&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/8625050748784294732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/08/issues-using-wxwidgets-on-ios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/8625050748784294732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/8625050748784294732'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/08/issues-using-wxwidgets-on-ios.html' title='Issues using wxWidgets on iOS'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-6722604671848042023</id><published>2020-08-08T16:40:00.001+01:00</published><updated>2020-08-09T21:53:43.008+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode"/><title type='text'>EXC_BAD_ACCESS code=50 when launching an iOS Application under the simulator</title><content type='html'>&lt;style&gt;
  .code_block {
    white-space: nowrap;
    background-color: black;
    border: none;
    color: #f2f2f2; 
    font-family: monaco; font-size: 8pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
    padding: 0.5em 0.5em 0.5em 0.5em;
    text-align: left;
    white-space: pre;
    display: flex;
    flex-wrap: nowrap; 
    overflow: auto;
  }
  .inline_code {
    background-color: black;
    border: none;
    color: #f2f2f2;
    font-family: monaco; font-size: 8pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
    padding: 0em 0.1em 0em 0.1em;
    white-space: nowrap;
  }
  h1 {
    font-family: monaco; font-size: 10pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
  }
  body {
    font-family: monaco; font-size: 9pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
  }
&lt;/style&gt;

&lt;p&gt;If you get an &lt;span class=&quot;inline_code&quot;&gt;EXC_BAD_ACCESS&lt;/span&gt; error with &lt;span class=&quot;inline_code&quot;&gt;code = 50&lt;/span&gt; when running an iOS application under the simulator, disable the hardened runtime for the simulator&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;inline_code&quot;&gt;Enable Hardened Runtime&lt;/span&gt; &amp;gt; &lt;span class=&quot;inline_code&quot;&gt;Debug&lt;/span&gt; &amp;gt; &lt;span class=&quot;inline_code&quot;&gt;Any iOS Simulator SDK&lt;/span&gt; &lt;span class=&quot;inline_code&quot;&gt;No&lt;/span&gt;. The compile options for real devices can be left on &lt;span class=&quot;inline_code&quot;&gt;Yes&lt;/span&gt;.
&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/6722604671848042023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/08/excbadaccess-code50-when-launching-ios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/6722604671848042023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/6722604671848042023'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/08/excbadaccess-code50-when-launching-ios.html' title='EXC_BAD_ACCESS code=50 when launching an iOS Application under the simulator'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-8022053948546151220</id><published>2020-08-03T14:30:00.011+01:00</published><updated>2020-08-03T17:40:38.807+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="MacOS"/><category scheme="http://www.blogger.com/atom/ns#" term="wxWidgets"/><title type='text'>Issues I have run into when building wxWidgets</title><content type='html'>&lt;style&gt;
  .code_block {
    white-space: nowrap;
    background-color: black;
    border: none;
    color: #f2f2f2; 
    font-family: monaco; font-size: 8pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
    padding: 0.5em 0.5em 0.5em 0.5em;
    text-align: left;
    white-space: pre;
    display: flex;
    flex-wrap: nowrap; 
    overflow: auto;
  }
  .inline_code {
    background-color: black;
    border: none;
    color: #f2f2f2;
    font-family: monaco; font-size: 8pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
    padding: 0em 0.1em 0em 0.1em;
    white-space: nowrap;
  }
  h1 {
    font-family: monaco; font-size: 12pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
  }
  ul {
    text-align: left;
  }
&lt;/style&gt;
&lt;h1&gt;Generally&lt;/h1&gt;
&lt;ul&gt;&lt;li&gt;If the (full?) directory name contains an apostrophe (&#39;) you get an error message along the lines of:
  &lt;div class=&quot;code_block&quot;&gt;syntax error near unexpected token &#39;(&#39;
 *\&#39;*) ac_optarg=`$as_echo &quot;$ac_optarg&quot; | sed &quot;s/&#39;/&#39;\\\\\\\\&#39;&#39;/g&quot;` ;;&#39;&quot; &lt;/div&gt;&lt;/li&gt;
  &lt;li&gt;If the (full?) directory name contains a space the build will fail.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;For iOS&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;s&gt;The C and CPP flages &lt;span class=&quot;inline_code&quot;&gt;-miphoneos-min-version&lt;/span&gt; need changing to &lt;span class=&quot;inline_code&quot;&gt;-mios-min-version&lt;/span&gt;.&lt;/s&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/8022053948546151220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/08/issues-i-have-run-into-when-building.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/8022053948546151220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/8022053948546151220'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/08/issues-i-have-run-into-when-building.html' title='Issues I have run into when building wxWidgets'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-2939836960548581923</id><published>2020-07-13T17:54:00.043+01:00</published><updated>2020-08-03T17:53:50.254+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LanMan"/><category scheme="http://www.blogger.com/atom/ns#" term="RISC-OS"/><category scheme="http://www.blogger.com/atom/ns#" term="RiscOS"/><category scheme="http://www.blogger.com/atom/ns#" term="SMB2"/><title type='text'>Building GCC for RISC-OS</title><content type='html'>&lt;style&gt;
  .code_block {
    white-space: nowrap;
    background-color: black;
    border: none;
    color: #f2f2f2; 
    font-family: monaco; font-size: 8pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
    padding: 0.5em 0.5em 0.5em 0.5em;
    text-align: left;
    white-space: pre;
    display: flex;
    flex-wrap: nowrap; 
    overflow: auto;
  }
  .inline_code {
    background-color: black;
    border: none;
    color: #f2f2f2;
    font-family: monaco; font-size: 8pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
    padding: 0em 0.1em 0em 0.1em;
    white-space: nowrap;
  }
&lt;/style&gt;

&lt;p&gt;The instructions at &lt;a href=&quot;https://www.riscos.info/index.php/Using_GCCSDK&quot;&gt;https://www.riscos.info/index.php/Using_GCCSDK&lt;/a&gt; are OK but you need to change the URL for the PPL library to &lt;span class=&quot;inline_code&quot;&gt;https://www.bugseng.com/external/ppl/download/ftp/releases/1.2/ppl-1.2.tar.gz&lt;/span&gt;
&lt;/p&gt;

&lt;div class=&quot;code_block&quot;&gt;$ mkdir gccsdk
$ cd gccsdk
$ svn co svn://svn.riscos.info/gccsdk/trunk/autobuilder/ autobuilder
$ svn co svn://svn.riscos.info/gccsdk/trunk/gcc4/ gcc4
$ cd gcc4
&lt;/div&gt;

&lt;p&gt;Before compiling, you need to edit &lt;span class=&quot;inline_code&quot;&gt;Makefile&lt;/span&gt; and change the PPL URL from&lt;/p&gt;
&lt;div class=&quot;code_block&quot;&gt;ftp://ftp.cs.unipr.it/pub/ppl/releases/$(PPL_VERSION)/ppl-$(PPL_VERSION).tar.gz&lt;/div&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;div class=&quot;code_block&quot;&gt;https://www.bugseng.com/external/ppl/download/ftp/releases/$(PPL_VERSION)/ppl-$(PPL_VERSION).tar.gz&lt;/div&gt;
&lt;p&gt;Once the change has been made you can continue building&lt;/p&gt;
&lt;div class=&quot;code_block&quot;&gt;$ ./build-world
&lt;/div&gt;

&lt;p&gt;Once gcc has built (it takes a long time and a few GB of disk space), you&#39;re ready to build the packages.&lt;/p&gt;
&lt;p&gt;To get autobuilder to compile the packages, you either need rman (I don&#39;t know where to get it), or apply the following patch to &lt;span class=&quot;inline_code&quot;&gt;autobuilder/build&lt;/span&gt;&lt;/p&gt;
&lt;div class=&quot;code_block&quot;&gt;--- build	(revision 7339)
+++ build	(working copy)
@@ -76,7 +76,7 @@
        popd
     fi
   fi
-  for build_prog in cvs svn wget autoconf automake rman realpath pkg-config doxygen xgettext unzip autoconf2.13 flex bison gperf glib-genmarshal xsltproc intltoolize automake-1.11 ; do
+  for build_prog in cvs svn wget autoconf automake realpath pkg-config doxygen xgettext unzip autoconf2.13 flex bison gperf glib-genmarshal xsltproc intltoolize automake-1.11 ; do
     if ! type $build_prog &gt; /dev/null 2&gt;&amp;amp;1 ; then
       echo &quot;Autobuilder: $build_prog not found; is it installed on your path?&quot;
       exit 1;
&lt;/div&gt;

&lt;p&gt;Or you can download my latest version from &lt;a href=&quot;https://github.com/Rob-McKay/riscos-autobuilder-packages/tree/master/libraries&quot;&gt;Git hub&lt;/a&gt;. Here you can also find the autobuilder files used to port libpopt and &lt;a href=&quot;https://github.com/sahlberg/libsmb2&quot;&gt;libsmb2&lt;/a&gt; to RISC-OS.

&lt;p&gt;And replace the &lt;span class=&quot;inline_code&quot;&gt;rman&lt;/span&gt; commands in &lt;span class=&quot;inline_code&quot;&gt;build/env/ro-install&lt;/span&gt; (lines 141 and 144 and in some of the packages setvars scripts) with &lt;span class=&quot;inline_code&quot;&gt;groff -mandoc -Thtml&lt;/span&gt;.
&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/2939836960548581923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/07/building-gcc-for-risc-os.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/2939836960548581923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/2939836960548581923'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/07/building-gcc-for-risc-os.html' title='Building GCC for RISC-OS'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-4150692817252820123</id><published>2020-07-13T11:58:00.003+01:00</published><updated>2020-07-15T19:40:11.909+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LanMan"/><category scheme="http://www.blogger.com/atom/ns#" term="OmniClient"/><category scheme="http://www.blogger.com/atom/ns#" term="RISC-OS"/><title type='text'>Setting up samba as a server for RISC-OS clients</title><content type='html'>&lt;style&gt;
  .code_block {
    white-space: nowrap;
    background-color: black;
    border: none;
    color: #f2f2f2; 
    font-family: monaco; font-size: 8pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
    padding: 0.5em 0.5em 0.5em 0.5em;
    text-align: left;
    white-space: pre;
    display: flex;
    flex-wrap: nowrap; 
    overflow: auto;
  }
  .inline_code {
    background-color: black;
    border: none;
    color: #f2f2f2;
    font-family: monaco; font-size: 8pt; font-stretch: normal; font-variant-ligatures: no-common-ligatures; line-height: normal;
    padding: 0em 0.1em 0em 0.1em;
    white-space: nowrap;
  }
&lt;/style&gt;
&lt;p&gt;Currently the RISC-OS Lan Manager !OmniClient protocol does not support SMB2 or
  later protocols.&lt;/p&gt;
&lt;p&gt;The following smb.conf file will allow RISC-OS clients to
  connect using the NT1 (CIFS) protocol. It exports users home folders and configured printers.&lt;/p&gt;
&lt;blockquote class=&quot;code_block&quot;&gt;# Run &#39;testparm&#39; to verify the config is correct after you modified it.
[global]
    workgroup = WORKGROUP
    security = user

    ntlm auth = ntlmv1-permitted
    client min protocol = NT1
    server min protocol = NT1

    passdb backend = tdbsam

    hosts allow = 192.168.200.

    printing = cups
    printcap name = cups
    load printers = yes
    cups options = raw

[homes]
    comment = Home Directories
    valid users = %S, %D%w%S
    browseable = No
    read only = No
    inherit acls = Yes

[printers]
    comment = All Printers
    path = /var/tmp
    printable = Yes
    create mask = 0600
    browseable = No
  
[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @printadmin root
    force group = @printadmin
    create mask = 0664
    directory mask = 0775&lt;/p&gt;
&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/4150692817252820123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/07/setting-up-samba-as-server-for-risc-os.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/4150692817252820123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/4150692817252820123'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/07/setting-up-samba-as-server-for-risc-os.html' title='Setting up samba as a server for RISC-OS clients'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-8071013216069820008</id><published>2020-06-24T17:34:00.000+01:00</published><updated>2020-06-25T08:33:54.498+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BIErrorDomain 3"/><category scheme="http://www.blogger.com/atom/ns#" term="Big Sur"/><category scheme="http://www.blogger.com/atom/ns#" term="MacOS"/><title type='text'>Running Mac OS Big Sur under Parallels</title><content type='html'>When I tried to install the developer preview of &lt;i&gt;Mac OS Big Sur&lt;/i&gt; in a Parallels VM on my Mid 2012 MacBook Pro, I got the dreaded &lt;i&gt;BIErrorDomain 3&lt;/i&gt; error when I tried to select a target disk.
&lt;br /&gt;
&lt;br /&gt;
I googled a lot of places and got lots of sort of answers. I tried creating a clean VM from the Recovery Partition and even that didn&#39;t work.
&lt;br /&gt;
&lt;br /&gt;
The solution I discovered was to add the following lines to the VMs boot flags.&lt;br /&gt;
&amp;nbsp;(Configuration &amp;gt; Hardware &amp;gt; Advanced Settings &amp;gt; Boot flags:)&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;devices.mac_hw_model=&quot;MacBookPro14,1&quot;&lt;br /&gt;
devices.smbios.board_id=&quot;Mac-B4831CEBD52A0C4C&quot;
&lt;/span&gt;&lt;/blockquote&gt;
You can also set these by editing the VMs &lt;i&gt;config.pvs&lt;/i&gt; file and adding them into the &lt;i&gt;SystemFlags&lt;/i&gt; section.
&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;SystemFlags&amp;gt;devices.mac_hw_model=&quot;MacBookPro14,1&quot;
devices.smbios.board_id=&quot;Mac-B4831CEBD52A0C4C&quot;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;lt;/SystemFlags&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;
With these settings the install proceeded as expected, rebooting a few times along the way.
&lt;br/&gt;
Unfortunately, it doesn&#39;t run very well.</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/8071013216069820008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/06/running-mac-os-big-sur-under-parallels.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/8071013216069820008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/8071013216069820008'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2020/06/running-mac-os-big-sur-under-parallels.html' title='Running Mac OS Big Sur under Parallels'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-3419828242804105169</id><published>2019-10-10T13:50:00.001+01:00</published><updated>2021-04-11T21:25:03.463+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="clang 9"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Installing clang 9 on ubuntu 18.04 LTS</title><content type='html'>&lt;ol&gt;
&lt;li&gt;Add llvm key to apt keys&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -&lt;/span&gt; 
&lt;/li&gt;
&lt;li&gt;Add llvm bionic clang 9 apt repo&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;sudo add-apt-repository -u &#39;http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main&#39;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Install clang 9&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;verdana&amp;quot; , sans-serif;&quot;&gt;sudo apt install clang-9&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/3419828242804105169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2019/10/installing-clang-9-on-ubuntu-1804-lts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/3419828242804105169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/3419828242804105169'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2019/10/installing-clang-9-on-ubuntu-1804-lts.html' title='Installing clang 9 on ubuntu 18.04 LTS'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-5449461265901761354</id><published>2017-10-21T22:03:00.000+01:00</published><updated>2018-02-06T21:12:57.363+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ThingsBoard"/><title type='text'>Setting up ThingsBoard</title><content type='html'>&lt;p&gt;Recently I have been playing with ThingsBoard and decided to setup a local install of ThingsBoard on a virtual machine.&lt;/p&gt;

&lt;p&gt;I decided to create a new Centos 7 VM since that is my preferred Linux distribution and it is supported by ThingsBoard.&lt;/p&gt;
&lt;p&gt;
Things to remember when setting it up:-
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Add the EPEL repository to yum&lt;br /&gt;
&lt;pre&gt;yum install epel-release
yum repolist&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Install Java 8 - OpenJava 8 is OK&lt;br /&gt;
&lt;pre&gt;yum install java-1.8.0-openjdk java-1.8.0-openjdk-devel
alternatives --config java&lt;/pre&gt;
and ensure java 1.8 is the default
&lt;/li&gt;
&lt;li&gt;Follow the instructions on &lt;a href=&quot;https://thingsboard.io/docs/user-guide/install/linux/&quot;&gt;https://thingsboard.io/docs/user-guide/install/linux/&lt;/a&gt; up to the point of downloading the RPM file. Once ThingsBoard RPM file is downloaded use &lt;code&gt;yum installlocal &lt;/code&gt;&amp;lt;ThingsBoard RPM file&amp;gt;
&lt;/li&gt;
&lt;li&gt;Optionally edit the ThingsBoard conflict file to use port 80&lt;/li&gt;
&lt;li&gt;Add the ports ThingsBoard is using to the firewall. 
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;firewall-cmd --permanent --add-port=8080/tcp&lt;/code&gt; (for default)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;firewall-cmd --permanent --add-port=80/tcp&lt;/code&gt; (for port 80)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;firewall-cmd --permanent --add-port=1883/tcp&lt;/code&gt; (for MQTT)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;firewall-cmd --reload&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Connect your web browser to the Centos machine on the chosen port. You will be asked to login. The default username is &lt;em&gt;sysadmin@thingsboard.org&lt;/em&gt; with a password of &lt;em&gt;sysadmin&lt;/em&gt;. Now change the password and add tenants and devices etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/5449461265901761354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2017/10/setting-up-thingsboard.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/5449461265901761354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/5449461265901761354'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2017/10/setting-up-thingsboard.html' title='Setting up ThingsBoard'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-4907101747858811425</id><published>2017-03-19T21:49:00.002+00:00</published><updated>2017-03-19T21:49:35.712+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iOS"/><category scheme="http://www.blogger.com/atom/ns#" term="tvOS"/><category scheme="http://www.blogger.com/atom/ns#" term="watchOS"/><title type='text'>Downloading Apple simulators manually</title><content type='html'>&lt;p&gt;The other day I decided to download the latest tvOS simulator but the download via Xcode kept failing! I decided to try and download it manually. After a quick google I found that the URL of the download was displayed in the system console the you cancelled the download.&lt;/p&gt;
&lt;p&gt;After copying the download URL into Safari, and also using curl via the command line, I had no better luck :(&lt;/p&gt;
 To get the download to work successfully I found that I had to change the URL from https to http and it just worked! :)&lt;/p&gt;

&lt;p&gt;The steps I followed are:

&lt;ol&gt;&lt;li&gt;Open XCode, open preferences, go to the Downloads section.&lt;/li&gt;
&lt;li&gt;Open the Console App, clear the console for your device (not strictly necessary but makes it easier to find the URL later).&lt;/li&gt;
&lt;li&gt;Go back to the XCode preferences. Start the simulator download, then cancel it.
&lt;li&gt;Now in the Console, you will see something about the cancellation with the download URL.
&lt;li&gt;Copy the URL from the Console. Then in Terminal in some suitable directory, download it:  &lt;pre&gt;curl http://[the url you copied] -O -R &lt;/pre&gt; (the letter O, not a zero) 
&lt;li&gt;Finally, copy this file to ~/Library/Caches/com.apple.dt.Xcode/Downloads
&lt;li&gt;In XCode, in the Downloads section, start the Simulator download again, it should find the file you downloaded and install it.
&lt;/ol&gt;
&lt;/p&gt;

Example:
&lt;pre style=&quot;padding:4px;background-color:black;color:white;overflow:scroll; width:100%;&quot;&gt;
robs-macbookpro:~ rob$ curl http://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.AppleTVSimulatorSDK10_0-10.0.1.1474488730.dmg -O -R
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1073M  100 1073M    0     0   601k      0  0:30:25  0:30:25 --:--:--  565k
robs-macbookpro:~ rob$ cp com.apple.pkg.AppleTVSimulatorSDK10_0-10.0.1.1474488730.dmg ~/Library/Caches/com.apple.dt.Xcode/Downloads/
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/4907101747858811425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2017/03/downloading-apple-simulators-manually.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/4907101747858811425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/4907101747858811425'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2017/03/downloading-apple-simulators-manually.html' title='Downloading Apple simulators manually'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-6455541071354452800</id><published>2015-03-02T10:10:00.001+00:00</published><updated>2015-03-02T10:59:37.889+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="F#"/><category scheme="http://www.blogger.com/atom/ns#" term="Microsoft Advertising SDK"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>How to remove Microsoft Advertising SDK and other packages</title><content type='html'>&lt;p&gt;From an elevated Powershell prompt, enter the following command:&lt;/p&gt;

&lt;h2&gt;Remove Microsoft Advertising SDK&lt;/h2&gt;

&lt;code&gt;gwmi Win32_Product -Filter &quot;Name LIKE &#39;Microsoft Advertising%&#39;&quot; | foreach { $_.Uninstall() }&lt;code&gt;

&lt;h2&gt;Remove Visual F#&lt;/h2&gt;

&lt;code&gt;gwmi Win32_Product -Filter &quot;Name LIKE &#39;Visual F#%&#39;&quot; | foreach { $_.Uninstall() }&lt;code&gt;


&lt;p&gt;You will also need to update the &lt;i&gt;extension.vsixmanifest&lt;/i&gt; and &lt;i&gt;vspackage.pkgdef&lt;/i&gt; files&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/6455541071354452800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2015/03/how-to-remove-microsoft-advertising-sdk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/6455541071354452800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/6455541071354452800'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2015/03/how-to-remove-microsoft-advertising-sdk.html' title='How to remove Microsoft Advertising SDK and other packages'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-2987002340001722200</id><published>2013-12-17T21:27:00.001+00:00</published><updated>2020-06-25T17:45:30.330+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MS-DOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 10"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 8"/><title type='text'>Windows 8 32 bit supports 16 bit MS-DOS apps</title><content type='html'>A lot of people are under the impression that MS-DOS applications are no longer supported under Windows 8. The 32bit version of Windows 8 does support 16 bit DOS apps.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve recently been looking at updating a very old but useful FoxPro MS DOS App which we had been using on a creaky old Windows XP machine. Being a lot of effort to convert to a more modern framework I decided to investigate the possibility of using it on Windows 8. From past experience, I knew it would not work on the 64 bit version of Windows 7 so I assmumed the same was true of Windows 8.&lt;br /&gt;
&lt;br /&gt;
To my surprise, it just worked on the 32 bit version of Windows 8 Professional! The only problem was that the keyboard layout was US not UK. Why can&#39;t Microsoft set the keyboard layout correctly given that it was a UK version of Windows 8 I installed, not an international version I don&#39;t know. To fix the keyboard layout problem all I neede to do was to edit the autoexec.nt and config.nt files (found in c:\windows\system32) just like in the old DOS days, by adding the lines detailed below.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;CONFIG.NT&lt;/b&gt;&lt;br /&gt;
COUNTRY=044,850,C:\Windows\System32\COUNTRY.SYS
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;AUTOEXEC.NT&lt;/b&gt;&lt;br /&gt;
C:\Windows\System32\KB16 UK,850,C:\Windows\System32\KEYBOARD.SYS
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Update 25-June-2020:&lt;/span&gt;&lt;br /&gt;
16 bit applications still work in Windows 10 32 bit pro.</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/2987002340001722200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2013/12/windows-8-32-bit-supports-16-bit-ms-dos.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/2987002340001722200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/2987002340001722200'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2013/12/windows-8-32-bit-supports-16-bit-ms-dos.html' title='Windows 8 32 bit supports 16 bit MS-DOS apps'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-5685382880356466747</id><published>2013-05-19T21:13:00.000+01:00</published><updated>2013-05-19T21:13:14.199+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="TFS"/><title type='text'>Specifying TFS 2012 Express Database Location</title><content type='html'>&lt;p&gt;Over the past few weeks I&#39;ve been planning the migration of a number of source control repositories to new TFS 2012 repository.&lt;/p&gt;
&lt;p&gt;I&#39;m not sure how I&#39;m going to handle the migration of the source files yet but I&#39;ll probably just check the existing sources into the new repository since keeping the history is not important.&lt;/p&gt;
&lt;p&gt;Installing &lt;em&gt;TFS 2012 Express edition&lt;/em&gt; was straight forward but it didn&#39;t set thing up as I wanted.&lt;/p&gt;
&lt;p&gt;It installed the database into the programs files directory tree on the system drive which I didn&#39;t want since the system partition of my server does not have the majority of the free disk space and data should live on the data drive.&lt;/p&gt;
&lt;p&gt;The easiest way I found to solve this issue was to install &lt;em&gt;SQL Server Express 2012&lt;/em&gt; before installing &lt;em&gt;TFS 2012 Express&lt;/em&gt;. During the install of &lt;em&gt;SQL Server Express 2012&lt;/em&gt; you can easily set the location of the folder where it stores its databases. Once &lt;em&gt;SQL Express 2012&lt;/em&gt; was installed, you install &lt;em&gt;TFS&lt;/em&gt; and it finds the instance of &lt;em&gt;SQL Server Express 2012&lt;/em&gt; you just installed and uses it and puts its collection databases in the &lt;em&gt;SQL Server instance&#39;s&lt;/em&gt; default database directory.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/5685382880356466747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2013/05/specifying-tfs-2012-express-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/5685382880356466747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/5685382880356466747'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2013/05/specifying-tfs-2012-express-database.html' title='Specifying TFS 2012 Express Database Location'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-5868407066417757064</id><published>2012-10-25T09:55:00.002+01:00</published><updated>2012-10-25T10:00:28.344+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><category scheme="http://www.blogger.com/atom/ns#" term="undeclared namespace"/><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><title type='text'>Processing xml fragments which include namespaces in C#</title><content type='html'>&lt;p&gt;Recently I needed to process an xml fragment using .Net&#39;s XmlReader class. This worked fine until the fragment contained a reference to a namespace when it started throwing undeclared namespace exceptions. In my case the namespace was xmlmime which is not included in the default namespace manager.&lt;/p&gt;

&lt;p&gt;After searching the web for examples I found that there was a general lack of examples which use XmlReader. Mostly they use XmlTextReader which for various reasons I was unable to use in the project I was working on. Below is an example snippet of code which show how to overcome the undeclared namespace exception I was getting when trying to read the fragment.&lt;/p&gt;

&lt;pre&gt;
byte[] xmlBytes = System.Text.Encoding.UTF8.GetBytes(xmlString);
MemoryStream stream = new MemoryStream(xmlBytes, false);

// Create the namespace required to process configuration xml objects
XmlNamespaceManager namespaceManager = new XmlNamespaceManager(new NameTable());
namespaceManager.AddNamespace(&quot;xmlmime&quot;, &quot;http://www.w3.org/2004/11/xmlmime&quot;);
namespaceManager.AddNamespace(&quot;another&quot;, &quot;urn:something&quot;);

// Create the context required to parse configuration fragments
var context = new XmlParserContext(null, namespaceManager, null, XmlSpace.Default);

// Create the xml reader with the required context to parse a configuration object
var xmlReader = XmlReader.Create(stream, null, context);

while (xmlReader.Read())
{
 switch (xmlReader.NodeType)
 {
  case XmlNodeType.Element:
   // process element
   break;
 }
}

&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/5868407066417757064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2012/10/processing-xml-fragments-which-include.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/5868407066417757064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/5868407066417757064'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2012/10/processing-xml-fragments-which-include.html' title='Processing xml fragments which include namespaces in C#'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-9050585981265756185</id><published>2012-09-03T15:20:00.000+01:00</published><updated>2012-09-09T11:10:44.219+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Server Core"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Uninstall"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Server"/><title type='text'>Uninstalling SQL Server from Windows 2008 R2 server core</title><content type='html'>&lt;h1&gt;How hard can it be to uninstall SQL Server from Windows Server 2008 R2 core?&lt;/h1&gt;
&lt;p&gt;It should be straight forward but first I had to find the magic uninstall command - setup.exe which is located in the &lt;code&gt;Setup Bootstrap\SQLServer2012&lt;/code&gt; folder in the folder that SQL server 2012 was installed in to in the first place. On my machine this is &lt;code&gt;C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\SQLServer2012&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It took me some time but eventually I found the following command worked 
&lt;br&gt;&lt;code&gt;setup /action=uninstall /FEATURES=SQL,Tools,RS,AS,IS /INSTANCENAME=MSSQLSERVER /UIMODE=EnableUIOnServerCore&lt;/code&gt;.&lt;br&gt;I tried using &lt;code&gt;/QS&lt;/code&gt; instead of &lt;code&gt;/UIMODE=EnableUIOnServerCore&lt;/code&gt; but it couldn&#39;t find any features to uninstall!&lt;/p&gt;

&lt;p&gt;It also allowed me to select all of the components including the shared components - which is the only way I found to remove all of them apart from the native client.&lt;/p&gt;

&lt;p&gt;To remove the Native Client use:&lt;br&gt;&lt;code&gt;msiexec /uninstall {49D665A2-4C2A-476E-9AB8-FCC425F526FC}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It does leave a few log files and empty directories floating around but they are easily cleaned up.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/9050585981265756185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2012/09/uninstalling-sql-server-from-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/9050585981265756185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/9050585981265756185'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2012/09/uninstalling-sql-server-from-windows.html' title='Uninstalling SQL Server from Windows 2008 R2 server core'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-8030269873367254345</id><published>2012-07-02T13:47:00.000+01:00</published><updated>2012-07-02T13:47:02.705+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2008R2"/><category scheme="http://www.blogger.com/atom/ns#" term="Broken"/><category scheme="http://www.blogger.com/atom/ns#" term="dead"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Server"/><title type='text'>Recovering a Windows 2008R2 server with a dead motherboard</title><content type='html'>&lt;h1&gt;Background&lt;/h1&gt;
&lt;p&gt;Earlier this week our Windows 2008 R2 based domain server started having random crashes and then finally it would not even restart to the BIOS screen.&lt;/p&gt;

&lt;p&gt;We have regular backups so we were not unduely worried and thought that this would be an ideal time to update the server hardware especially as we didn&#39;t have any hardware that was remotely similar to the existing server.&lt;/p&gt;

&lt;h1&gt;Method&lt;/h1&gt;
&lt;p&gt;My first attempt was to make a copy of the disk (all the partitions using Clonezilla) and the try and boot the new hardware from this copy. Unfotrunately all that happened was the monitor would flash and the machine restarted to the recovery options screen. It didn&#39;t seem to matter what options I selected it made no difference.&lt;/p&gt;
&lt;p&gt;Next I tried booting to DSRM and restored the server with exactly the same result!&lt;/p&gt;
&lt;p&gt;Finally, I copied the disk again and this time I used the information I found after searching the internet some more in &lt;a href=&quot;http://www.minasi.com/forum/topic.asp?TOPIC_ID=31980&quot;&gt;Mark Minasi&#39;s forum&lt;/a&gt;. He has a lot of very interesting information in his forums for sys ops and I should have remembered to chek there first. His descriptions are usually much much better than Microsofts.&lt;/p&gt;
&lt;p&gt;It turned our all I needed to do in the recovery console was:&lt;br&gt;&lt;ol&gt;
&lt;li&gt;do bcdedit /v to get the GUID of the OS entry you&#39;re booting.&lt;/li&gt;
&lt;li&gt;With that guid, type&lt;br&gt;
bcdedit /set {FILLINTHEGUIDHERE} detecthal on&lt;/li&gt;
&lt;li&gt;Ran regedit&lt;/li&gt;
&lt;li&gt;Navigated to HKLM&lt;/li&gt;
&lt;li&gt;Selected File, Load Hive (Note: Must be under HKLM first, or this option will be greyed out)&lt;/li&gt;
&lt;li&gt;Navigated to C:\Windows\System32\Config\SYSTEM&lt;/li&gt;
&lt;li&gt;Loaded hive HKEY_LOCAL_MACHINE (which mounts as a sub-hive)&lt;/li&gt;
&lt;li&gt;changed Restored_HKLM\ControlSet001\services\msahci\Start to 0&lt;/li&gt;
&lt;li&gt;Select File, Unload Hive (may need to select the hive node in HKLM)&lt;/li&gt;
&lt;li&gt;Restart&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And it WORKED. All I had to do now was install some missing drivers off the new computers CD and re-activate the licence.&lt;/p&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;The steps are very simple once you know how. The hardest bit of this whole thing was actually getting the information.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/8030269873367254345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2012/07/recovering-windows-2008r2-server-with.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/8030269873367254345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/8030269873367254345'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2012/07/recovering-windows-2008r2-server-with.html' title='Recovering a Windows 2008R2 server with a dead motherboard'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2571767757762037468.post-8656365909465383131</id><published>2012-06-18T00:04:00.002+01:00</published><updated>2012-06-18T00:04:40.649+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Raspberry Pi"/><category scheme="http://www.blogger.com/atom/ns#" term="RiscOS"/><title type='text'>Raspberry Pi musings part 3</title><content type='html'>&lt;p&gt;This week I managed to sort out my Raspberry Pi power supply problems. I purchased a Nokia N97 UK 3 Pin Mains Charger AC-10X and this seems to do the trick. The Raspberry Pi seems quite sensitive to what is powering it.&lt;/p&gt;

&lt;p&gt;This weekend I decided that since a version of RiscOS was available for the Raspberry Pi, I would give it a go and see how it compares to old Acorn hardware.&lt;/p&gt;

&lt;p&gt;I know it&#39;s pre-alpha but unfortunately I have failed to get it to load. The display gets a signal so that it comes out of powersave mode but no picture, the keyboard LEDs come on and the mouse lights up, but that&#39;s as far as it gets. The screen is getting a signal but the keyboard doesn&#39;t respond.&lt;/p&gt;

&lt;p&gt;I tried updating the boot loaders etc but this only makes things worse. With the new loaders the screen does not even get a signal and nor do the keyboard or mouse.&lt;/p&gt;

&lt;p&gt;I&#39;m going to give up on RiscOS at the moment and switch back to spending the little time I have for playing to tinkering in Linux until RiscOS has a more stable release.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://robs-got-a-blog.blogspot.com/feeds/8656365909465383131/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://robs-got-a-blog.blogspot.com/2012/06/raspberry-pi-musings-part-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/8656365909465383131'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2571767757762037468/posts/default/8656365909465383131'/><link rel='alternate' type='text/html' href='http://robs-got-a-blog.blogspot.com/2012/06/raspberry-pi-musings-part-3.html' title='Raspberry Pi musings part 3'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Barnstaple, Devon, UK</georss:featurename><georss:point>51.0781599 -4.058338</georss:point><georss:box>51.0582079 -4.09782 51.098111900000006 -4.018856</georss:box></entry></feed>