Hmm, annoying. I was hoping to be able to say "if this isn't a list, and isn't a dict, then it might be a string" but instead "is sequence" returns true for list and dict and string... https://gist.github.com/JonTheNiceGuy/d19c26ed6ff7621fde1e84ceda8a473f
I am not a particularly good coder. As such take these as a suggestion of what could be, not what is happening! If this were to be accepted, it would need to be adopted by all the SSB clients (ssb-server, manyverse, etc). Also, this may be extremely simplistic and may produce far too many messages to the pool very quickly!
I asked on the Scuttlebutt IRC channel, and it was suggested that @MixMix might be interested in this?
| ssb_id="$(if command -v jq >/dev/null 2>&1 ; then ssb-server whoami | jq -r .id ; else ssb-server whoami | grep id | cut -d\" -f4 ; fi)" | |
| ssb-server publish --type about --about "$ssb_id" --name "JonTheNiceGuy" --description "Linux advocating geek. Fujitsu Distinguished Engineer since 2018. Blogging @ [jon.sprig.gs](jon.sprig.gs) | |
| [Twitter](https://twitter.com/JonTheNiceGuy)|[FB](https://facebook.com/JonTheNiceGuy)|[LinkedIn](https://linkedin.com/in/JonTheNiceGuy) @ JonTheNiceGuy | |
| 🗺️ [Glossop, Derbyshire, UK : Maidenhead Grid: IO93ak](http://levinecentral.com/ham/grid_square?Grid=IO93ak) - Amateur Radio Callsign: [G7VRI](https://hamqth.com/g7vri) | |
| He/Him | |
| SameAs [Blog](@EFWzZK2K+b++CbBszsVkAB+WHlRJtX2kX8ynaJp0nHA=.ed25519), [Mobile](@3SEA7qNZQPiYFCzY6K57f0LTc9l+Bk6cewQc6lbs/Ek=.ed25519), [Laptop 1](@p3gu8eLHxXC0cuvZ0yXSC05ZROB4X7dpxGCEydIHZ0o=.ed25519), [Laptop 2](@3xnWXOEsfSNvazULuT54WL8AxGcUNCRyBPbCWcR/1ow=.ed25519), [Tablet](@ayUZ+IXBH8zX0HLk8A6h9YzIGy+LKy/RDIKJOT/xeVQ=.ed25519), [dispatch.sprig.gs Pub](@xp+Z |
| # Some of this is based on https://peteris.rocks/blog/unattended-installation-of-wordpress-on-ubuntu-server/ | |
| # and https://www.hongkiat.com/blog/install-wordpress-locally-vagrant/ | |
| Vagrant.configure("2") do |config| | |
| config.vm.define "wordpress" do |wordpress| | |
| wordpress.vm.hostname = "wordpress" | |
| wordpress.vm.provider "virtualbox" do |vb| | |
| vb.name = "wordpress" | |
| end |
Here are three separate ways of using Ansible to perform system upgrades on an Ubuntu based system.
apt-update-upgrade.ymlThis is the absolute most basic playbook I use. It performs anapt update, thenapt full-upgradeand lastly anapt autoremoveandapt autoclean.apt-update-upgrade-only-once-a-day.ymlI use this in playbook where I'm repeatedly running it to do installs or reconfiguration, or where I haveunattended-upgradesinstalled.apt-update-upgrade-with-check.ymlOn systems where I'm not the only administrator, I don't always know whether I'll want to apply an upgrade, so this gives me a chance to list off what packages will be updated
This is an example of what I use with my work calendar, when I need to forward something to my personal calendar.
This macro does not include any of the meeting content (who will be there, what the content is), but is just to block out the time
to prevent your personal and professional lives from overlapping. This macro will create a new appointment for the time window,
optionally including the subject (or replace it with [WORK]) and optionally including the location (or replace it with [WORK]).
After the invite has been sent, it deletes the invite, so it doesn't look like you've got two meetings at the same time.
This script is used if you want to do a three-way sync between (for example) Dropbox, Nextcloud and Syncthing (depending on your personal deployment capabilities).
It should be relatively easy to determine what tweaks are needed to reduce this to a 2-way sync, or up to a 4, 5 or even 6 way sync.
This yml file shows the relationship between the tz_database values for regions (e.g. Europe/London) and the Fortigate "system global timezone" value (e.g. 25 = Europe/London).
The TZ Database names are taken from a Wikipedia entry on TZ values, and the Fortigate values are found by me splitting the strings (on comma's) from when I have tried auto-completing the timezone field on a Fortigate model.
It is not a perfect list! Updates welcome!!
I sometimes need to convert from a dictionary tree (like in data.yml) to a specific json formatted output file using Ansible.
In this case, I've used a combination of set_fact, a for loop and a combine filter to build my output. I'm
also using a regex_search to make sure I'm only getting records where the data I'm interested in is there!
Hope it's useful to people!
| --- | |
| - hosts: localhost | |
| vars: | |
| - dnsname: your.dns.name | |
| - tmppath: "./tmp/" | |
| - crtpath: "{{ tmppath }}{{ dnsname }}.crt" | |
| - pempath: "{{ tmppath }}{{ dnsname }}.pem" | |
| - csrpath: "{{ tmppath }}{{ dnsname }}.csr" | |
| - pfxpath: "{{ tmppath }}{{ dnsname }}.pfx" | |
| - private_key_password: "password" |