For a long time virtualenv Show archive.org snapshot was used to create isolated Python environments. This is not required anymore.
Since Python 3.3 a native venv module Show archive.org snapshot is shipped.
direnv
setup
A fast way to use this is the Python venv support Show archive.org snapshot from direnv Show archive.org snapshot :
echo "layout python python3" >> .envrc
echo "cowsay" >> requirements.txt
direnv allow
pip install -r requirements.txt
which cowsay
${PWD}/.direnv/python-3.10/bin/cowsay
Related cards:
Use pg_repack to do a VACUUM FULL without holding an exclusive lock during processing
You can use pg_repack
to do a VACUUM FULL
without holding an exclusive lock during processing.
There is still a need of one exclusive lock at the beginning and the end of the repacking process. But in the time between, you can use the affecte...
Why Apple Silicon MacBooks Can Only Use One External Display Through A Dock
It's quite confusing how many external displays are usable with a MacBook that uses an M1 or M2 Chip. Documentation on the Internet is sparse and not even the Geniuses at the Genius Bar are 100% sure. We found out some things and can explain the b...
Use Ubuntu 24.04 (Noble Numbat) with Vagrant
Canonical does not ship Ubuntu 24.04+ Vagrant images due to HashiCorps switch to the [Business Source License (BSL)](https://www.hashicorp.com/...
Use Terraform grouping mode like Golang's Ellipsis expression
The terraform documentation states the ...
syntax as (grouping mode*. See: Grouping-Results).
But this seems not the be the whole truth. Instead the ...
sy...
HowTo: Fix nginx not reloading with long gzip_types lines
When using many or very long entries of MIME-types that shoudl be gziped in gzip_types
directives in nginx
you might not be able to successfully reload the service and get this error message instead:
nginx: [emerg] could not build the tes...
Don't use flock with GlusterFS
We recently encountered a problem with GlusterFS (7.x) when an application used the flock
syscall on a GlusterFS path. If somehow two flock
syscalls are made at the same time, the lock will never be released. And all future flock
syscalls wi...
Don't use puppet `exec` type without `cwd` and `user` parameter
-
Don't use
exec
withoutuser
parameterIf you use
exec
withoutuser
parameter, the command will get executed as root. You mostly don't want this. -
There is a difference in the env variables of the exec if you run puppet man...
ACM certificate not showing up in CloudFront
Preface
Before you continue, ensure that you've created your certificate in the region us-east-1
(N. Virginia). Otherwise the certificate is not available for CloudFront.
The issue
At some point in time you may be confronted with the f...
When to use a function over a defined in Puppet
In Puppet, there are some differences between defined
and function
types when it comes to code encapsulation. In most cases, a defined type is best, but there are some situations where a function is more appropriate.
Use a defined type when:...
Use sudo with rsync
If you want to use rsync
to transfer files that don't belong to your user to another system you can combine it with sudo
. This doesn't require a direct root
login on the source or target system.
Command
ssh -A -t $SOURCE_SERVER...