Skip to content

Instantly share code, notes, and snippets.

Ricardo de Azambuja ricardodeazambuja

Block or report user

Report or block ricardodeazambuja

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ricardodeazambuja /
Created Feb 21, 2020 — forked from stefanbuck/
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
# Author: Stefan Buck
# License: MIT
# This script accepts the following parameters:
# * owner

How to add an image to a gist

  1. Create or find a gist that you own.
  2. Clone your gist (replace <hash> with your gist's hash):
    # with ssh
    git clone<hash>.git mygist
    # with https
    git clone<hash>.git mygist
View OpenCV on RPI Zero W
FROM ricardodeazambuja/pizero:aiy
# 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
View Remote OpenGL

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 and 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.

ricardodeazambuja / How To Open Another Terminal/Bash Instance In A Running Docker Container #gistblog #bash #docker

How To Open Another Terminal/Bash Instance In A Running Docker Container

Add the following to your bashrc.

#Add another docker window
function dock()
  if [ "$1" == "-h" ]
ricardodeazambuja / colab_xface_vnc.ipynb
Created Jul 17, 2019 — forked from ahmedengu/colab_xface_vnc.ipynb
Use google colab as a remote machine with the help of ngrok, vnc server and xface desktop you can change the configurations and desktop environment as you please it's just a start
View colab_xface_vnc.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ricardodeazambuja /
Last active Feb 16, 2020 — forked from isphus1973/
How to download stuff directly from google drive into a jupyter notebook / colab
## Remember to chomod +x
#This scrip is based on
ricardodeazambuja /
Created Jun 30, 2019 — forked from bastman/
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
ricardodeazambuja /
Last active Jun 29, 2019
Saving images from webcam on Google Colab
# 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
import io
You can’t perform that action at this time.