Skip to content

Commit 3cb7917

Browse files
authored
Merge branch 'main' into remotessh
2 parents c4b56e4 + 3e6efbc commit 3cb7917

14 files changed

+206
-173
lines changed

docs/cli.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ This section contains some more useful commands.
480480

481481
For example, download the starter files for EECS 280 project 1:
482482
```console
483-
$ wget https://eecs280staff.github.io/p1-stats/starter-files.tar.gz
483+
$ wget https://eecs280staff.github.io/stats/starter-files.tar.gz
484484
$ ls
485485
starter-files.tar.gz
486486
```
@@ -500,8 +500,8 @@ $ tree
500500
│   ├── main_test.in
501501
│   ├── main_test.out.correct
502502
│   ├── main_test_data.tsv
503-
│   ├── p1_library.cpp
504-
│   ├── p1_library.hpp
503+
│   ├── library.cpp
504+
│   ├── library.hpp
505505
│   ├── stats.hpp
506506
│   ├── stats_public_test.cpp
507507
│   └── stats_tests.cpp.starter
@@ -511,7 +511,7 @@ $ tree
511511
### `diff`
512512
`diff` compares two files.
513513

514-
Here's an example from EECS 280 project 1 ([full example](https://eecs280staff.github.io/p1-stats/#testing-1)). No output means the files are identical.
514+
Here's an example from EECS 280 project 1 ([full example](https://eecs280staff.github.io/stats/#testing-1)). No output means the files are identical.
515515
```console
516516
$ diff main_test.out main_test.out.correct
517517
```

docs/setup_caen.md

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ To access CAEN Linux from off campus, you'll first need to connect to the UM VPN
3636
Test an SSH connection. Be sure to change `awdeorio` to your own uniqname.
3737

3838
```console
39-
40-
The authenticity of host 'login.engin.umich.edu (141.213.74.65)' can't be established.
39+
$ ssh -T awdeorio@login-course.engin.umich.edu
40+
The authenticity of host 'login-course.engin.umich.edu (141.213.74.65)' can't be established.
4141
ECDSA key fingerprint is SHA256:LL0GPTtaVGa6gvv2kVpGq4ZULA1l5pw2wXC4dK3ymIk.
4242
Are you sure you want to continue connecting (yes/no)? yes
43-
Warning: Permanently added 'login.engin.umich.edu,141.213.74.65' (ECDSA) to the list of known hosts.
43+
Warning: Permanently added 'login-course.engin.umich.edu,141.213.74.65' (ECDSA) to the list of known hosts.
4444
Password:
4545
Duo two-factor login for awdeorio
4646

@@ -56,10 +56,20 @@ Success. Logging you in...
5656
-bash-4.2$
5757
```
5858

59+
If you are prompted with
60+
61+
```console
62+
The host key is known by the following other names/addresses:
63+
~/.ssh/known_hosts:1: login.engin.umich.edu
64+
Are you sure you want to continue connected (yes/no/[fingerprint])?
65+
````
66+
67+
Enter **yes**. This is due to CAEN's Linux Remote Login Service changing URLs.
68+
5969
Exit as soon as your test is successful.
6070
```console
6171
$ exit
62-
Connection to login.engin.umich.edu closed.
72+
Connection to login-course.engin.umich.edu closed.
6373
```
6474

6575
<div class="primer-spec-callout warning" markdown="1">
@@ -84,17 +94,17 @@ $ make clean
8494

8595
Next, copy files using `rsync`. Remember to change `awdeorio` to your username.
8696
```console
87-
$ rsync -rtv --exclude '.git*' ../p1-stats/ [email protected]:p1-stats-copy/
97+
$ rsync -rtv --exclude '.git*' ../stats/ awdeorio@login-course.engin.umich.edu:stats-copy/
8898
building file list ... done
89-
created directory p1-stats-copy
99+
created directory stats-copy
90100
./
91101
Makefile
92102
main.cpp
93103
main_test.in
94104
main_test.out.correct
95105
main_test_data.tsv
96-
p1_library.cpp
97-
p1_library.hpp
106+
library.cpp
107+
library.hpp
98108
stats.cpp
99109
stats.hpp
100110
stats_public_test.cpp
@@ -111,7 +121,7 @@ total size is 8818 speedup is 0.90
111121
## Login with `ssh`
112122
Now log in to CAEN Linux. Your terminal is now a shell on a *different computer*, `caen-vnc-vm16` in this example. Yours may be different. Don't forget to change `awdeorio` to your own uniqname.
113123
```console
114-
124+
$ ssh awdeorio@login-course.engin.umich.edu
115125
$ hostname
116126
caen-vnc-vm16.engin.umich.edu
117127
```
@@ -123,12 +133,12 @@ caen-vnc-vm16.engin.umich.edu
123133
Notice that the folder copied earlier.
124134
```console
125135
$ ls
126-
p1-stats-copy
136+
stats-copy
127137
```
128138

129139
Change directory into the copied folder and double-check that all binary files are cleaned up.
130140
```console
131-
$ cd p1-stats-copy
141+
$ cd stats-copy
132142
$ make clean
133143
```
134144

@@ -174,7 +184,7 @@ Host *
174184

175185
SSH into CAEN Linux.
176186
```console
177-
187+
$ ssh awdeorio@login-course.engin.umich.edu
178188
Password:
179189
Duo two-factor login for awdeorio
180190

@@ -192,7 +202,7 @@ $
192202

193203
Open a second terminal and run an `rsync` command, which uses the new configuration. No authentication is required!
194204
```console
195-
$ rsync -rtv --exclude '.git*' ../p1-stats/ [email protected]:p1-stats-copy/
205+
$ rsync -rtv --exclude '.git*' ../stats/ awdeorio@login-course.engin.umich.edu:stats-copy/
196206
building file list ... done
197207

198208
sent 273 bytes received 20 bytes 586.00 bytes/sec
@@ -217,39 +227,39 @@ An alternative to copying code to CAEN Linux is checking out a your code from Gi
217227

218228
SSH to a CAEN Linux machine and see the copy we made earlier using `rsync`.
219229
```console
220-
230+
$ ssh awdeorio@login-course.engin.umich.edu
221231
$ ls
222-
p1-stats-copy # this is from our rsync'ed copy earlier
232+
stats-copy # this is from our rsync'ed copy earlier
223233
```
224234

225235
Notice that the copy is *not* under version control.
226236
```console
227-
$ cd p1-stats-copy
237+
$ cd stats-copy
228238
$ git status
229239
fatal: Not a git repository (or any of the parent directories): .git
230240
```
231241

232242
Change directory and `git clone` your repo.
233243
```console
234244
$ cd ~ # This will move to your home directory
235-
$ git clone https://github.com/awdeorio/p1-stats.git
245+
$ git clone https://github.com/awdeorio/stats.git
236246
$ ls
237-
p1-stats p1-stats-copy
247+
stats stats-copy
238248
```
239249

240250
## Pro-tips
241251

242252
### Synchronizing deleted files
243253
Tell `rsync` to synchronize deleted files. In other words, if it's gone on your laptop, delete it on CAEN.
244254
```console
245-
$ rsync -rtv --delete --exclude '.git*' ../p1-stats/ [email protected]:p1-stats-copy/
255+
$ rsync -rtv --delete --exclude '.git*' ../stats/ awdeorio@login-course.engin.umich.edu:stats-copy/
246256
```
247257
{: data-variant="no-line-numbers" }
248258

249259
### Don't synchronize Git-ignored files
250260
Tell `rsync` not to synchronize files ignored by Git. You can also combine this option with `--delete`.
251261
```console
252-
$ rsync -rtv --exclude '.git*' --filter=':- .gitignore' ../p1-stats/ [email protected]:p1-stats-copy/
262+
$ rsync -rtv --exclude '.git*' --filter=':- .gitignore' ../stats/ awdeorio@login-course.engin.umich.edu:stats-copy/
253263
```
254264
{: data-variant="no-line-numbers" }
255265

@@ -263,8 +273,8 @@ sync :
263273
--delete \
264274
--exclude '.git*' \
265275
--filter=':- .gitignore' \
266-
../p1-stats/ \
267-
[email protected]:p1-stats-copy/
276+
../stats/ \
277+
awdeorio@login-course.engin.umich.edu:stats-copy/
268278
```
269279

270280
Now you can type `make sync` as a short cut.
@@ -275,8 +285,8 @@ rsync \
275285
--delete \
276286
--exclude '.git*' \
277287
--filter=':- .gitignore' \
278-
../p1-stats/ \
279-
[email protected]:p1-stats-copy/
288+
../stats/ \
289+
awdeorio@login-course.engin.umich.edu:stats-copy/
280290
building file list ... done
281291
./
282292
Makefile

docs/setup_eecs281.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ This tutorial walks through EECS 281 project setup using EECS 280 tutorials.
1212
VS Code works great for EECS 281 projects. Just ask one of the IAs or GSIs who use VS Code if you need help.
1313

1414
## Visual debugger
15-
Set up your project in your visual debugger. We'll use the project name `p1-stats` in this example, but your project name may be different. If your project has starter files, you'll need the link from the project spec.
15+
Set up your project in your visual debugger. We'll use the project name `stats` in this example, but your project name may be different. If your project has starter files, you'll need the link from the project spec.
1616

1717
| [VS Code Tutorial](https://eecs280staff.github.io/tutorials/setup_vscode.html)| [Visual Studio Tutorial](https://eecs280staff.github.io/tutorials/setup_visualstudio.html) | [Xcode Tutorial](https://eecs280staff.github.io/tutorials/setup_xcode.html) |
1818

1919
After you're done, you should have a folder with a main file. Your files may be different.
2020
```console
21-
$ tree p1-stats/
22-
p1-stats/
21+
$ tree stats/
22+
stats/
2323
├── main.cpp
2424
...
2525
```
@@ -175,7 +175,7 @@ When you're working alone version control is optional, but it provides benefits:
175175
- Code backup
176176
- Easy to try and revert ideas
177177

178-
Set up version control using the [Version control tutorial](https://eecs280staff.github.io/p1-stats/setup_git.html). If you've used version control before on your computer, you'll probably want to start with the [Create a local repository](https://eecs280staff.github.io/p1-stats/setup_git.html#create-a-local-repository) section.
178+
Set up version control using the [Version control tutorial](https://eecs280staff.github.io/stats/setup_git.html). If you've used version control before on your computer, you'll probably want to start with the [Create a local repository](https://eecs280staff.github.io/stats/setup_git.html#create-a-local-repository) section.
179179

180180
After you're done, you should have a local repository with a "clean" status and your local repository should be connected to a remote GitHub repository.
181181
```console
@@ -185,11 +185,11 @@ Your branch is up-to-date with 'origin/main'.
185185

186186
nothing to commit, working tree clean
187187
$ git remote -v
188-
origin https://github.com/awdeorio/p1-stats.git (fetch)
189-
origin https://github.com/awdeorio/p1-stats.git (push)
188+
origin https://github.com/awdeorio/stats.git (fetch)
189+
origin https://github.com/awdeorio/stats.git (push)
190190
```
191191

192-
You should have a `.gitignore` file ([instructions](https://eecs280staff.github.io/p1-stats/setup_git.html#create-a-local-repository)).
192+
You should have a `.gitignore` file ([instructions](https://eecs280staff.github.io/stats/setup_git.html#create-a-local-repository)).
193193
```console
194194
$ head .gitignore
195195
This is a sample .gitignore file that's useful for C++ projects.

docs/setup_emacs.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -199,19 +199,19 @@ Here are a few basic customizations that you might like. Paste with `C-y`.
199199
Set up [`use-package`](https://github.com/jwiegley/use-package), which automates package installation and configuration.
200200

201201
```elisp
202-
;; Configure built in package manager
202+
;; Configure built-in package manager
203203
(require 'package)
204-
(package-initialize)
205204
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
206205
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/"))
206+
(package-initialize)
207207
208-
;; Install use-package
209-
;; https://github.com/jwiegley/use-package
210-
(when (not (package-installed-p 'use-package))
208+
;; Install and configure use-package
209+
(unless (package-installed-p 'use-package)
211210
(package-refresh-contents)
212211
(package-install 'use-package))
213212
(eval-when-compile
214213
(require 'use-package))
214+
(setq use-package-always-defer t) ; Globally defer package loading
215215
```
216216

217217
### Undo/redo
@@ -281,8 +281,8 @@ Emacs doesn't require any special setup for a project.
281281
Create a new directory, then move into the new directory. Your folder location might be different.
282282

283283
```console
284-
$ mkdir ~/eecs280/p1-stats
285-
$ cd ~/eecs280/p1-stats
284+
$ mkdir ~/eecs280/stats
285+
$ cd ~/eecs280/stats
286286
```
287287

288288
### Add new files
@@ -310,11 +310,11 @@ int main() {
310310
### Add existing files
311311
Emacs doesn't require any special steps for adding existing files.
312312

313-
If you have starter files, add them to your project directory. This example is from [EECS 280 Project 1](https://eecs280staff.github.io/p1-stats/), but this tutorial doesn't require understanding the files. Your URL or files might be different.
313+
If you have starter files, add them to your project directory. This example is from [EECS 280 Project 1](https://eecs280staff.github.io/stats/), but this tutorial doesn't require understanding the files. Your URL or files might be different.
314314

315315
Download, unpack, and move the starter files into the directory that already contains `main.cpp`. Your URL or folder might be different.
316316
```console
317-
$ wget https://eecs280staff.github.io/p1-stats/starter-files.tar.gz
317+
$ wget https://eecs280staff.github.io/stats/starter-files.tar.gz
318318
$ tar -xvzf starter-files.tar.gz
319319
$ mv starter-files/* .
320320
$ rm -rf starter-files starter-files.tar.gz
@@ -328,8 +328,8 @@ $ tree
328328
├── cats.csv
329329
├── cats.out.correct
330330
├── main.cpp
331-
├── p1_library.cpp
332-
├── p1_library.hpp
331+
├── library.cpp
332+
├── library.hpp
333333
├── stats.hpp
334334
├── stats_public_tests.cpp
335335
├── stats_tests.cpp.starter
@@ -490,21 +490,21 @@ $ emacs
490490

491491
SSH into your remote server, CAEN Linux in this example. This will set up an SSH multiplexing connection.
492492
```console
493-
$ ssh login.engin.umich.edu
493+
$ ssh login-course.engin.umich.edu
494494
...
495495
```
496496

497-
In Emacs, open the file `/ssh:login.engin.umich.edu:main.cpp`. Recall `C-x C-f` is `find-file`. Tab completion works in the minibuffer. You're now editing a file `main.cpp` on a remote server.
497+
In Emacs, open the file `/ssh:login-course.engin.umich.edu:main.cpp`. Recall `C-x C-f` is `find-file`. Tab completion works in the minibuffer. You're now editing a file `main.cpp` on a remote server.
498498

499499
### Pair programming with tmux
500500
Pair program on a remote machine with two people inside the same Emacs instance. We'll use tmux, which is a terminal multiplexer.
501501

502502
Alice connects to a remote server containing her code. She starts a tmux session named `shared`. Then, she starts Emacs inside that tmux session.
503503
```console
504-
$ ssh login.engin.umich.edu
504+
$ ssh login-course.engin.umich.edu
505505
$ hostname
506506
caen-vnc-vm05.engin.umich.edu
507-
$ cd p1-stats
507+
$ cd stats
508508
$ tmux new -s shared
509509
$ emacs -nw main.cpp
510510
```

0 commit comments

Comments
 (0)