This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # This script sits in the root of your project = <my_flutter_project>/build_stuff.py | |
| # It requires a directory <my_flutter_project>/keys with the credentials below | |
| import os | |
| import subprocess | |
| import sys | |
| import glob | |
| from google.oauth2.service_account import Credentials |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Prerequisites: flutter, homebrew | |
| # Install Java | |
| brew install --cask temurin@17 | |
| # Install android commandline tools | |
| brew install --cask android-commandlinetools | |
| # Put the following into ~/.bashrc or ~/.zshrc (don't execute) | |
| export PATH=$PATH:/opt/homebrew/share/android-commandlinetools | |
| # Not sure if the following command is necessary | |
| flutter config --android-sdk /opt/homebrew/share/android-commandlinetools | |
| # Install sdk (35 works with Flutter 3.24) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Use-case: | |
| # - We have multiple git repositories but want to merge them together for simplicity / using a monorepo / etc. | |
| # - We can not lose the git history and tags | |
| # - The new structure can be arbitrary | |
| # | |
| # Solution: | |
| # - Create a tmp directory and clone all previous repos | |
| # - Install git filter-repo via pip | |
| # - In each of these repos, use the git filter-repo command to move all files to any new directory inside the repository | |
| # - cd anywhere and create your new repository |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd | |
| apt update && apt upgrade -y && apt install wget | |
| ros2 pkg create --build-type ament_python py_pubsub | |
| wget https://raw.githubusercontent.com/ros2/examples/master/rclpy/topics/minimal_publisher/examples_rclpy_minimal_publisher/publisher_member_function.py -P ~/py_pubsub/py_pubsub | |
| wget https://raw.githubusercontent.com/ros2/examples/master/rclpy/topics/minimal_subscriber/examples_rclpy_minimal_subscriber/subscriber_member_function.py -P ~/py_pubsub/py_pubsub | |
| sed -i '23 i \\t\t"talker = py_pubsub.publisher_member_function:main",\n\t\t"listener = py_pubsub.subscriber_member_function:main"' ~/py_pubsub/setup.py | |
| rosdep install -i --from-path ~ --rosdistro galactic -y | |
| colcon build --packages-select py_pubsub | |
| . install/setup.bash | |
| ros2 run py_pubsub talker & |