JumpStart Live (JSL)
There are number of ways to split your screen, and move your windows around, a few options are listed below
- Native to MacOSX, use Desktops and Split Views
- Install Spectacle (Free)
- Install Moom ($10)
- Install Divvy ($13.99)
When programming you should always have a Terminal window open
cmd+spacebar
to open spotlight, then type Terminal- Drag Terminal to your Dock (if it's not already there)
Command | Description |
---|---|
cmd + K |
clear your screen |
touch <filename> |
creates a new file named filename |
pwd |
prints the working directory (displays the full path of the current directory) |
cd |
choose a directory |
cd .. |
go back a directory |
cd ~ |
choose home directory |
ls |
list the items in the directory |
ls -a |
list the items in the directory, including hidden files |
mkdir |
make a new directory |
rm <filename> |
removes the file named filename |
rm -r <dirname> |
removes the directory (and everything in it) named dirname |
↑ | view the previous command |
ctrl + a |
go to beginning of line |
ctrl + e |
go to end of line |
alt + → |
move to the right, one word |
alt + ← |
move to the left, one word |
ctrl + c |
interrupt or stop a command |
Command | Description |
---|---|
irb |
start interactive ruby session |
exit |
exit an irb session |
ctrl + c |
interrupt or stop a command |
- Type
ruby
followed by the name of the Ruby file (e.g.,ruby hello_world.rb
)
- In Atom, click the Atom menu and then Install Shell Commands
- Now, to launch Atom from terminal, type
atom
followed by the file name or directory name
.bash_profile
is a hidden file in your user directoy that you can edit to customize the terminal prompt (among a number of other things)- Type
atom ~/.bash_profile
to open it (if it doesn't already exist, this command will create it)
PS1
is the enviornment variable for the bash promptPS1
stands for Prompt String 1, there is alsoPS2
,PS3
, andPS4
- The default string stored in
PS1
is\s-\v\$
- To change
PS1
, addexport PS1=" "
to your.bash_profile
(no spaces on either side of the equal sign) - Add anything in the quotes that you would like (some options below)
\s
– name of shell (e.g., bash)\v
– version of bash\d
– current date\t
– current time\u
– user name\W
– current working directory- You can even add emoji, in Atom, click Edit > Emjoi & Symbols
- When you are done editing, save in Atom and then type
source ~/.bash_profile
in Terminal to apply the changes
- Ada Workflow Video (8:34)