- Create or find a gist that you own.
- Clone your gist (replace
<hash>with your gist's hash):
# with ssh git clone firstname.lastname@example.org:<hash>.git mygist # with https git clone https://gist.github.com/<hash>.git mygist
Ricardo de Azambuja ricardodeazambuja
- Montreal / QC - Canada
|# This is responsible for making your current docker work with arm images:|
|# $ sudo apt install qemu qemu-user-static binfmt-support-|
|# And this line is responsible for enabling it (MUST run after a restart):|
|# $ docker run --privileged linuxkit/binfmt:v0.7|
|# bash generate random alphanumeric string|
|# bash generate random 32 character alphanumeric string (upper and lowercase) and|
|NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)|
|# bash generate random 32 character alphanumeric string (lowercase only)|
|cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1|
Remote OpenGL Setup without X
A full OpenGL profile requires X to be running. For X to run, it requires a display to be connected to the machine. Given that most server machines do not have this, it becomes difficult to run OpenGL.
This document details how to get OpenGL and X up and running without having a display connected to the sevrer.
You will need access to the remote system over SSH.
To run the tool, you will need
libX11.so. These are installed when X and the NVIDIA Drivers are installed. So there is nothing special required to install these.
Another tool I would recommend strongly is glewinfo. Most linux distributions ship this with the glew-utils package. An alternate to glewinfo is glxinfo which is present on all systems with X. You can substitute glewinfo with glxinfo in all the commands below if needed.
Docker - How to cleanup (unused) resources
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes $ docker volume rm $(docker volume ls -qf dangling=true) $ docker volume ls -qf dangling=true | xargs -r docker volume rm
|# I have no idea who is the author of the code|
|# in this cell that saves an image from a webcam|
|# inside google colab.|
|# It comes from a notebook called "📸 Take a photo with your webcam"|
|from IPython.display import HTML, Audio|
|from google.colab.output import eval_js|
|from base64 import b64decode|
|import numpy as np|