Learn Enough Society
Certificate of Course CompletionThis page certifies that mhartl has completed Learn Enough Text Editor to Be Dangerous! 🎉
g
for the commonly used case-insensitive grep grep -i
. What happens if, after making your changes and hitting ESC
, you issue the command :wq
instead of :w
and :q
separately?
curl
command from Learn Enough Command Line to Be Dangerous, which lets us interact with URLs via the command line. Define get
as an alias for curl -OL
, which is the command to download a file to the local disk (while following any redirects encountered along the way).
foo.txt
.
x
key, delete the character necessary to correct the mistake in the line you just entered. (If you can’t find the error, refer to Table 1.1.)
dd
to delete the line, then use p
to paste it repeatedly into the document.
sonnets.txt
open in Vim, move down three screens and then back up three screens.
sonnets.txt
to the more modern “Shakespeare”, and save the result.
18G
goes to the final line of the first sonnet. What do you suppose that command does? Hint: Recall that 1G
goes to the beginning of the file, i.e., Line 1.
sonnets.txt
.
2620dd
.
atom
command at the command line (Figure 2.1).
subl
command by Googling for “sublime text command line” and following the instructions for your system. Apply your technical sophistication (Box 1.2) if you get stuck. You might also find it helpful to skip ahead to Section 3.3 to learn about how to configure your system’s path.
lorem.txt
and fill it with the text shown in Listing 2.2. Does the result have syntax highlighting?
test.rb
and fill it with the text shown in Listing 2.3. Does the result have syntax highlighting?
README.md
. How do the results compare to Figure 2.11?
README.md
, move to the second-to-last nonblank line using whatever technique you wish. Then move to the third word from the beginning of that line.
sonnets.txt
. What do rough winds do?
sonnets.txt
and pressing ⌘→ followed by ⌘←, show that ⌘← actually stops as soon as it reaches whitespace, with the result shown in Figure 2.17. How do you get to the true beginning of the line?
README.md
and replace it with “README”.
sonnet_1.txt
. How do you create a new file directly in your editor?
README.md
have been undone.
README.md
and delete it, then undo the change.
sonnets.txt
, then scroll around so you get lost. Use the Undo/Redo trick to find the cursor again. Then keep using Undo to undo all your changes.
README.md
as code_example.md
, paste in the code example, and save the file.
.bashrc
file to include the lines shown in Listing 2.7. Source the Bash profile as in Listing 1.5 and confirm that the prompt on your system matches the one shown in Listing 2.6. (To learn how to customize the prompt using Z shell, the current default shell on macOS, see the Learn Enough blog post “Using Z Shell on Macs with the Learn Enough Tutorials”.)
sonnets.txt
. On what line does “rosy lips and cheeks” appear?
README.md
using a tab trigger.
foo.rb
, then define the class FooBar
(Listing 3.3) using a tab trigger. Hint: Chances are the trigger is something like cla⇥
.
bazquux
using the def⇥
trigger, then add the final line shown by using autocomplete to type FooBar
and bazquux
. (Type the interstitial .new.
by hand.)
greeter.rb
with the contents shown in Listing 3.5.
hello
definition and indenting the block, transform Listing 3.5 into Listing 3.6.
ekill
by making a process that hangs and applying the lessons from grepping processes in Learn Enough Command Line to Be Dangerous. We’ll start by opening two terminal tabs. In one tab, type tail
to get a process that just hangs. In the other tab, use ps aux | grep tail
to find the process id, then run ekill <pid>
(substituting the actual id for <pid>
). In the tab running tail
, you should get something like “Terminated: 15” (Figure 3.20).
hello
that takes in an argument and prints out “Hello” followed by the argument. Be sure to chmod
the script so it can run properly. Hint: Use the echo
command. Bigger hint: Bash scripts interpolate dollar-sign variables into strings, so the $1
variable from Listing 3.8 can be used in a string like this: "Hello, $1"
.
static_pages_controller.rb
using fuzzy opening.
@user
.
@user
to @person
.
# function definition
as described in the text.
code
command by Googling for “visual studio code command line” and following the instructions for your system.
Get free access to all 10 Learn Enough courses (including the Ruby on Rails Tutorial) for 7 days!
We require a credit card for security purposes, but it will not be charged during the trial period. After 7 days, you will be enrolled automatically in the monthly All Access subscription.
BUT you can cancel any time and still get the rest of the 7 days for free!
All Learn Enough tutorials come with a 60-day 100% money-back guarantee.