Skip to content

Instantly share code, notes, and snippets.

View Yadunund's full-sized avatar

Yadu Yadunund

View GitHub Profile
ffmpeg -i example.mov -f mp4 -vcodec libx264 -acodec aac example.mp4
kazam capture to mp4
ffmpeg -i in.mp4 -pix_fmt yuv420p -c:a copy -movflags +faststart out.mp4
create gif
ffmpeg -ss 30 -t 3 -i DP2_Visualizer.mp4 -vf "fps=10,scale=1920:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif
Speed up video
ffmpeg -i input.mp4 -r 16 -filter:v "setpts=0.25*PTS" output.mp4
https://moodle.ufsc.br/pluginfile.php/2377667/mod_resource/content/0/Effective_Modern_C__.pdf
https://missing.csail.mit.edu/
https://www.amazon.com/Tour-2nd-Depth-Bjarne-Stroustrup/dp/0134997832
https://www.youtube.com/watch?v=xnqTKD8uD64
https://github.com/CppCon/CppCon2014/blob/master/Presentations/Back%20to%20the%20Basics!%20Essentials%20of%20Modern%20C%2B%2B%20Style/Back%20to%20the%20Basics!%20Essentials%20of%20Modern%20C%2B%2B%20Style%20-%20Herb%20Sutter%20-%20CppCon%202014.pdf
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md
@Yadunund
Yadunund / ROS2 Docker
Last active March 3, 2020 07:30
Command to start a bash terminal inside a ROS2 docker
sudo docker run -it ros:eloquent-ros-base-bionic /bin/bash
@Yadunund
Yadunund / gist:322aae77e32b3f286dc277847116f051
Created May 10, 2020 10:07
Uninstall pkg installed with setup.py
python setup.py install --record files.txt
cat files.txt | xargs sudo rm -rf
set autoindent
set expandtab
set smartindent
set tabstop=2
set shiftwidth=2
set vb t_vb=
set ruler
set nohls
set incsearch
"set nowrap
yadu@yadu:~/ws_cag$ ./build/rmf_task/test_rmf_task
Greedy solution found in: 0.025711
Greedy cost: 22032.4
Greedy assignments:
--Agent: 0
<2: 1.48025e+06, 1.48025e+06, 1.48626e+06, 70.2889%>
<1: 1.48025e+06, 1.48626e+06, 1.49126e+06, 45.5334%>
--Agent: 1
<3: 1.48025e+06, 1.48025e+06, 1.48526e+06, 75.2334%>
----------------------
@Yadunund
Yadunund / GIT Commands
Created March 19, 2021 03:27
Useful GIT commands
git rebase -i -x "git commit --amend --no-edit -s" HEAD~3 #(n=last 3)
canning dependencies of target rmf_obstacle_ros2
make[2]: Leaving directory '/home/yadu/ws_rmf_simulation/build/rmf_obstacle_ros2'
/usr/bin/make -f CMakeFiles/rmf_obstacle_ros2.dir/build.make CMakeFiles/rmf_obstacle_ros2.dir/build
make[2]: Entering directory '/home/yadu/ws_rmf_simulation/build/rmf_obstacle_ros2'
[ 50%] Building CXX object CMakeFiles/rmf_obstacle_ros2.dir/src/rmf_obstacle_ros2/Obstacle.cpp.o
/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_cyclonedds_cpp -DRCUTILS_ENABLE_FAULT_INJECTION -Drmf_obstacle_ros2_EXPORTS -I/home/yadu/ws_rmf_simulation/src/rmf/rmf_ros2/rmf_obstacle_ros2/include -I/home/yadu/ws_rmf_simulation/install/rmf_obstacle_msgs/include -isystem /opt/ros/galactic/include -isystem /home/yadu/ws_rmf_simulation/install/rmf_utils/include -fPIC -Wall -Wextra -Wpedantic -std=gnu++17 -o CMakeFiles/rmf_obstacle_ros2.dir/src/rmf_obstacle_ros2/Obstacle.cpp.o -c /home/yadu/ws_rmf_simulation/src/rmf/rmf_ros2/rmf_obstacle_ros2/src/rmf_obstacle_ros2/Obstacle.cpp
[100%] Linking CXX shared libr
@Yadunund
Yadunund / convet_heic_to_png.sh
Created July 23, 2022 03:55
Batch convert heic images to png
git clone https://github.com/ImageMagick/ImageMagick.git
cd ImageMagick/
chmod +x configure
./configure --with-heic=yes
make -j10
for h in *.HEIC; do
$HOME/imagemagic/ImageMagick/utilities/magick "$h" -quality 50% "${h%.*}".png
done
repositories:
ament/ament_cmake:
type: git
url: https://github.com/ament/ament_cmake.git
version: rolling
ament/ament_index:
type: git
url: https://github.com/ament/ament_index.git
version: rolling
ament/ament_lint: