Skip to content

Instantly share code, notes, and snippets.

View happyincent's full-sized avatar

Vincent Chen happyincent

View GitHub Profile
@happyincent
happyincent / test.yml
Created June 10, 2019 14:23
Mount Arduino Serial, Use Host network in Docker Swarm
version: '3'
networks:
docker_host:
external:
name: 'host'
services:
docker-parent:
image: docker:latest
@happyincent
happyincent / docker-bake.hcl
Last active October 9, 2019 15:59
A bake definition file example. https://github.com/docker/buildx
group "default" {
targets = ["autossh", "ffmpeg", "edge"]
}
target "autossh" {
context = "./autossh"
dockerfile = "Dockerfile"
platforms = [
"linux/amd64",
"linux/arm64",
"linux/arm/v7"
@happyincent
happyincent / teamviewer.md
Last active February 1, 2024 20:22
Install TeamViewer without a connected monitor (Xubuntu 16.04 & 18.04)

Install

wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
sudo apt update -y
sudo apt install gdebi -y
sudo gdebi teamviewer_amd64.deb

sudo teamviewer passwd PASSWORD_TO_BE_CHANGED
sudo teamviewer daemon enable
teamviewer info
@happyincent
happyincent / autossh.service
Last active January 27, 2019 14:04
An autossh tunnel service
[Unit]
Description=An autossh tunnel service
After=network-online.target
[Service]
# -M 0 -> no monitoring
# -N -> Just open the connection and do nothing (not interactive)
# ServerAliveInterval, ServerAliveCountMax -> check per interval, reconnect if (fail > Max)
# ExitOnForwardFailure -> make sure forwardings have succeeded
@happyincent
happyincent / docker-compose.yml
Created December 5, 2018 16:45
Enable the GPU within a docker container running on an NVIDIA Jetson TX2. ref: https://git.io/fp1ZW
version: '3'
services:
test:
container_name: test-tensorflow
image: ubuntu:test-tensorflow
build: .
restart: always
command: sh -c "ldconfig /usr/local/cuda/lib64/ /usr/lib/aarch64-linux-gnu/tegra/ && tail -f /dev/null"
volumes:
:: Author: DDL
:: Date: Aug. 20, 2018
@ECHO off
SETLOCAL enableDelayedExpansion
chcp 65001
SET "IP_Addr=140.116.0.0"
SET "Sub_Mask=255.255.255.224"
SET "D_Gate=140.116.0.0"
# Makefile
CC := gcc
CXX := g++
CFLAGS := -g -Wall -o3 -std=gnu99
CXXFLAGS := -g -Wall -o3 -std=c++11
LDFLAGS := -g
# LDLIBS := -pthread
TGT := xxx #(e.g. xxx.cpp in SRC)
EXT := .cpp