Pushes all branches to new git remote
git push destination +refs/remotes/source/*:refs/heads/*
where:
destination - new remote git url/ssh
source - old remote git url/ssh
| void bind_thread_to_core(int core_id) { | |
| cpu_set_t cpuset; | |
| CPU_ZERO(&cpuset); | |
| CPU_SET(core_id, &cpuset); | |
| pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset); | |
| } |
Pushes all branches to new git remote
git push destination +refs/remotes/source/*:refs/heads/*
where:
destination - new remote git url/ssh
source - old remote git url/ssh
| # From: https://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/ | |
| # 1. Enter root mode | |
| sudo -s | |
| # 2. Add 10GB of swap space. | |
| # e.g: 10240 MB * 1024 = 10485760 | |
| dd if=/dev/zero of=/swapfile1 bs=1024 count=10485760 | |
| # Note: the swapfile1 generated is placed in the root folder / |
| #!/usr/bin/env python3 | |
| #================================================================================================================== | |
| # Best fit line with r^2 computation using numpy | |
| # Author: Steven Jens Jorgensen | |
| # Nov. 19, 2021 | |
| # MIT License | |
| # Description: | |
| # This python code creates a best fit line for a given x and y data series using numpy.polyfit | |
| # It also computes the r^2 value without importing additional dependencies |
| #!/usr/bin/env python3 | |
| #================================================================================================================== | |
| # Chirp Ramp | |
| # Author: Steven Jens Jorgensen | |
| # Nov. 18, 2021 | |
| # MIT License | |
| # Description: | |
| # This python code produces a chirp signal which ramps a cosine from a starting frequency to a target frequency. | |
| # A tukey window is applied to ensure smooth amplitude changes in the beginning and end of the signal |
| { | |
| "configurations": [ | |
| { | |
| "name": "Linux", | |
| "includePath": [ | |
| "${workspaceFolder}/devel/include", | |
| "/opt/ros/noetic/include", | |
| "/usr/include/**", | |
| "${workspaceFolder}/**" | |
| ], |
| printf '[' > compile_commands.json | |
| find ./build -type f -name 'compile_commands.json' -exec sh -c "cat {} | tail -n+2 | head -n-1 && printf ','" >> compile_commands.json \; | |
| sed -i '$s/.$//' compile_commands.json | |
| printf '\n]\n' >> compile_commands.json |
Reference - https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/
sudo apt-get install libgtest-dev
sudo apt-get install cmake # install cmake
cd /usr/src/gtest
sudo cmake CMakeLists.txt