Skip to content

Instantly share code, notes, and snippets.

View aprotyas's full-sized avatar
🇧🇩

Abrar Rahman Protyasha aprotyas

🇧🇩
View GitHub Profile
@aprotyas
aprotyas / template_linked_list.cpp
Last active December 28, 2020 11:21
Templated singly linked list implementation in C++11
/**
* Templated singly linked list class.
*
* @author Abrar Rahman Protyasha <aprotyas>
* @version 12/28/2020
*
* Note that this hasn't been thoroughly tested. I can only confirm that
* there are no memory leaks for the provided `LinkedList<int>` example.
*
* To use with your own types, please provide overloaded `<<` and '<'/'>'
@aprotyas
aprotyas / update_ros2_source.bash
Last active July 13, 2021 04:07
Bash script to maintain a ROS 2 source checkout
#!/bin/bash
# Bash script to maintain a ROS 2 source checkout
# Copyright (C) 2021 Abrar Rahman Protyasha (abrar.rahman98@gmail.com)
# Permission to copy and modify is granted under the MIT license
# Last revised 07/13/2021
usage="$(basename "$0") [-h] [-r] [-d ws_dir] -- script to maintain a ROS 2 source checkout
where:
-h show this help text
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: master
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: master
ament/ament_lint:
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: master
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: master
ament/ament_lint:
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: master
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: master
ament/ament_lint:
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: master
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: master
ament/ament_lint:
@aprotyas
aprotyas / better_du.sh
Created September 2, 2021 21:00
Display sorted disk usage statistics
# replace `print` with `die` if you want to output to stderr
perl -e'%h=map{/.\s/;99**(ord$&&7)-$`,$_}`du -h`;print@h{sort%h}'
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: master
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: master
ament/ament_lint:
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: master
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: master
ament/ament_lint:
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: foxy
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: foxy
ament/ament_lint: