forked from cvg/glue-factory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
howToScreen.txt
262 lines (171 loc) · 7.67 KB
/
howToScreen.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
scp ~/.bashrc tp4618@servername: ~/.brcgpu02
source ~/.bashrc
scp ~/.bashrc tp4618@gpu02: ~/.brcgpu02.txt
ga, ga-, gc "dfd", gp, gs
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/github_id_rsa
# Accidentally on HTTP instead of ssh# Check current remote URL
git remote -v
# Update remote URL to use SSH
git remote set-url origin [email protected]:tompritch30/glue-factory.git
# Verify the change
git remote -v
# Push changes
git push
pip install torch>=1.7 torchvision>=0.8 numpy opencv-python tqdm matplotlib scipy h5py omegaconf tensorboard albumentations kornia seaborn joblib
pip install git+https://github.com/cvg/LightGlue.git
pip install git+https://github.com/PoseLib/PoseLib.git@9c8f3ca1baba69e19726cc7caded574873ec1f9e
pip install git+https://github.com/iago-suarez/[email protected]
pip install git+https://github.com/cvg/DeepLSD.git
pip install git+https://github.com/rpautrat/homography_est.git@17b200d528e6aa8ac61a878a29265bf5f9d36c41
find ~ \( -name '*.pyc' -o -name '.cache' -o -name 'core' -o -name '.vscode' -o -path '*venv*' \) -print
find ~ \( -name '*.pyc' -o -name '.cache' -o -name 'core' -o -name '.vscode' -o -path '*venv*' \) -exec rm -rf {} +
# Bash terminal types
chsh -s $(which zsh)
chsh -c $(which bash)
zsh
bash
# Start a new screen session
screen
# Start a new screen session with a specific name
screen -S session_name
# Detach from the current screen session
# Press: Ctrl-a then d
# Reattach to a detached screen session (if there's only one detached session)
screen -r
# Reattach to a named screen session
screen -r session_name
# List all screen sessions
screen -ls
# Terminate a screen session from within the session
# Press: Ctrl-a then k, then press 'y' to confirm
# Create a new window within a screen session
# Press: Ctrl-a then c
# Switch between windows in a screen session
# Press: Ctrl-a then n (next window)
# Press: Ctrl-a then p (previous window)
# Split the current window horizontally (regions can display multiple screens)
# Press: Ctrl-a then S
# Split the current window vertically (requires a patch or newer versions)
# Press: Ctrl-a then |
# Navigate between split regions
# Press: Ctrl-a then Tab
# Close a split region
# Press: Ctrl-a then X
# Detach and logout (detach all attached sessions)
screen -dD
# Resume a session and prevent others from re-attaching
screen -x session_name
# Delete a screen
screen -S <name> -X quit
nvidia-smi
This answer works for only a scenario where your end target is to paste the copied buffer contents immediately.
The simplest way to do this is by splitting your screen into two regions. You can do this by hitting CTRL+a then
|'This is not an i. It is the PIPE sign on your keyboard'
Hit CTRL+a then TAB to switch to the second region, CTRL+a then c to create a new session in the second region.
If you want to copy from nano and paste in terminal, open up the file in nano on the left region, hit CTRL+a then ESC,
scroll to the start point of your copy location and hit SPACE, select the text by scrolling to the end point and hit SPACE again to mark copy.
Now, all you have to do is hit CTRL+a then TAB to switch to the region on your right and hit CTRL+a then ].
Your text will be written out to the command line. Note that you can also check for hardcopy option if you want to write directly to file.
How to Select and Copy Text in screen Copy Mode:
Enter Copy Mode:
Press Ctrl-a then [ to enter copy mode. This will allow you to move the cursor using your keyboard.
Move the Cursor to Start Point:
Use the arrow keys to navigate the cursor to the beginning of the text you want to select.
Begin Selection:
Press the space bar to start the selection. This sets the starting point of the text you want to copy.
Extend Selection:
Move the cursor with the arrow keys to extend the selection to the end of the text you wish to copy.
Copy the Text:
Press the space bar again once you have highlighted the desired text. This copies the selected text to the screen clipboard.
Exit Copy Mode:
You can exit copy mode by pressing Enter or simply by pressing Ctrl-a then [ again.
Pasting Text:
Paste the Copied Text:
To paste the copied text within screen, you press Ctrl-a followed by ]. This will paste the copied text at the cursor’s current location in any of the screen windows.
Plan:
Step 1: Finalize Submodule Changes
Before initializing and updating submodules in your main project, make sure each submodule repository is correctly set up and that all changes are committed:
Navigate to Each Submodule Directory:
bash
cd path/to/submodule
Check the Status and Commit Changes:
Inside each submodule, commit any changes that you want to keep:
bash
git add .
git commit -m "Update changes or fix issues"
Push Submodule Changes:
Still inside each submodule directory, push the changes to the respective remote repository:
bash
git push origin master # Or whichever branch you are on
Step 2: Initialize and Update Submodules in Main Repository
Once all individual submodules are updated and pushed, go back to your main project directory and update the submodules to ensure they are correctly linked and initialized:
Navigate to Main Project Directory:
bash
cd path/to/main/project
Initialize and Update Submodules:
This step will ensure that your local submodule references are initialized and updated:
bash
git submodule update --init --recursive
Step 3: Stage and Commit Main Project Changes
After your submodules are set up and initialized, you can safely stage and commit changes in your main project:
Stage Changes:
If external/tartanair_tools or any other directories need to be converted to submodules and were incorrectly added, first unstage them:
bash
git rm --cached path/to/wrongly-added-directory
Then add them correctly as submodules if necessary:
bash
git submodule add <repository-url> path/to/submodule
Commit Changes in Main Project:
Now you can safely add all changes and commit:
bash
git add .
git commit -m "Set up submodules and update project structure"
Push Main Project Changes:
Finally, push the changes of your main project to the remote repository:
bash
git push origin master
Additional Notes:
Submodule URLs: When adding submodules with git submodule add, you need to provide the URL of the repository you wish to add as a submodule.
Avoid git add . Until Ready: Use git add . cautiously to avoid staging unwanted files or directories again.
================================================
GitHub Branches Cheat Sheet
====================================================
# Basics
- Branch: Separate line of development in Git.
- Master/Main: Default primary branch.
# Creating Branches
- Create and switch to a new branch:
git checkout -b <branch-name>
- Create a new branch without switching:
git branch <branch-name>
# Switching Branches
- Switch to an existing branch:
git checkout <branch-name>
# Listing Branches
- List all branches:
git branch
# Deleting Branches
- Delete a local branch:
git branch -d <branch-name>
- Force delete a local branch:
git branch -D <branch-name>
# Merging Branches
- Merge a branch into the current branch:
git merge <branch-name>
# Pushing Branches to Remote
- Push a branch to remote repository:
git push origin <branch-name>
# Tracking Remote Branches
- Set up a local branch to track a remote branch:
git branch --track <local-branch> <remote-branch>
# Deleting Remote Branches
- Delete a remote branch:
git push origin --delete <branch-name>
# Checking Branch Info
- Show last commit on each branch:
git branch -v
- Show branches merged into current branch:
git branch --merged
- Show branches not merged into current branch:
git branch --no-merged