This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a really old post, in the comments (and stackoverflow too) you'll find better solutions. | |
def find(key, dictionary): | |
for k, v in dictionary.iteritems(): | |
if k == key: | |
yield v | |
elif isinstance(v, dict): | |
for result in find(key, v): | |
yield result | |
elif isinstance(v, list): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You try: | |
sudo dpkg --remove-architecture armhf | |
# and get: | |
# dpkg: error: cannot remove architecture 'armhf' currently in use by the database | |
# So you have to remove the armhf packages installed to be able to `dpkg --remove-architecture armhf` | |
apt-get remove --purge `dpkg --get-selections | grep armhf | awk '{print $1}'` | |
# Then: | |
sudo dpkg --remove-architecture armhf | |
# SUCCESS!!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Virtual box cant enumerate | |
Virtual box no usb devices detected | |
sudo usermod -aG vboxusers $USER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Example */ | |
/* Par */ | |
ul li:nth-child(even){ | |
background:#fff; | |
} | |
/* Ímpar */ | |
ul li:nth-child(odd){ | |
background:#000; |
Export your public key:
keybase pgp export > keybase-public.key
Export your private key:
keybase pgp export --secret > keybase-private.key
Check your current file/directory permission with:
stat -c "%a" /path/to/dir_or_file
To recursively give directories read&execute privileges:
find /path/to/base/dir -type d -exec chmod 755 {} +
Update 2023/03/02: Using Pop!_OS 22.04 LTS. Just install and enjoy, not much to say about, it just works.
Update 2020/05/19: I'm using PopOS 20.04. Works great!!
NOTE: At the moment Dell G3 series doesn't officially support Ubuntu 18.04.
This post on Reddit: https://www.reddit.com/r/Ubuntu/comments/b74vvb/ubuntu_1604_on_dell_g3/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.11-alpine3.17 | |
ENV PATH=$PATH:$HOMEAPP/.local/bin | |
ENV PYTHONPATH=$HOMEAPP:$PROJECT_NAME | |
# Python packages build dependencies | |
RUN apk add --no-cache --virtual .build-dependencies \ | |
# Essentials | |
gcc musl-dev openssl-dev openssl \ | |
# Pillow / PIL build dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* https://getbootstrap.com/docs/5.0/components/toasts/ */ | |
.toast-container { | |
position: fixed; | |
right: 20px; | |
top: 20px; | |
} | |
.toast:not(.showing):not(.show) { | |
display: none !important; |