Skip to content

Commit

Permalink
added start building
Browse files Browse the repository at this point in the history
  • Loading branch information
seankross committed Jun 9, 2017
1 parent b71674e commit c732d8b
Show file tree
Hide file tree
Showing 26 changed files with 663 additions and 29 deletions.
52 changes: 48 additions & 4 deletions 07-Nephology.Rmd
Expand Up @@ -685,9 +685,12 @@ look at some examples of more complex table entries:

Besides numbers and the star there are a few other characters that you can use
in `cron` table columns including a hyphen (`-`) for specifying ranges and a
comma (`,`) for specifying lists of items. Let's take a look at another example
comma (`,`) for specifying lists of items. For example `00-29` in the Minutes
column would specify the first thirty minutes of an hour, while `1,5` in the
Day of Week column would specify Monday and Friday.
Let's take a look at another example
of a `cron` table that uses hyphens and ranges so you can get a sense of how
each of these characters works.
each character works.

```
# m h dom mon dow command
Expand All @@ -705,12 +708,53 @@ can stretch! If you're familiar with the social network
accounts which create posts automatically like
[Emoji Aquarium](https://twitter.com/emojiaquarium),
[Old Fruit Pictures](https://twitter.com/pomological), or
[Endless Screaming](https://twitter.com/infinite_scream).
[Endless Screaming](https://twitter.com/infinite_scream). Many of these "bot"
accounts are powered by `cron`, which uses Twitter's HTTP API to post tweets
regularly.

### Summary

### Exercises
- `scp` copies files between a cloud computer and your personal computer. Use
the `-r` flag in order to copy directories.
- `curl` allows you to send HTTP requests to other servers. Use the `-O` flag to
download files with `curl`.
- `ps -A` lists all of the programs running in the background of your computer.
- `cron` allows you to schedule when programs are run. Use `crontab -e` in order
to edit the `cron` table.

### Exercises

1. Write a bash script that takes a file path as an argument and copies that
file to a designated folder on your server.
2. Find a file online that changes periodically, then write a program to
download that file every time it changes.
2. Try creating your own Twitter or GitHub bot with the
[Twitter API](https://dev.twitter.com/rest/public) or the
[GitHub API](https://developer.github.com/v3/).

## Shutting Down a Server

In order to avoid using more DigitalOcean credits than we have to or
being charged for using the service make sure to **destroy** any DigitalOcean
droplets that you started. When you destroy a droplet all files
on the droplet are gone forever, so please be sure that you don't have any
important information on a droplet before you destroy it. If there are files
you want to save on your droplet use `scp` in order to copy them to your local
machine. Let's walk through destorying a droplet. Go back to
[DigitalOcean](https://m.do.co/c/530d6cfa2b37) and log in. You should then see
a listing of all of your droplets:

![](img/do-droplets-list.png)

Click on **More** on the right side of the screen and a menu should appear.
Click **Destroy** at the bottom of this menu. Then this screen should appear:

![](img/do-destroy-button.png)

Click the **Destroy** button and then click **Confirm** in the menu that pops
up. Your droplet should now be destroyed. If you have no active droplets then
the main droplets page should look like this:

![](img/do-fresh.png)

Congratulations on your new cloud computing skills!
69 changes: 69 additions & 0 deletions 08-Start-Building.Rmd
@@ -0,0 +1,69 @@
# Start Building

## Next Steps

We've reached the end of this book, which means that you now have a formidable
foundation in using Unix. Congratulations! As the title of this book suggests
Unix serves mostly as a workbench - a set of tools for building amazing digital
creations. However, what you can create with Unix is usually not made out of
Unix's constituent parts. You might use a hammer and saw to build a good
birdhouse, but the birdhouse itself isn't made out of hammers. Working knowledge
of Unix is best complemented by knowing at least one other programming langauge.
Here are a few suggestions about how you can continue your computing and
programming education.

[**Python**](https://www.python.org/) is an approachable and essentiall language
for anyone interested in computing. If you don't have any programming experience
outside of this book, I very highly recommend learning Python. My favorite book
on the subject is [Learn Python the Hard Way](https://learnpythonthehardway.org/book/)
by Zed Shaw. Philip Guo's [Python Tutor](http://pythontutor.com/) allows you to
visualize how Python is working under-the-hood, which allows you to develop a
better intuition about the code you're writing. The pairing of those two
resources is currently the best way to learn how to write software outside of
formal university or corporate training. Once you have some Python expereince
you can try building your own HTTP API with [Flask](http://flask.pocoo.org/).

[**R**](https://www.r-project.org/) is general purpose programming language
designed for folks who are interested in data science, analysis, modeling, and
visualization. R is also fantastic for making digital documents: this book was
created with R! If you want to get started with R I recommend the book
[R Programming for Data Science](https://leanpub.com/rprogramming), the
[Swirl](http://swirlstats.com/) software package, and the interactive R
tutorial website called [DataCamp](https://www.datacamp.com/).

[**Javascript**](https://developer.mozilla.org/en-US/docs/Web/JavaScript) is
the main language that powers the internet and it forms the backbone of web
application programming. The Mozilla Development Network has
[wonderful tutorials](https://developer.mozilla.org/en-US/docs/Web/Tutorials)
about HTML, CSS, and Javascript. Usually you use Javascript to manipulate
HTML and CSS, so learning about all three is important! I also recommend
[NodeSchool](https://nodeschool.io/) for purely learning about Javascipt with
Unix.

## Giving Feedback

Thank you so much for reading this book! If you'd like to discuss the book or
you have any feedback I would love to hear from you. The best way to contact me
is [on Twitter](https://twitter.com/seankross).

Now that you know how to use Git and GitHub you can submit changes that you
think should be made to this book including fixing typos and correcting errors.
You can find the repositoiry for this book
[here](https://github.com/seankross/the-unix-workbench). Fork the repository,
and make your changes to the approproate `.Rmd` file (just treat it like a
regular Markdown file). Add, commit, and push your changes, then send me a pull
request! While you're on the GitHub if you wouldn't mind giving this book's
repository a [**Star**](https://github.com/seankross/the-unix-workbench) I
would really appreciate it so that others can find this book more easily.

## Using this Book

This book is released under a [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
license, meaning that it is dedicated to the public domain. If you think this
book is worth paying for or you want to support the creation of more open source
educational materials then consider buying the book
on [Leanpub](https://leanpub.com/theunixworkbench) where you are free to pay
what you want, or send me a few dollars via [PayPal](https://www.paypal.me/seankross/5).

If you use this book as part of a course or in any other setting please let me
know!
File renamed without changes.
2 changes: 1 addition & 1 deletion _bookdown.yml
Expand Up @@ -2,6 +2,6 @@ book_filename: "the-unix-workbench"
chapter_name: "Chapter "
repo: https://github.com/seankross/the-unix-workbench
output_dir: docs
rmd_files: ["index.Rmd", "01-What-is-Unix.Rmd", "02-Getting-Unix.Rmd", "03-Command-Line-Basics.Rmd", "04-Working-with-Unix.Rmd", "05-Bash-Programming.Rmd", "06-Git-and-GitHub.Rmd", "07-Nephology.Rmd"]
rmd_files: ["index.Rmd", "01-What-is-Unix.Rmd", "02-Getting-Unix.Rmd", "03-Command-Line-Basics.Rmd", "04-Working-with-Unix.Rmd", "05-Bash-Programming.Rmd", "06-Git-and-GitHub.Rmd", "07-Nephology.Rmd", "08-Start-Building.Rmd"]
clean: [packages.bib, bookdown.bbl]
new_session: yes
52 changes: 48 additions & 4 deletions docs/07-Nephology.md
Expand Up @@ -722,9 +722,12 @@ look at some examples of more complex table entries:

Besides numbers and the star there are a few other characters that you can use
in `cron` table columns including a hyphen (`-`) for specifying ranges and a
comma (`,`) for specifying lists of items. Let's take a look at another example
comma (`,`) for specifying lists of items. For example `00-29` in the Minutes
column would specify the first thirty minutes of an hour, while `1,5` in the
Day of Week column would specify Monday and Friday.
Let's take a look at another example
of a `cron` table that uses hyphens and ranges so you can get a sense of how
each of these characters works.
each character works.

```
# m h dom mon dow command
Expand All @@ -742,12 +745,53 @@ can stretch! If you're familiar with the social network
accounts which create posts automatically like
[Emoji Aquarium](https://twitter.com/emojiaquarium),
[Old Fruit Pictures](https://twitter.com/pomological), or
[Endless Screaming](https://twitter.com/infinite_scream).
[Endless Screaming](https://twitter.com/infinite_scream). Many of these "bot"
accounts are powered by `cron`, which uses Twitter's HTTP API to post tweets
regularly.

### Summary

### Exercises
- `scp` copies files between a cloud computer and your personal computer. Use
the `-r` flag in order to copy directories.
- `curl` allows you to send HTTP requests to other servers. Use the `-O` flag to
download files with `curl`.
- `ps -A` lists all of the programs running in the background of your computer.
- `cron` allows you to schedule when programs are run. Use `crontab -e` in order
to edit the `cron` table.

### Exercises

1. Write a bash script that takes a file path as an argument and copies that
file to a designated folder on your server.
2. Find a file online that changes periodically, then write a program to
download that file every time it changes.
2. Try creating your own Twitter or GitHub bot with the
[Twitter API](https://dev.twitter.com/rest/public) or the
[GitHub API](https://developer.github.com/v3/).

## Shutting Down a Server

In order to avoid using more DigitalOcean credits than we have to or
being charged for using the service make sure to **destroy** any DigitalOcean
droplets that you started. When you destroy a droplet all files
on the droplet are gone forever, so please be sure that you don't have any
important information on a droplet before you destroy it. If there are files
you want to save on your droplet use `scp` in order to copy them to your local
machine. Let's walk through destorying a droplet. Go back to
[DigitalOcean](https://m.do.co/c/530d6cfa2b37) and log in. You should then see
a listing of all of your droplets:

![](img/do-droplets-list.png)

Click on **More** on the right side of the screen and a menu should appear.
Click **Destroy** at the bottom of this menu. Then this screen should appear:

![](img/do-destroy-button.png)

Click the **Destroy** button and then click **Confirm** in the menu that pops
up. Your droplet should now be destroyed. If you have no active droplets then
the main droplets page should look like this:

![](img/do-fresh.png)

Congratulations on your new cloud computing skills!
69 changes: 69 additions & 0 deletions docs/08-Start-Building.md
@@ -0,0 +1,69 @@
# Start Building

## Next Steps

We've reached the end of this book, which means that you now have a formidable
foundation in using Unix. Congratulations! As the title of this book suggests
Unix serves mostly as a workbench - a set of tools for building amazing digital
creations. However, what you can create with Unix is usually not made out of
Unix's constituent parts. You might use a hammer and saw to build a good
birdhouse, but the birdhouse itself isn't made out of hammers. Working knowledge
of Unix is best complemented by knowing at least one other programming langauge.
Here are a few suggestions about how you can continue your computing and
programming education.

[**Python**](https://www.python.org/) is an approachable and essentiall language
for anyone interested in computing. If you don't have any programming experience
outside of this book, I very highly recommend learning Python. My favorite book
on the subject is [Learn Python the Hard Way](https://learnpythonthehardway.org/book/)
by Zed Shaw. Philip Guo's [Python Tutor](http://pythontutor.com/) allows you to
visualize how Python is working under-the-hood, which allows you to develop a
better intuition about the code you're writing. The pairing of those two
resources is currently the best way to learn how to write software outside of
formal university or corporate training. Once you have some Python expereince
you can try building your own HTTP API with [Flask](http://flask.pocoo.org/).

[**R**](https://www.r-project.org/) is general purpose programming language
designed for folks who are interested in data science, analysis, modeling, and
visualization. R is also fantastic for making digital documents: this book was
created with R! If you want to get started with R I recommend the book
[R Programming for Data Science](https://leanpub.com/rprogramming), the
[Swirl](http://swirlstats.com/) software package, and the interactive R
tutorial website called [DataCamp](https://www.datacamp.com/).

[**Javascript**](https://developer.mozilla.org/en-US/docs/Web/JavaScript) is
the main language that powers the internet and it forms the backbone of web
application programming. The Mozilla Development Network has
[wonderful tutorials](https://developer.mozilla.org/en-US/docs/Web/Tutorials)
about HTML, CSS, and Javascript. Usually you use Javascript to manipulate
HTML and CSS, so learning about all three is important! I also recommend
[NodeSchool](https://nodeschool.io/) for purely learning about Javascipt with
Unix.

## Giving Feedback

Thank you so much for reading this book! If you'd like to discuss the book or
you have any feedback I would love to hear from you. The best way to contact me
is [on Twitter](https://twitter.com/seankross).

Now that you know how to use Git and GitHub you can submit changes that you
think should be made to this book including fixing typos and correcting errors.
You can find the repositoiry for this book
[here](https://github.com/seankross/the-unix-workbench). Fork the repository,
and make your changes to the approproate `.Rmd` file (just treat it like a
regular Markdown file). Add, commit, and push your changes, then send me a pull
request! While you're on the GitHub if you wouldn't mind giving this book's
repository a [**Star**](https://github.com/seankross/the-unix-workbench) I
would really appreciate it so that others can find this book more easily.

## Using this Book

This book is released under a [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
license, meaning that it is dedicated to the public domain. If you think this
book is worth paying for or you want to support the creation of more open source
educational materials then consider buying the book
on [Leanpub](https://leanpub.com/theunixworkbench) where you are free to pay
what you want, or send me a few dollars via [PayPal](https://www.paypal.me/seankross/5).

If you use this book as part of a course or in any other setting please let me
know!
7 changes: 6 additions & 1 deletion docs/acknowledgements.html
Expand Up @@ -26,7 +26,7 @@
<meta name="author" content="Sean Kross">


<meta name="date" content="2017-06-08">
<meta name="date" content="2017-06-09">

<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
Expand Down Expand Up @@ -229,6 +229,11 @@
</ul></li>
<li class="chapter" data-level="7.5" data-path="nephology.html"><a href="nephology.html#shutting-down-a-server"><i class="fa fa-check"></i><b>7.5</b> Shutting Down a Server</a></li>
</ul></li>
<li class="chapter" data-level="8" data-path="start-building.html"><a href="start-building.html"><i class="fa fa-check"></i><b>8</b> Start Building</a><ul>
<li class="chapter" data-level="8.1" data-path="start-building.html"><a href="start-building.html#next-steps"><i class="fa fa-check"></i><b>8.1</b> Next Steps</a></li>
<li class="chapter" data-level="8.2" data-path="start-building.html"><a href="start-building.html#giving-feedback"><i class="fa fa-check"></i><b>8.2</b> Giving Feedback</a></li>
<li class="chapter" data-level="8.3" data-path="start-building.html"><a href="start-building.html#using-this-book"><i class="fa fa-check"></i><b>8.3</b> Using this Book</a></li>
</ul></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>

Expand Down
7 changes: 6 additions & 1 deletion docs/bash-programming.html
Expand Up @@ -26,7 +26,7 @@
<meta name="author" content="Sean Kross">


<meta name="date" content="2017-06-08">
<meta name="date" content="2017-06-09">

<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
Expand Down Expand Up @@ -229,6 +229,11 @@
</ul></li>
<li class="chapter" data-level="7.5" data-path="nephology.html"><a href="nephology.html#shutting-down-a-server"><i class="fa fa-check"></i><b>7.5</b> Shutting Down a Server</a></li>
</ul></li>
<li class="chapter" data-level="8" data-path="start-building.html"><a href="start-building.html"><i class="fa fa-check"></i><b>8</b> Start Building</a><ul>
<li class="chapter" data-level="8.1" data-path="start-building.html"><a href="start-building.html#next-steps"><i class="fa fa-check"></i><b>8.1</b> Next Steps</a></li>
<li class="chapter" data-level="8.2" data-path="start-building.html"><a href="start-building.html#giving-feedback"><i class="fa fa-check"></i><b>8.2</b> Giving Feedback</a></li>
<li class="chapter" data-level="8.3" data-path="start-building.html"><a href="start-building.html#using-this-book"><i class="fa fa-check"></i><b>8.3</b> Using this Book</a></li>
</ul></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>

Expand Down
7 changes: 6 additions & 1 deletion docs/command-line-basics.html
Expand Up @@ -26,7 +26,7 @@
<meta name="author" content="Sean Kross">


<meta name="date" content="2017-06-08">
<meta name="date" content="2017-06-09">

<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
Expand Down Expand Up @@ -229,6 +229,11 @@
</ul></li>
<li class="chapter" data-level="7.5" data-path="nephology.html"><a href="nephology.html#shutting-down-a-server"><i class="fa fa-check"></i><b>7.5</b> Shutting Down a Server</a></li>
</ul></li>
<li class="chapter" data-level="8" data-path="start-building.html"><a href="start-building.html"><i class="fa fa-check"></i><b>8</b> Start Building</a><ul>
<li class="chapter" data-level="8.1" data-path="start-building.html"><a href="start-building.html#next-steps"><i class="fa fa-check"></i><b>8.1</b> Next Steps</a></li>
<li class="chapter" data-level="8.2" data-path="start-building.html"><a href="start-building.html#giving-feedback"><i class="fa fa-check"></i><b>8.2</b> Giving Feedback</a></li>
<li class="chapter" data-level="8.3" data-path="start-building.html"><a href="start-building.html#using-this-book"><i class="fa fa-check"></i><b>8.3</b> Using this Book</a></li>
</ul></li>
<li class="divider"></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>

Expand Down

0 comments on commit c732d8b

Please sign in to comment.