Skip to content

Instantly share code, notes, and snippets.

View dkalog's full-sized avatar

Dimitris Kalogeras dkalog

  • Institute of Computer and Communication Systems
  • Athens, Greece
View GitHub Profile
@andrewssobral
andrewssobral / agx_xavier_tips-and-tricks.md
Last active April 12, 2024 18:21
Tips and Tricks for Jetson AGX Xavier
@bmegli
bmegli / CMake_3_20_Ubuntu_18_04.md
Last active May 10, 2024 22:22
CMake 3.20 in Ubuntu 18.04 (reversible way)

Motivatation

  • modern CMake is required for building a lot of new software
  • CMake is dependency for many packages (e.g. ROS related)
  • we don't want to remove CMake (which would remove packages that depend on it)
  • we want safe procedure to update CMake that can be reversed easily

Current version in OS

Check current version

@FreddieOliveira
FreddieOliveira / docker.md
Last active May 24, 2024 06:30
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@benesch
benesch / compile.sh
Last active November 11, 2023 03:33
Cross-compiling Materialize for ARM on x64 Ubuntu
sudo apt-get install -qy binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
export CMAKE_SYSTEM_NAME=Linux
export TARGET=aarch64-linux-gnu
export TARGET_AR=aarch64-linux-gnu-ar
export TARGET_CC=aarch64-linux-gnu-gcc
export TARGET_CXX=aarch64-linux-gnu-g++
export TARGET_RANLIB=aarch64-linux-gnu-ranlib
export TARGET_CPP=aarch64-linux-gnu-cpp
export TARGET_LD=aarch64-linux-gnu-ld
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=$TARGET_CC
@daehahn
daehahn / wsl2-network.ps1
Last active April 29, 2024 08:27
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
@nealfennimore
nealfennimore / wireguard.conf
Last active April 3, 2024 09:49
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@RafaelPalomar
RafaelPalomar / docker-opengl-nvidia.org
Last active November 28, 2023 16:54
How to run an OpenGL dockerized application with Nvidia #nvidia #docker #opengl

Running OpenGL applications within Nvidia Containers

Preparing the container

This explains how to run an OpenGL applications within containers using Nvidia’s OpenGL.

I prepared a docker image based on Nvidia’s OpenGL container

FROM nvidia/opengl:1.0-glvnd-runtime
@danielmacuare
danielmacuare / nornir.md
Last active October 11, 2023 10:55
Simple tutorial to use nornir for network automation solutions. The tutorial explain some basics to start with.

Nornir - Tutorial

https://nornir.readthedocs.io/en/stable/index.html

1 - Initialise a Nornir Object.

  r = InitNornir(config_file='config.yaml')
  nr = InitNornir(config_file='config.yaml', core={'num_workers': 1})		# Useful for testing as it works in serial, doesn't paralellise connections.

2 - Filtering Objects - Can be cumulative.

@mgramin
mgramin / run.py
Last active March 31, 2024 11:40
Simple REST service for osquery
from flask import Flask, request
from flask_restful import Api, Resource
import osquery
class User(Resource):
@staticmethod
def get():
instance = osquery.SpawnInstance()
instance.open()
query = request.args.get('query', default='', type=str)