Skip to content

Instantly share code, notes, and snippets.

View bmegli's full-sized avatar

Bartosz Meglicki bmegli

  • Poland
View GitHub Profile
@bmegli
bmegli / doxygen-with-travis-ci.md
Created May 29, 2018 21:54
Doxygen with Travis CI to gh-pages

Setup github project so that after any change to master branch doxygen documentation is generated and pushed to gh-pages by Travis CI

  1. Add clean gh-pages branch to your repository
git checkout --orphan gh-pages
git rm -rf .
echo "my gh-pages branch" > README.md
git add .
git commit -a -m "clean gh-pages branch"
git push origin gh-pages
@bmegli
bmegli / gpd-win2-with-ubuntu-20-04-MATE.md
Last active February 12, 2024 22:30
GPD WIN2 with Ubuntu 20.04 MATE

Tested with Ubuntu MATE 20.04 LTS Daily Build (21.03.2020)

  1. Download image
  2. Create bootable USB with Startup Disk Creator
  3. Boot GPD Win2 with Del to enter BIOS
  4. Navigate to Save & Exit and select your USB device
  5. Install & Reboot
  6. Clone and apply UMPC hardware configuration for Ubuntu
@bmegli
bmegli / CMake_3_20_Ubuntu_18_04.md
Last active October 2, 2024 09:58
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

@bmegli
bmegli / performance_powersafe.md
Last active April 5, 2021 08:11
Linux performance/powersafe switching scripts

Scripts

cat performance.sh 
#! /bin/bash
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > $file; done

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
@bmegli
bmegli / vcpkg.md
Created October 7, 2021 15:28
VCPKG cheatsheat

Unninstalling Packages

# vcpkg_target_triplet is envirnoment variable with triplet name
vcpkg remove package:%vcpkg_target_triplet% --recurse

Installing Packages

@bmegli
bmegli / firefox_fix_13012022.md
Last active January 13, 2022 09:27
Firefox stuck at 100% CPU no internet - fix (13.01.2022)

Looks like some "time bomb" in Firefox

To workaround:

  1. Open about:config
  2. Search for https3
  3. Disable network.http.http3.enabled
  4. Restart Firefox

Now re-enable network.http.http3.enabled and restart. It should be still working.

@bmegli
bmegli / MoveGitTagToCommit.md
Created February 1, 2022 09:36
Moving git tag to different commit
git tag -d <tagname>                  # delete the old tag locally
git push origin :refs/tags/<tagname>  # delete the old tag remotely
git tag <tagname> <commit>          # make a new tag locally
git push origin <tagname>             # push the new local tag to the remote 

Source

@bmegli
bmegli / Ubuntu18_04_libgcc_s_so_1_recovery.md
Created February 8, 2022 11:16
Ubuntu 18.04 how to recover from libgcc_s.so.1 dissaster

Motivation

When:

  • using newer compilers from Ubuntu test ppa (e.g. ppa:ubuntu-toolchain-r/test)
  • ppa-purge later to revert the system to clean state

it is possible to get to dissastrous state where libgcc_s.so.1 is misssing.

In such state apt and other applications may not work and system will not boot.

@bmegli
bmegli / cmake_gcc_gpp_version.md
Created April 6, 2022 12:53
CMake with certain gcc/g++ version
# e.g for gcc-6 and g++-6
export CC=/usr/bin/gcc-6
export CXX=/usr/bin/g++-6
cmake ..
make -j8
@bmegli
bmegli / ffmpeg_record.md
Created January 3, 2023 13:39
FFmpeg script for capturing desktop
cat record.sh
set -x
ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -draw_mouse 0 -i :1 -c:v libx264 -crf 0 -preset ultrafast ~/Videos/$1