poetry new <project-name>
poetry add <library>
*update: TBC, but this new might affect how easy it is to use this technique past August 2024: Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August
This gist, based in part on a gist by Brian Hartvigsen, allows you to export from Authy your TOTP tokens you have stored there.
Those can be "standard" 6-digits / 30 secs tokens, or Authy's own version, the 7-digits / 10 secs tokens.
#!/bin/bash | |
# The default BAR address space available on the CM4 may be too small to allow | |
# some devices to initialize correctly. To avoid 'failed to assign memory' | |
# errors on boot, you can increase the range of the PCIe bus in the Raspberry | |
# Pi's Device Tree (a .dtb file specific to each Pi model). | |
# | |
# You should probably read up on Device Trees if you don't know what they are: | |
# https://www.raspberrypi.org/documentation/configuration/device-tree.md | |
# |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Note: This gist may be outdated, thanks to all contributors in comments.
adb
is the Android CLI tool with which you can interact with your android device, from your PC
You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.
Don't hesitate to read comments, there is useful tips, thanks guys for this !
Create file /etc/systemd/system/docker-compose@.service
. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin
, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).
The key component we need to install is tigervnc-standalone-server
.
For this setup, I will use Ubuntu 20.04 LTS (Focal Fossa, unfortunately 22.04 does not work), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.
So let's go. First, we need a working WSL2 installation.
/* | |
force-inet4-or-inet6.c - hack to force applications to use IPv4 or IPv6 exclusively | |
compilation: cc -fPIC -shared -DUSE_INET4 -o force-inet4.so force-inet4-or-inet6.c | |
cc -fPIC -shared -DUSE_INET6 -o force-inet6.so force-inet4-or-inet6.c | |
usage: LD_PRELOAD=/path/to/library.so program args ... | |
This file is in the public domain. | |
*/ |