Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
set -x
rm -rf /etc/apt/sources.list.d/nvidia-l4t-apt-source.list
echo "deb https://repo.download.nvidia.com/jetson/common r32.4 main" > /etc/apt/sources.list.d/nvidia-l4t-apt-source.list
echo "deb https://repo.download.nvidia.com/jetson/t194 r32.4 main" >> /etc/apt/sources.list.d/nvidia-l4t-apt-source.list
apt-key adv --fetch-key https://repo.download.nvidia.com/jetson/jetson-ota-public.asc
apt update
@om26er
om26er / opencv.md
Last active December 18, 2020 21:02

Ubuntu 18.04

Install dependencies

sudo apt install build-essential pkg-config unzip yasm git gfortran libatlas-base-dev -y
snap install cmake --channel 3.14/stable --classic

Install Python 3.8

sudo apt install g++-8 gcc-8 -y
sudo apt install build-essential cmake pkg-config unzip yasm git gfortran -y
sudo apt install libjpeg8-dev libtiff5-dev libpng-dev -y
sudo apt install libavcodec-dev libavformat-dev libswscale-dev -y
sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev -y
sudo apt install libxvidcore-dev x264 libx264-dev libfaac-dev libmp3lame-dev libtheora-dev libvorbis-dev -y
sudo apt install libdc1394-22 libdc1394-22-dev libxine2-dev libv4l-dev v4l-utils -y
sudo apt install python3-dev python3-pip -y
sudo apt install libatlas-base-dev gfortran -y
@om26er
om26er / print.java
Created September 15, 2020 11:20
Java print function like Python
private void print(Object ...args) {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < args.length; i++) {
if (i == args.length - 1) {
builder.append(args[i]);
} else {
builder.append(args[i]).append(" ");
}
}
@om26er
om26er / network.md
Created May 27, 2020 20:46
XBR Network

XBR Network Terms of Service

Preamble

The XBR test network ("network"), as its name implies, is provided solely for the purpose of testing the XBR technology and applications developed using it, primarily for participants of the IDMA online competition. It is not intended for any use in production applications.

The XBR test network is provided by Crossbar.io GmbH of Erlangen, Germany.

Grant of Access

@om26er
om26er / mtproxy-deploy.sh
Last active February 11, 2021 08:44
Script to Deploy MTProxy on Ubuntu Server
#!/bin/sh
if [ $(id -u) -ne 0 ]; then
echo "This script must be run as root"
exit 1
fi
USERNAME=mtproxy
PORT=8000
SERVICE=mtproxy
@om26er
om26er / wamp_apt.py
Created January 9, 2019 19:53
apt over wamp
import shlex
import subprocess
from autobahn.twisted import wamp
from autobahn.wamp import types as autobahn_types
from twisted.internet.defer import inlineCallbacks, returnValue
from twisted.internet import threads
class APTSession(wamp.ApplicationSession):
@om26er
om26er / script.sh
Created December 4, 2018 08:58
PyPI get latest version number
wget -qO- https://pypi.python.org/pypi/__your_package_name__/json | jq .info.version | sed -e 's/^"//' -e 's/"$//'
#!/bin/sh
set -x
TAG=v18.7.2
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
@om26er
om26er / install_docker.sh
Last active August 22, 2018 19:00
Install latest Docker on Ubuntu Server
#!/bin/sh
set -ev
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt install docker-ce -y