Skip to content

Instantly share code, notes, and snippets.

@joshlk
joshlk / 0_nvidia_benchmark.md
Last active March 29, 2024 06:06
Benchmark bandwidth and latency of P2P NVIDIA GPUs (NVLINK vs PCI)

NVIDIA GPU P2P Benchmark bandwidth/throughput and latency

Using https://github.com/NVIDIA/cuda-samples

You can also view the GPU topology using nvidia-smi topo -m

  1. Download repo git clone https://github.com/NVIDIA/cuda-samples.git
  2. Checkout the tag that corresponds with the right CUDA version: git checkout tags/v11.1
  3. You might need to install some additional packages sudo apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev libglfw3-dev libgles2-mesa-dev
  4. Either build everything by just execting make in root dir. Or cd Samples/p2pBandwidthLatencyTest; make
@Brainiarc7
Brainiarc7 / ffmpeg-qsv-enabled-build-ubuntu-18.04lts-testbed.md
Last active January 8, 2024 21:00
This gist will generate an Intel QSV-enabled FFmpeg build using the open source Intel Media SDK. Testbed used: Ubuntu 18.04LTS. A fallback is also provided for the intel vaapi driver where needed.

Build FFmpeg with Intel's QSV enablement on an Intel-based validation test-bed:

Build platform: Ubuntu 18.04LTS

Ensure the platform is up to date:

sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade

Install baseline dependencies first (inclusive of OpenCL headers+)

@ahmetb
ahmetb / gcpauth.go
Created May 22, 2018 17:21
Authenticating to GKE cluster with client-go, IAM service account and a Google auth plugin written from scratch
package main
import (
"context"
"fmt"
"log"
"net/http"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google"
@Brainiarc7
Brainiarc7 / ffmpeg-vp8&9-encode-test-vaapi-intel.md
Last active December 31, 2023 02:19
PSA: You can now use FFmpeg's VAAPI-based VP8 and VP9 encoder on Skylake+ systems on Linux: Tested on Ubuntu 16.04LTS

Build VAAPI with support for VP8/9 decode and encode hardware acceleration on a Skylake validation testbed:

Build platform: Ubuntu 16.04LTS.

First things first:

Install baseline dependencies first

sudo apt-get -y install autoconf automake build-essential libass-dev libtool pkg-config texinfo zlib1g-dev libva-dev cmake mercurial libdrm-dev libvorbis-dev libogg-dev git libx11-dev libperl-dev libpciaccess-dev libpciaccess0 xorg-dev intel-gpu-tools

@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active November 26, 2023 12:40
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner
@mgoodness
mgoodness / k8s-svc-annotations.md
Last active March 11, 2024 16:24
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
@foca
foca / release
Last active March 31, 2023 14:15
Small shell script to create GitHub releases from the command line
#!/usr/bin/env bash
set -e
[ -z "$DEBUG" ] || set -x;
usage() {
echo "$0 <repo> <tag> [<release name>] [-- <asset>...]" >&2;
}
if [ "$1" = "-h" -o "$1" = "--help" ]; then
@varemenos
varemenos / 1.README.md
Last active February 13, 2024 14:00
Git log in JSON format

Get Git log in JSON format

git log --pretty=format:'{%n  "commit": "%H",%n  "abbreviated_commit": "%h",%n  "tree": "%T",%n  "abbreviated_tree": "%t",%n  "parent": "%P",%n  "abbreviated_parent": "%p",%n  "refs": "%D",%n  "encoding": "%e",%n  "subject": "%s",%n  "sanitized_subject_line": "%f",%n  "body": "%b",%n  "commit_notes": "%N",%n  "verification_flag": "%G?",%n  "signer": "%GS",%n  "signer_key": "%GK",%n  "author": {%n    "name": "%aN",%n    "email": "%aE",%n    "date": "%aD"%n  },%n  "commiter": {%n    "name": "%cN",%n    "email": "%cE",%n    "date": "%cD"%n  }%n},'

The only information that aren't fetched are:

  • %B: raw body (unwrapped subject and body)
  • %GG: raw verification message from GPG for a signed commit
@bot11
bot11 / Gstreamer
Last active January 12, 2022 03:41
Gstreamer notes
Lets say:
IP Address of Raspberry: 192.168.0.106
IP Address of ubuntu Desktop: 192.168.0.103
IP Address of remote linux server to copy image files: 192.168.0.200
1) On Raspberry pi , run the camera and stream using gstreamer as below:
raspivid -t 0 -w 800 -h 600 -fps 25 -g 5 -b 4000000 -vf -n -o - | gst-launch -v fdsrc ! h264parse ! gdppay ! tcpserversink host=192.168.0.106 port=5000
2) On Ubuntu desktop, run the local rtsp server as below:
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active March 31, 2024 11:57
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04