Skip to content

Instantly share code, notes, and snippets.

View robinvanemden's full-sized avatar
🌳
⏩ ⏩

Robin van Emden robinvanemden

🌳
⏩ ⏩
View GitHub Profile
# Install aarch64 cross depedencies based on Jetpack 4.4
# Dependencies require cuda-toolkit-10.2 which isn't installed in nvidia docker container
# It contains cuda-compat instead. However deb files currently depend on cuda-toolkit alone.
# Hence force dpkg configure
RUN wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cross-aarch64_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cudart-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cufft-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-cupti-cross-aarch64-10-2_10.2.89-1_all.deb && \
wget https://repo.download.nvidia.com/jetson/x86_64/pool/r32.4/c/cuda/cuda-curand-cross-aarch64-10-2_10.2.89-1_all.deb && \
@robinvanemden
robinvanemden / httpsnodered.txt
Created August 23, 2023 09:21 — forked from gbrault/httpsnodered.txt
https setting node-red
from http://industrialinternet.co.uk/node-red/adding-https-ssl-to-node-red/
- go to .node-red directory
- create a public directory: mkdir public
- go to public: cd public
- Create a certificate
openssl genrsa -out privatekey.pem 1024
openssl req -new -key privatekey.pem -out private-csr.pem
openssl x509 -req -days 365 -in private-csr.pem -signkey privatekey.pem -out certificate.pem
- cd ..
@robinvanemden
robinvanemden / gist:ddcd99e1484b0350e332e570ac050818
Created August 22, 2023 19:10 — forked from seddonm1/gist:5927db05cb7ad38d98a22674fa82a4c6
How to build onnxruntime on an aarch64 NVIDIA device (like Jetson Orin AGX)
docker run \
--rm \
-it \
-e ONNXRUNTIME_REPO=https://github.com/microsoft/onnxruntime \
-e ONNXRUNTIME_COMMIT=v1.15.1 \
-e BUILD_CONFIG=Release \
-e CMAKE_VERSION=3.26.4 \
-e CPU_ARCHITECTURE=$(uname -m) \
-e CUDA_ARCHITECTURES="70;75;80;86" \
-v /usr/lib/aarch64-linux-gnu/tegra:/usr/lib/aarch64-linux-gnu/tegra:ro \
@robinvanemden
robinvanemden / gige_gst_v4l.md
Created September 23, 2022 15:22 — forked from nitheeshkl/gige_gst_v4l.md
Gstreamer pipelines to use GigE cams as webcam for Zoom/Teams/Skype

Using GigE cam as webcam for Zoom/Skype/Teams

TL;DR: Creates a Gstreamer pipeline to read camera frames from a GigE camera, using Aravis library, and publish them as V4l2 camera source, using V4l2loopback, that can be read by video conferencing programs like Zoom/Skype/Teams.

gst-launch-1.0 aravissrc blocksize=5013504 h-binning=1 v-binning=1 ! video/x-bayer,format=rggb,framerate=100/5,width=2448,height=2048 ! bayer2rgb ! video/x-raw,format=RGBx ! videoconvert ! video/x-raw,format=YUY2 !  aspectratiocrop aspect-ratio=16/9 ! videoscale ! video/x-raw,width=1280,height=720 ! queue ! v4l2sink device=/dev/video0

The Basics

@robinvanemden
robinvanemden / gstreamer-tips.md
Created September 1, 2022 11:58 — forked from flufy3d/gstreamer-tips.md
gstreamer remote streaming

simple test

gst-launch-1.0 -v videotestsrc ! video/x-raw,width=1280,height=640 ! glimagesink

streaming mpegts

gst-launch-1.0 -v videotestsrc ! video/x-raw,width=1280,height=640 ! videoconvert ! x264enc key-int-max=12 byte-stream=true ! mpegtsmux ! tcpserversink port=8888 host=0.0.0.0

vlc using tcp://192.168.1.192:8888

@robinvanemden
robinvanemden / cudnn_convolution_forward.cu
Created July 31, 2021 18:46 — forked from odashi/cudnn_convolution_forward.cu
Example usage of cuDNN convolution forward functions.
#include <iomanip>
#include <iostream>
#include <cstdlib>
#include <vector>
#include <cuda.h>
#include <cudnn.h>
#define CUDA_CALL(f) { \
cudaError_t err = (f); \
@robinvanemden
robinvanemden / postman-echo.c
Created April 28, 2021 16:30 — forked from leiless/postman-echo.c
[Test] Simple program to POST a HTTP request to postman-echo.com
/**
* Simple program to POST a HTTP request
*
* see:
* https://docs.postman-echo.com/?version=latest
* https://aticleworld.com/http-get-and-post-methods-example-in-c/
* https://stackoverflow.com/questions/11208299/how-to-make-an-http-get-request-in-c-without-libcurl
* https://stackoverflow.com/questions/22077802/simple-c-example-of-doing-an-http-post-and-consuming-the-response
*/
#import <Foundation/Foundation.h>
static const uint8_t huffman_table[] =
{
0xFF, 0xC4, 0x01, 0xA2, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01,
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02,
0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x01, 0x00, 0x03,
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
0x0A, 0x0B, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02, 0x04, 0x03, 0x05,
@robinvanemden
robinvanemden / ttyecho.c
Created February 14, 2021 10:18 — forked from FUT/ttyecho.c
Send terminal command to a TTY terminal
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <string.h>
#include <unistd.h>
void print_help(char *prog_name) {
printf("Usage: %s [-n] DEVNAME COMMAND\n", prog_name);
set -x
apt install flex bison
git clone https://github.com/microsoft/WSL2-Linux-Kernel --depth 1
cd WSL2-Linux-Kernel/tools/perf
make -j8
sudo cp perf /usr/local/bin