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
| #!/bin/bash | |
| # ubuntu-here: Docker container launcher with privilege mapping | |
| set -e | |
| IMAGE="ubuntu:22.04" | |
| # Get current user's uid and gid | |
| USER_ID=$(id -u) |
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
| #include <gtest/gtest.h> | |
| #include "Executor.h" | |
| TEST(Executor, Report) | |
| { | |
| Initialize(0, 0, Direction::North); | |
| EXPECT_EQ("0,0,N", Report()); | |
| } |
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
| #include <iostream> | |
| #include <vector> | |
| #include <sstream> | |
| #include <queue> | |
| using namespace std; | |
| /** | |
| * @brief Definition of TreeNode | |
| */ | |
| struct TreeNode { | |
| int val; |
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
| # Install ARM Homebrew to /opt/homebrew | |
| # 安装ARM版本的Homebrew 到 /opt/homebrew | |
| mkdir /opt/homebrew | |
| sudo chown -R $(whoami) /opt/homebrew | |
| curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C /opt/homebrew | |
| # Install x86 Homebrew | |
| arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
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
| ssh -p $targePort -qngfNTR 7331:localhost:9090 username@$targetIP |