Learn Enough SocietyCertificate of Course Completion
This page certifies that mhartl has completed Learn Enough Text Editor to Be Dangerous! 🎉
gfor the commonly used case-insensitive grep
grep -i. What happens if, after making your changes and hitting
ESC, you issue the command
curlcommand from Learn Enough Command Line to Be Dangerous, which lets us interact with URLs via the command line. Define
getas 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).
xkey, 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.)
ddto delete the line, then use
pto paste it repeatedly into the document.
sonnets.txtopen in Vim, move down three screens and then back up three screens.
sonnets.txtto the more modern “Shakespeare”, and save the result.
18Ggoes to the final line of the first sonnet. What do you suppose that command does? Hint: Recall that
1Ggoes to the beginning of the file, i.e., Line 1.
atomcommand at the command line (Figure 2.1).
sublcommand 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.txtand fill it with the text shown in Listing 2.1. Does the result have syntax highlighting?
test.rband fill it with the text shown in Listing 2.2. 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.txtand 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.mdand replace it with “README”.
sonnet_1.txt. How do you create a new file directly in your editor?
README.mdhave been undone.
README.mdand 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.
code_example.md, paste in the code example, and save the file.
.bashrcfile to include the lines shown in Listing 2.6. Source the Bash profile as in Listing 1.5 and confirm that the prompt on your system matches the one shown in Listing 2.5. (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.mdusing 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
def⇥trigger, then add the final line shown by using autocomplete to type
bazquux. (Type the interstitial
greeter.rbwith the contents shown in Listing 3.5.
hellodefinition and indenting the block, transform Listing 3.5 into Listing 3.6.
ekillby 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
tailto get a process that just hangs. In the other tab, use
ps aux | grep tailto 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).
hellothat takes in an argument and prints out “Hello” followed by the argument. Be sure to
chmodthe script so it can run properly. Hint: Use the
echocommand. Bigger hint: Bash scripts interpolate dollar-sign variables into strings, so the
$1variable from Listing 3.8 can be used in a string like this:
static_pages_controller.rbusing fuzzy opening.
minimappackage. What does this package do? The result for
sonnets.txtshould look something like Figure 3.39.
# function definitionas described in the text.
codecommand 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.