Skip to content

Instantly share code, notes, and snippets.

View codegallivant's full-sized avatar

Janak S codegallivant

  • Manipal Institute of Technology
  • Manipal, Karnataka
  • 04:29 (UTC +05:30)
  • LinkedIn in/janaks1
View GitHub Profile
// These ACL rules disable communication between devices in a tailnet unless they are assigned 'tag:unrestricted' by an admin.
{
"groups": {"group:admin": ["<email-address>"]},
"acls": [
{
"src": ["tag:unrestricted"],
"dst": ["*"],
"ip": ["*"],
}
#!/bin/bash
printf "\nInstalling libvmaf\n"
git clone https://github.com/Netflix/vmaf.git
cd vmaf
python3 -m pip install virtualenv
python3 -m virtualenv .venv
source .venv/bin/activate
pip install meson

Automatically ignore large files/folders and sync code workspaces using syncthing

Syncthing is a great open-source software to easily sync files and folders across devices. GUI snap from their website - image

I wanted to sync my coding workspace across my laptop and desktop computers so that I can seamlessly switch between them at any time.
Usually, this is not done due to the following issues -

  1. Some file/folder sizes can be very large
  2. Build files do not match due to different processors on different computers
/*
This program outputs a list of files/folders in the filesystem, that are above an inputted SIZE_LIMIT and are reasons for
upper directories being above the SIZE_LIMIT. Upon removing these files/folders, no other paths will have a size
above SIZE_LIMIT.
For example,
SIZE_LIMIT = 100MB
File system:
/mnt/d/folder1 1000 MB
@codegallivant
codegallivant / dockerx11.sh
Last active April 28, 2025 04:54
Script to run a Docker Image for ROS Noetic, with X11 forwarding to enable viewing GUI applications such as Gazebo or RViz.
#!/bin/bash
# If not working, first do: sudo rm -rf /tmp/.docker.xauth
# It still not working, try running the script as root.
MYPATH="/path/to/dir"
VOLUME_NAME="dvolume"
XAUTH=/tmp/.docker.xauth

Git and GitHub

Git GitHub, GitLab, bitbucket etc
Version control system Hosts source code
Maintained by linux Maintained by Microsoft
Open source Proprietary

Git commands

@codegallivant
codegallivant / rosdocker.md
Last active June 2, 2024 13:55
This gist describes how to run ROS applications that may use GUI, in a Docker container.

Using Docker to run a ROS application with GUI

The highest version of Ubuntu ROS Noetic supports is Ubuntu 20.04 LTS. Since I use Ubuntu 22.04 LTS and didn't want to reinstall my operating system just for this, I decided to use Docker.

In this gist, I'll describe steps to do this.

0. Install Docker

1. Pull the docker image

Pull the ROS Noetic image: