Installing and setting up github cli
Tags Git Programming Terminal Github Linux Workflow Web Development
Tags Git Programming Terminal Github Linux Workflow Web Development
Started working on a side project I’m calling “Pitch”. It’s an end to end encrypted website starter inspired by SiteJS by the Small Technology Foundation.
Got a basic vue app set up with the vue-cli but now can’t work out why my private key generator sometimes returns what I expect — a Uint8Array — and more often a mess of random characters.
Am I misunderstanding something I wonder?
Tags Programming Docker Web Development Elasticsearch Kibana
sudo find . -type d -exec chmod g+rwx {} +
sudo find . -type f -exec chmod g+rw {} +
I tend to have my screenshots set to the highest resolution when saving on my PlayStation 4.
However, when I upload to the screenshots area of this website, I don’t want the images to be that big — either in dimensions or file size.
This snippet is how I bulk convert those images ready for uploading. I use an Ubuntu 20.04 operating system when running this.
# Make sure ImageMagick is installed
sudo apt install imagemagick
# Run the command
mogrify -resize 1920x1080 -format jpg folder/*.png
You can change the width<strong>x</strong>height
dimensions after the -resize
flag for your own required size. As well as changing the required image format after the -format
flag.
For an older PHP project, I needed to install an older version of PHP. This is what I did to set that up.
sudo add-apt-repository ppa:ondrej/php<br></br>sudo apt-get update<br></br>sudo apt-get install -y php7.1
Some of these binds are probably not need. I think the main ones, at least for my use case, were php
and phar
.
sudo update-alternatives --set php /usr/bin/php7.1<br></br>sudo update-alternatives --set phar /usr/bin/phar7.1<br></br>sudo update-alternatives --set phar.phar /usr/bin/phar.phar7.1<br></br>sudo update-alternatives --set phpize /usr/bin/phpize7.1<br></br>sudo update-alternatives --set php-config /usr/bin/php-config7.1
For some reason the --set
flag stopped working, so I had to use:
sudo update-alternatives --config php
sudo update-alternatives --config p
etc. And update each one with the terminal prompt options for each.
p.s. If using PHP-FPM, you could also set up different server conf files and point the FPM path to the version you need. My need was just because I was using the command line in the older project.
Today is the day when I finally started to learn a new programming language — one that I have never touched before. I had briefly touched on and considered Go. However, I have settled on Rust.
It is the first compiled language that I have started to learn and am looking forward to the challenges it will bring.
I will also be doing my best to blog about things I learn — much of it probably in more of a brain-dump format — to both help others as well as reinforcing my own learning.
These are currently random notes and are not much help to anybody yet. They will get tidied as I add to the page.
From inside a docker swarm manager node, there are two ways of creating a secret.
Using a string value:
printf <your_secret_value> | docker secret create your_secret_key -
Using a file path:
docker secret create your_secret_key ./your_secret_value.json
Docker swarm secrets are saved, encrypted, and are accessible to containers via a filepath:
/run/secrets/your_secret_key
.
https://www.bretfisher.com/docker-swarm-firewall-ports/
tags