Skip to content

Instantly share code, notes, and snippets.

@ajonnet
ajonnet / docker-cleanup-resources.md
Created November 11, 2017 12:02 — forked from bastman/docker-cleanup-resources.md
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: 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

@ajonnet
ajonnet / opencv320.sh
Created December 14, 2017 13:50 — forked from dapperfu/opencv320.sh
Build .deb package for OpenCV 3 w/Python3 bindings.
#!/usr/bin/env bash
# Config
MAINTAINER="Jed Frey"
VERSION=3.2.0
# Adapted from http://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/
apt-get install --yes libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev libavcodec-dev libavformat-dev \
libswscale-dev libxvidcore-dev libx264-dev libv4l-dev liblapacke-dev libgtk-3-dev \
libopenblas-dev libhdf5-dev libtesseract-dev libleptonica-dev \
@ajonnet
ajonnet / depth_type_cvmat.cpp
Created August 23, 2018 09:57 — forked from ashwin/depth_type_cvmat.cpp
Useful functions to get the depth or type of a cv::Mat
std::string GetMatDepth(const cv::Mat& mat)
{
const int depth = mat.depth();
switch (depth)
{
case CV_8U: return "CV_8U";
case CV_8S: return "CV_8S";
case CV_16U: return "CV_16U";
case CV_16S: return "CV_16S";
@ajonnet
ajonnet / build-opencv.sh
Created March 27, 2019 07:14 — forked from willprice/README.md
Install OpenCV 3.4.2 on Raspberry Pi Raspbian Stretch
#!/usr/bin/env bash
pushd ~/opencv/opencv-3.4.2
mkdir -p build
pushd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D CMAKE_BUILD_TYPE=RELEASE \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.4.2/modules \
-D OPENCV_ENABLE_NONFREE=ON \