<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Spencer Krum</title>
    <description>The latest articles on Forem by Spencer Krum (@nibalizer).</description>
    <link>https://forem.com/nibalizer</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F193323%2F35f765ea-236e-40f9-8cc5-5d6069ddb63c.jpeg</url>
      <title>Forem: Spencer Krum</title>
      <link>https://forem.com/nibalizer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nibalizer"/>
    <language>en</language>
    <item>
      <title>Fixing "groot must be grub root device" on ibmcloud</title>
      <dc:creator>Spencer Krum</dc:creator>
      <pubDate>Mon, 04 May 2020 22:19:43 +0000</pubDate>
      <link>https://forem.com/nibalizer/fixing-groot-must-be-grub-root-device-on-ibmcloud-2j2k</link>
      <guid>https://forem.com/nibalizer/fixing-groot-must-be-grub-root-device-on-ibmcloud-2j2k</guid>
      <description>&lt;p&gt;Some images on ibmcloud have an issue when installing new kernels (and thus rebuilding the initramfs and grub config files).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# apt-get upgrade&lt;/span&gt;
...
Processing triggers &lt;span class="k"&gt;for &lt;/span&gt;initramfs-tools &lt;span class="o"&gt;(&lt;/span&gt;0.130ubuntu3.9&lt;span class="o"&gt;)&lt;/span&gt; ...
update-initramfs: Generating /boot/initrd.img-4.15.0-42-generic
I: The initramfs will attempt to resume from /dev/vdc
I: &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;UUID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;083a8bfd-95a8-4808-bd75-ed3c1be04dd4&lt;span class="o"&gt;)&lt;/span&gt;
I: Set the RESUME variable to override this.
Setting up ubuntu-server &lt;span class="o"&gt;(&lt;/span&gt;1.417.4&lt;span class="o"&gt;)&lt;/span&gt; ...
Processing triggers &lt;span class="k"&gt;for &lt;/span&gt;linux-image-4.15.0-99-generic &lt;span class="o"&gt;(&lt;/span&gt;4.15.0-99.100&lt;span class="o"&gt;)&lt;/span&gt; ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-4.15.0-99-generic
I: The initramfs will attempt to resume from /dev/vdc
I: &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;UUID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;083a8bfd-95a8-4808-bd75-ed3c1be04dd4&lt;span class="o"&gt;)&lt;/span&gt;
I: Set the RESUME variable to override this.
/etc/kernel/postinst.d/x-grub-legacy-ec2:
Searching &lt;span class="k"&gt;for &lt;/span&gt;GRUB installation directory ... found: /boot/grub
Searching &lt;span class="k"&gt;for &lt;/span&gt;default file ... found: /boot/grub/default
Testing &lt;span class="k"&gt;for &lt;/span&gt;an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
uuid not supported. update &lt;span class="s1"&gt;'groot'&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; /boot/grub/menu.lst

groot must be grub root device &lt;span class="o"&gt;(&lt;/span&gt;ie &lt;span class="s1"&gt;'(hd0)'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt; not &lt;span class="s1"&gt;'LABEL=cloudimg-rootfs'&lt;/span&gt;

run-parts: /etc/kernel/postinst.d/x-grub-legacy-ec2 exited with &lt;span class="k"&gt;return &lt;/span&gt;code 1
dpkg: error processing package linux-image-4.15.0-99-generic &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;--configure&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;:
 installed linux-image-4.15.0-99-generic package post-installation script subprocess returned error &lt;span class="nb"&gt;exit &lt;/span&gt;status 1
Processing triggers &lt;span class="k"&gt;for &lt;/span&gt;ureadahead &lt;span class="o"&gt;(&lt;/span&gt;0.100.0-21&lt;span class="o"&gt;)&lt;/span&gt; ...
Errors were encountered &lt;span class="k"&gt;while &lt;/span&gt;processing:
 linux-image-4.15.0-99-generic
E: Sub-process /usr/bin/dpkg returned an error code &lt;span class="o"&gt;(&lt;/span&gt;1&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Ooof. Very annoying.&lt;/p&gt;

&lt;p&gt;Until we get a fix everywhere, you can fix this very easily yourself. &lt;/p&gt;

&lt;p&gt;Edit: &lt;code&gt;/boot/grub/menu.lst&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Find this section:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;...
## default grub root device
## e.g. groot=LABEL=cloudimg-rootfs
# groot=LABEL=cloudimg-rootfs

...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Change &lt;code&gt;# groot=LABEL=cloudimg-rootfs&lt;/code&gt; to &lt;code&gt;# groot=(hd0)&lt;/code&gt; (leaving the comment)&lt;/p&gt;

&lt;p&gt;Then have the package manager try again&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# apt-get install -f
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This should succeed without issue. Then you can reboot to test the change&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# reboot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>ibm</category>
      <category>grub</category>
      <category>ibmcloud</category>
      <category>reboot</category>
    </item>
    <item>
      <title>PSA on Docker Images</title>
      <dc:creator>Spencer Krum</dc:creator>
      <pubDate>Sun, 12 Jan 2020 05:10:30 +0000</pubDate>
      <link>https://forem.com/nibalizer/psa-on-docker-images-3a2l</link>
      <guid>https://forem.com/nibalizer/psa-on-docker-images-3a2l</guid>
      <description>&lt;p&gt;I was surprised to find that the &lt;code&gt;ubuntu:latest&lt;/code&gt; tag was actually quite old.&lt;/p&gt;

&lt;p&gt;The way it seems to work is this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ubuntu:latest&lt;/code&gt; points to the last LTS release (now 18.04 which is pretty outdated)&lt;br&gt;
&lt;code&gt;ubuntu:rolling&lt;/code&gt; points to the last released version of ubuntu (currently 19.10).&lt;br&gt;
&lt;code&gt;ubuntu:devel&lt;/code&gt; points to the next to-be-released version of ubuntu (currently 20.04)&lt;/p&gt;

&lt;p&gt;My thoughts on when to use each:&lt;/p&gt;

&lt;p&gt;Broadly &lt;code&gt;ubuntu&lt;/code&gt; as a base image isn't what I'd use for applications anyways, I'd use a base image like &lt;code&gt;node&lt;/code&gt; or if making something myself I'd use an &lt;code&gt;alpine&lt;/code&gt; base image. I mostly use &lt;code&gt;ubuntu&lt;/code&gt; base images for docker images that I'll be using short term or interactively.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ubuntu:latest&lt;/code&gt; I probably won't use this ever again.&lt;br&gt;
&lt;code&gt;ubuntu:rolling&lt;/code&gt; I'll use this pretty much every time. Latest packages. Won't change on me. Drops support "soon" but if it does drop support I can just rebuild and I'll be on a supported image.&lt;br&gt;
&lt;code&gt;ubuntu:devel&lt;/code&gt; I'd only use this if I was specifically trying to get access to a bleeding-edge version of a package, probably on my way to getting something else to work.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Bash Prompt snip for IBM Cloud</title>
      <dc:creator>Spencer Krum</dc:creator>
      <pubDate>Wed, 11 Dec 2019 23:19:53 +0000</pubDate>
      <link>https://forem.com/nibalizer/bash-prompt-snip-for-ibm-cloud-4gpa</link>
      <guid>https://forem.com/nibalizer/bash-prompt-snip-for-ibm-cloud-4gpa</guid>
      <description>&lt;p&gt;The below script will add a pleasing visual queue of which account and region your are targeted at with IBM Cloud. Turn off color by setting &lt;code&gt;$IBMCLOUD_PS1_COLOR_NO&lt;/code&gt; to any value. &lt;code&gt;set_prompt&lt;/code&gt; and &lt;code&gt;PROMPT_COMMAND&lt;/code&gt; example below is just an example and you can use the &lt;code&gt;__ibmcloud_ps1&lt;/code&gt; function anywhere you'd configure your prompt.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Fbt7yZvx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ihw157695ddji3cw4yaf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Fbt7yZvx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ihw157695ddji3cw4yaf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# From Arch Wiki&lt;/span&gt;

&lt;span class="nv"&gt;txtblk&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[0;30m'&lt;/span&gt; &lt;span class="c"&gt;# Black - Regular&lt;/span&gt;
&lt;span class="nv"&gt;txtred&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[0;31m'&lt;/span&gt; &lt;span class="c"&gt;# Red&lt;/span&gt;
&lt;span class="nv"&gt;txtgrn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[0;32m'&lt;/span&gt; &lt;span class="c"&gt;# Green&lt;/span&gt;
&lt;span class="nv"&gt;txtylw&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[0;33m'&lt;/span&gt; &lt;span class="c"&gt;# Yellow&lt;/span&gt;
&lt;span class="nv"&gt;txtblu&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[0;34m'&lt;/span&gt; &lt;span class="c"&gt;# Blue&lt;/span&gt;
&lt;span class="nv"&gt;txtpur&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[0;35m'&lt;/span&gt; &lt;span class="c"&gt;# Purple&lt;/span&gt;
&lt;span class="nv"&gt;txtcyn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[0;36m'&lt;/span&gt; &lt;span class="c"&gt;# Cyan&lt;/span&gt;
&lt;span class="nv"&gt;txtwht&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[0;37m'&lt;/span&gt; &lt;span class="c"&gt;# White&lt;/span&gt;
&lt;span class="nv"&gt;bldblk&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[1;30m'&lt;/span&gt; &lt;span class="c"&gt;# Black - Bold&lt;/span&gt;
&lt;span class="nv"&gt;bldred&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[1;31m'&lt;/span&gt; &lt;span class="c"&gt;# Red&lt;/span&gt;
&lt;span class="nv"&gt;bldgrn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[1;32m'&lt;/span&gt; &lt;span class="c"&gt;# Green&lt;/span&gt;
&lt;span class="nv"&gt;bldylw&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[1;33m'&lt;/span&gt; &lt;span class="c"&gt;# Yellow&lt;/span&gt;
&lt;span class="nv"&gt;bldblu&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[1;34m'&lt;/span&gt; &lt;span class="c"&gt;# Blue&lt;/span&gt;
&lt;span class="nv"&gt;bldpur&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[1;35m'&lt;/span&gt; &lt;span class="c"&gt;# Purple&lt;/span&gt;
&lt;span class="nv"&gt;bldcyn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[1;36m'&lt;/span&gt; &lt;span class="c"&gt;# Cyan&lt;/span&gt;
&lt;span class="nv"&gt;bldwht&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[1;37m'&lt;/span&gt; &lt;span class="c"&gt;# White&lt;/span&gt;
&lt;span class="nv"&gt;unkblk&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[4;30m'&lt;/span&gt; &lt;span class="c"&gt;# Black - Underline&lt;/span&gt;
&lt;span class="nv"&gt;undred&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[4;31m'&lt;/span&gt; &lt;span class="c"&gt;# Red&lt;/span&gt;
&lt;span class="nv"&gt;undgrn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[4;32m'&lt;/span&gt; &lt;span class="c"&gt;# Green&lt;/span&gt;
&lt;span class="nv"&gt;undylw&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[4;33m'&lt;/span&gt; &lt;span class="c"&gt;# Yellow&lt;/span&gt;
&lt;span class="nv"&gt;undblu&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[4;34m'&lt;/span&gt; &lt;span class="c"&gt;# Blue&lt;/span&gt;
&lt;span class="nv"&gt;undpur&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[4;35m'&lt;/span&gt; &lt;span class="c"&gt;# Purple&lt;/span&gt;
&lt;span class="nv"&gt;undcyn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[4;36m'&lt;/span&gt; &lt;span class="c"&gt;# Cyan&lt;/span&gt;
&lt;span class="nv"&gt;undwht&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[4;37m'&lt;/span&gt; &lt;span class="c"&gt;# White&lt;/span&gt;
&lt;span class="nv"&gt;bakblk&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[40m'&lt;/span&gt;   &lt;span class="c"&gt;# Black - Background&lt;/span&gt;
&lt;span class="nv"&gt;bakred&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[41m'&lt;/span&gt;   &lt;span class="c"&gt;# Red&lt;/span&gt;
&lt;span class="nv"&gt;bakgrn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[42m'&lt;/span&gt;   &lt;span class="c"&gt;# Green&lt;/span&gt;
&lt;span class="nv"&gt;bakylw&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[43m'&lt;/span&gt;   &lt;span class="c"&gt;# Yellow&lt;/span&gt;
&lt;span class="nv"&gt;bakblu&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[44m'&lt;/span&gt;   &lt;span class="c"&gt;# Blue&lt;/span&gt;
&lt;span class="nv"&gt;bakpur&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[45m'&lt;/span&gt;   &lt;span class="c"&gt;# Purple&lt;/span&gt;
&lt;span class="nv"&gt;bakcyn&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[46m'&lt;/span&gt;   &lt;span class="c"&gt;# Cyan&lt;/span&gt;
&lt;span class="nv"&gt;bakwht&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[47m'&lt;/span&gt;   &lt;span class="c"&gt;# White&lt;/span&gt;
&lt;span class="nv"&gt;txtrst&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'\e[0m'&lt;/span&gt;    &lt;span class="c"&gt;# Text Reset&lt;/span&gt;


&lt;span class="c"&gt;# Prompt snippet to show ibmcloud account status &lt;/span&gt;
__ibmcloud_ps1&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; ~/.bluemix/config.json &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nv"&gt;ibm_user&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ~/.bluemix/config.json  | jq &lt;span class="s1"&gt;'.Account.Owner'&lt;/span&gt; | &lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'"'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
        &lt;span class="nv"&gt;region&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ~/.bluemix/config.json  | jq &lt;span class="s1"&gt;'.Region'&lt;/span&gt; | &lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'"'&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nt"&gt;-z&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;IBMCLOUD_PS1_COLOR_NO&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
            &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ibm_user&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;@&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;region&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
        &lt;span class="k"&gt;else
            &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\[&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;bldpur&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\]&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ibm_user&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\[&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;txtrst&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\]&lt;/span&gt;&lt;span class="s2"&gt;@&lt;/span&gt;&lt;span class="se"&gt;\[&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;bldylw&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\]&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;region&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\[&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;txtrst&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\]&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
        &lt;span class="k"&gt;fi
    fi&lt;/span&gt;

&lt;span class="o"&gt;}&lt;/span&gt;


&lt;span class="c"&gt;# Just an example of where this goes&lt;/span&gt;
set_prompt&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;PS1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"[&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;__ibmcloud_ps1&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;]"&lt;/span&gt;
    PS1+&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\[&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;bldgrn&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\]\u&lt;/span&gt;&lt;span class="s2"&gt;@&lt;/span&gt;&lt;span class="se"&gt;\h\[&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;txtrst&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\]&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="se"&gt;\[&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;bldblu&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\]\w\[&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;txtrst&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\]&lt;/span&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="nv"&gt;PROMPT_COMMAND&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;set_prompt

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



</description>
      <category>bash</category>
      <category>ibmcloud</category>
      <category>ps1</category>
    </item>
    <item>
      <title>xtrlock</title>
      <dc:creator>Spencer Krum</dc:creator>
      <pubDate>Wed, 10 Jul 2019 18:45:19 +0000</pubDate>
      <link>https://forem.com/nibalizer/xtrlock-1ebf</link>
      <guid>https://forem.com/nibalizer/xtrlock-1ebf</guid>
      <description>&lt;p&gt;Part of the devrel life is the booth. When I'm boothing, I like to have my laptop there and open to a cool project or demo. If I'm lucky, there will be a TV or monitor for me to connect to as well.&lt;/p&gt;

&lt;p&gt;Folks will come up and talk to me and ask me questions. That's great and literally what I am there for. But I get squeamish about being a step or two away from my unlocked computer. I also don't want to close or lock my computer. A lock screen looks weird in a booth. If my laptop is closed it is annoying to tell someone 'let me show you!' then we both wait around for an agonizing few seconds while I reconnect to wifi/ssh/whatever.&lt;/p&gt;

&lt;p&gt;Enter &lt;code&gt;xtrlock(1)&lt;/code&gt;. This utility has existed since at least 1993 and is part of a wonderful ecosystem of old Unix/X11 tools that have been largely forgotten. &lt;/p&gt;

&lt;p&gt;From the man page: &lt;code&gt;Lock X display until password supplied, leaving windows visible&lt;/code&gt;. This locks the screen for input, but leaves whatever I had open visible. That means slides, terminals, or demos are still being displayed and I have peace of mind that I'm not being compromised.&lt;/p&gt;

&lt;p&gt;Pratically, &lt;code&gt;xtrlock&lt;/code&gt; takes effect immediately and has no option for a delay. So what I actually do is type &lt;code&gt;sleep 5; xtrlock&lt;/code&gt; and use the five second sleep to hide/minimize whatever terminal that command was written in.&lt;/p&gt;

&lt;p&gt;I show various things, but one thing I'm trying to do is have terminal based demo scripts that can be run without my interaction. Unlike videos, they are running against real infrastructure, and I can &lt;code&gt;^C&lt;/code&gt; the script and dig in deeper to the demo with an attendee if I need to. That repo is &lt;a href="https://github.com/nibalizer/booth-demos"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devrel</category>
    </item>
    <item>
      <title>Hello World</title>
      <dc:creator>Spencer Krum</dc:creator>
      <pubDate>Wed, 10 Jul 2019 18:29:58 +0000</pubDate>
      <link>https://forem.com/nibalizer/hello-world-16l9</link>
      <guid>https://forem.com/nibalizer/hello-world-16l9</guid>
      <description>&lt;p&gt;Yay I made a dev.to account!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
