Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| Control + A = takes you to the very beginning of the line | |
| Control + E = takes you to the very end of the line | |
| Press the up key = references previous commands in history | |
| Press the down key = allows you to navigate back down towards other commands if you have already gone up | |
| echo ~ = variable for the home directory of your computer |
| touch = allows you to create a file | |
| example: touch newTextFile.txt | |
| nano = an editor which allows you to create files | |
| example: nano aFile.txt | |
| mkdir = make directory | |
| example: mkdir aDir | |
| You can create files within directories by touch, but specifying the path. |
| find = searches for files | |
| example: find ~/Documentqs | |
| find . = searches current directory | |
| find . -type f = searches for files that happen to be files(finds all files recursively through the directory that your in) | |
| find . -name "typeNameYourSearchingFor" = you can also find the name that you are looking for by typing it inbetween the quotations | |
| find . -name "*.txt" = allows you to search for all the files that end in .txt(within that directory) |
| Say you were to create a text file via terminal by using the command "touch aFile.txt" | |
| *once you have created it make a detailed list using "ls -l" | |
| * -l in the command gives more information about the file | |
| Once you press enter you will see a line with the following code. | |
| example: | |
| -rw-r--r-- 1 user staff 0 Apr 15 3:44 aFile.text | |
| user = this part shows user |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| # Ways to execute a shell script in Ruby | |
| # Example Script - Joseph Pecoraro | |
| cmd = "echo 'hi'" # Sample string that can be used | |
| # 1. Kernel#` - commonly called backticks - `cmd` | |
| # This is like many other languages, including bash, PHP, and Perl | |
| # Returns the result of the shell command | |
| # Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
| /* -------------------------------- | |
| Typography | |
| -------------------------------- */ | |
| :root { | |
| --font-primary: sans-serif; | |
| --font-secondary: serif; |
| =begin | |
| Problem | |
| Write a method that takes two arguments, a string and a positive integer, and | |
| prints as many times as the integer indicates. | |
| PEDAC, Breaking Down the Problem: | |
| Inputs: | |
| - takes two arguments | |
| - a string and a positive integer |
| // Thoughts on construction? | |
| //// Example of variables | |
| // Grey 1 - 5 | |
| $grey1: #acacad; | |
| $grey2: #707070; | |
| $grey3: #505158; | |
| $grey4: #707070; | |
| $grey5: #33343b; |