<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 5, 2020 at 8:53 PM Bryce Harrington <<a href="mailto:bryce.harrington@canonical.com">bryce.harrington@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">As followup to our retrospective, this past year I've found and played<br>
with several tools, that I thought might be worth show-and-telling<br></blockquote><div><br></div><div>Yes this is just what I had in mind - the storytelling to get attention to it.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
about, and given our corona-sprint we're in will do so via email:<br>
<br>
<br>
== so-trello ==<br>
<br>
This CLI allows programmatic interaction with Trello boards. It was<br>
written by our own Kernel team's Andy Whitcroft.<br>
<br>
This looks like it could be handy for bulk operations, cronned/automated<br>
card update tasks, and the like.<br>
<br>
So-trello can be downloaded from the snap store<br>
(<a href="https://snapcraft.io/so-trello" rel="noreferrer" target="_blank">https://snapcraft.io/so-trello</a>), or installed directly:<br>
<br>
$ sudo snap install so-trello<br>
<br>
<br>
== LXD Login ==<br>
<br>
I'm always looking for ways to improve my user experience with lxc<br>
containers. Logging in has always felt a bit baroque, so I've been<br>
scouring for simpler solutions. I found out that LXD supports<br>
'aliases', and that you can construct a login alias, which works pretty<br>
good.<br>
<br>
$ lxc alias add login 'exec @ARGS@ --mode interactive -- bash -xac $@bryce - exec /bin/login -p -f '<br>
<br>
(The trailing space after the -f is important). Replace 'bryce' with<br>
'ubuntu' or whatever username you use in your containers.<br>
<br>
Unfortunately, it still requires running `script /dev/null` after<br>
logging in... would love to figure out how to eliminate that step.<br>
<br>
Bonus, here's an alias to make a prettier lxc listing:<br>
<br>
$ lxc alias add ls 'list -c ns4,user.comment:comment'<br>
<br>
If I'm late to the party and y'all already know about lxd aliases, well<br>
boo, but show me *your* aliases! (And we should add this to starter<br>
docs...)<br>
<br>
<br>
== YAML Parser for Bash scripts - yaml.sh ==<br>
<br>
I like YAML and I like writing in Bash, but the two don't fit together<br>
naturally. Scouring the web for solutions, I found AdrianDC's yaml.sh<br>
which reads a YAML file and registers its parameters as prefixed ENV<br>
vars. Quite handy.<br>
<br>
yaml.sh can be downloaded from:<br>
<br>
$ wget <a href="https://raw.githubusercontent.com/jasperes/bash-yaml/master/script/yaml.sh" rel="noreferrer" target="_blank">https://raw.githubusercontent.com/jasperes/bash-yaml/master/script/yaml.sh</a><br>
<br>
<br>
== shellcheck ==<br>
<br>
Probably known to all Bash aficionados already, but 'shellcheck' is so<br>
handy worth extra mention. It runs a lint check on bash scripts to<br>
identify syntax improvements. Very helpful for catching errors too.<br>
<br>
$ sudo apt-get install shellcheck<br></blockquote><div><br></div><div>I use that as well and if you git-clone syntastic into your vim you'll get it integrated (along others) on writing a file.</div><div><span style="font-family:monospace"><span style="color:rgb(24,178,24)"><br></span></span></div> $ cd ~/.vim/bundle<br> $ git clone <a href="https://github.com/scrooloose/syntastic.git">https://github.com/scrooloose/syntastic.git</a></div><div class="gmail_quote"><br></div><div class="gmail_quote">And BTW tools ..., managing vim plugins with</div> $ apt install vim-pathogen<div class="gmail_quote"><span style="font-family:monospace"><font color="#000000"><br></font></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> == distro-info ==<br>
<br>
Another one I'm sure you all already know about, but if not, distro-info<br>
is another handy tool for looking up information about Debian and Ubuntu<br>
releases. Good way to avoid hardcoding things in your own scripts.<br>
<br>
$ sudo apt-get install distro-info<br>
<br>
What's the current development version's codename?<br>
<br>
$ distro-info -d<br>
focal<br>
<br>
What's bionic's release number?<br>
<br>
$ distro-info --release --series bionic | cut -d' ' -f1<br>
18.04<br>
<br>
Is disco still supported?<br>
<br>
$ (distro-info --supported | grep disco) || echo "Nope!"<br>
Nope!<br>
<br>
<br>
<br>
<br>
<br>
<br>
-- <br>
ubuntu-server mailing list<br>
<a href="mailto:ubuntu-server@lists.ubuntu.com" target="_blank">ubuntu-server@lists.ubuntu.com</a><br>
<a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-server" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-server</a><br>
More info: <a href="https://wiki.ubuntu.com/ServerTeam" rel="noreferrer" target="_blank">https://wiki.ubuntu.com/ServerTeam</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Christian Ehrhardt<br>Staff Engineer, Ubuntu Server<br>Canonical Ltd</div></div>