Learn python should be a goal of high priority this semester because whatever path I am taking, I will likely be working in a techy role and thus have to code. I am starting this project to learn basic python by using a seemly well-reputed textbook Learn Python the Hard Way.
Jan 25 – Feb 6. Downtime at night after 8pm. — Learn to use command line.
Quizlet Used when reviewing for GRE and sociology exams. Now use to memorize the lines. Also has a handy iPhone app.
I am using Max OSX.
pwd = print working directory. Figuring out where you are. On my Mac it’s /Users/yuqiongli
cd ~ = come back to main directory.
Before do any exercise always pwd + cd ~ to go home first. (why?)
mkdir = make directories.
- Doesn’s seem to work if cross level. For example, if has temp, mkdir temp/stuff — this one works. But mkdir temp/stuff/joe/alex does not work. You have to create joe first. Cannot create joe and alex at the same time.
- When want a space in folder name, use quotation marks. mkdir temp/”I have fun”
- Installed SyntaxHighlighter wordpress plugin to insert codes into my posts. Usage here. Note this version have to write code in text editor instead of visual editor.
- But using SyntaxHighlighter is not pretty. Instead someone mentions this should also work
- surround a text with <code></code> or writing it in `..`
\\This is an example
When use mkdir, note the following differences
$ mkdir temp
$ mkdir -p temp/stuff/things
The second command uses a “-p” because it creates a series of folders instead of one!
When at home my productivity goes straight down! A trick learnt today is using “..” in the “cd” command to move up a level of folders. Example code –
$ cd ..
$ cd ../..
Getting familiar with cd seems to take a lot of practice. It requires me to memorize the paths and exactly where my files are.
A tricky command that seems to list out all files in a hierarchy of folders instead of the one at the direct level?
$ ls -lR