Skip to content

Instantly share code, notes, and snippets.

View ross-newman's full-sized avatar
🎯
Focusing on computer vision.

Ross Newman ross-newman

🎯
Focusing on computer vision.
View GitHub Profile
@ross-newman
ross-newman / tak-server-setup.sh
Last active August 13, 2025 00:20
TAK Server install
sudo apt-get install -y lsb-release
sudo mkdir -p /etc/apt/keyrings
sudo curl https://www.postgresql.org/media/keys/ACCC4CF8.asc --output /etc/apt/keyrings/postgresql.asc
echo "Setting up sources"
cat << HERE | sudo tee /etc/apt/sources.list.d/postgresql.list > /dev/null
deb [signed-by=/etc/apt/keyrings/postgresql.asc] https://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main
HERE
echo "Checking for Java 17..."
#!/usr/bin/python3
import subprocess
import os
import sys
SECONDS=5
if len(sys.argv) > 1:
print("Recording topics...", )
topics = ["/an_device/sync/Imu", \
#!/bin/bash -e
## Setup as per https://docs.graylog.org/en/4.0/pages/installation/os/ubuntu.html
## Dependancies
apt-get update && sudo apt-get upgrade -y
apt-get install apt-transport-https openjdk-8-jre-headless uuid-runtime pwgen -y --no-install-recommends
add-apt-repository universe
apt-get update && sudo apt-get upgrade -y
apt-get install apt-transport-https openjdk-8-jre-headless uuid-runtime pwgen -y --no-install-recommends
#!/bin/bash
REMOTE_IP=192.168.0.123
echo "Staring stream..."
gst-launch-1.0 rtspsrc location="rtsp://${REMOTE_IP}:554/h264?username=admin&password=123456" ! \
rtph264depay ! \
h264parse ! \
avdec_h264 ! \
videoconvert ! \
xvimagesink sync=true
@ross-newman
ross-newman / camera-correct-opencv.ipynb
Last active April 20, 2020 06:07
Camera-correct-OpenCV.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ross-newman
ross-newman / idt_switch_probe.sh
Created August 22, 2019 14:34
IDT PCIe Switch probing with busybox
#!/bin/bash
## Determine architecture
arch=$(arch)
if [ "$arch" == "ppc" ]; then
echo "PowerPC Host detected"
## When one card installed
dev0mem0=0xf80300000
## When no card installed
# dev0mem0=0xf80100000
@ross-newman
ross-newman / mirror.list
Last active July 18, 2019 12:18
UK apt mirrors list example for LTS releases
############# config ##################
#
# set base_path /var/spool/apt-mirror
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch <running host architecture>
# set postmirror_script $var_path/postmirror.sh
@ross-newman
ross-newman / cairo-text.cpp
Created June 20, 2019 11:51
Cairo text alignment using cairo_text_extents
#include <cairo.h>
// gcc main.cpp -o test $(pkg-config cairo --cflags) $(pkg-config cairo --libs) $(pkg-config --cflags gtk+-3.0) $(pkg-config --libs gtk+-3.0)
#include <cairo.h>
#include <gtk/gtk.h>
static void do_drawing(cairo_t *, int align);
static gboolean on_draw_event(GtkWidget *widget, cairo_t *cr,
@ross-newman
ross-newman / docker-ubuntu-minimal.sh
Last active June 19, 2019 15:12
Setting up Docker for Ubuntu X11 applications
#!/bin/bash
# Example for Precise (Ubuntu 12.04)
sudo debootstrap --no-check-gpg precise precise http://archive.ubuntu.com/
tar -C precise -c . | docker import - precise
docker run precise cat /etc/lsb-release
#docker run -it --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" precise "bash"
@ross-newman
ross-newman / ubuntu-alias.sh
Last active June 19, 2019 15:12
My ubuntu alias/s
## Colorize the ls output ##
alias ls='ls --color=auto'
## Use a long listing format ##
alias ll='ls -la'
## Show hidden files ##
alias l.='ls -d .* --color=auto'
## get rid of command not found ##