#Command Line Just jotting down the ones that I didn't know about.
-
top
Table of processes -
whoami
-
open .
open in finder -
cd -
Effectively a 'back' in windows -
ls -la
long listing that lists hidden files -
cat
(egcat readme
) Displays the file -
open -a "Sublime Text" [filename]
Long way to open something in Sublime 3 -
Add the following to
~/.bash_profile
so that files can be opened easily in sublimealias subl="open -a 'Sublime Text'"
-
Also add the following to
.bash_profile
to alter your bash prompt profilePS1="\W $ "
-
ctrl-d
closes terminal tab -
rm -rf /
deletes your hard drive; The flagr
is for recursive andf
is for force -
which
as inwhich ruby
tells you the directory the command lives in -
alias
lists aliases -
Useful aliases:
l
forls -la
andb
forcd ..
-
man
manual
#Git
- Good way of passing code
- http://daringfireball.net/projects/markdown/ for Markdown tips
#Ruby
- Discusssion about syntax
- Backslash for escaping chracters
- snake case "hello_world"
- camel case "HelloWorld"
- constants are defined using all caps
- #{} is known as string interpolation
- Hash.new("brown") creates a hash where the default value is "brown"
- Exercises from RubyMonk