-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.txt
78 lines (59 loc) · 3.08 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Go to PeriodicTableNavInProjects in terminal
cd ~/Projects/PeriodicTableNav
ruby PeriodicTableNav.rb
Push code from Github to Heroku
git push heroku master
2021-03-06 plan for hover between elements to compare:
1) Test if four adjacent elements (left, right, above, below) exist
2) If each adjacent element exists, add mouse's distance from that element to array (position [top], distance [27 (pixels)])
3) Sort array numerical ascending
4) Select first element from array--position
5) Use a case statement to set $base, for example (first array element =) top, set $base to above
Migrate postgres database on Heroku
heroku run rake db:migrate
Log in to psql (as user postgres)
psql -U postgres
Dump postgres database
pg_dump --format=c elements > elements20210227c.dump
Restore postgres database to local postgres server
pg_restore elements.dump -d elements -U postgres
Upload postgres database to Heroku
heroku pg:backups:restore 'https://drive.google.com/uc?export=download&id=1110YFxLbilrcfuEyyb_tfnyRroTaRaJN' DATABASE_URL --app ptablenav
Add postures to path
export PATH=/Applications/Postgres.app/Contents/MacOS/bin:$PATH;
Update Gemfile.lock without installing gems (http://stackoverflow.com/questions/26335777/ddg#46553586)
bundle lock --update
Original tutorial I followed: https://code.tutsplus.com/tutorials/singing-with-sinatra--net-18965
Go to ruby-sinatra-tutorial project in terminal (https://www.devdungeon.com/content/ruby-sinatra-tutorial)
Go to: cd ~/Projects/ruby-sinatra-tutorial
Run: ruby hello.rb
Force cache refresh in Firefox for Mac, to make sure page uses latest css etc. files
Press "Command + Shift + R" (https://support.mozilla.org/en-US/questions/1103414)
To open a location in Finder by typing (or pasting) the path:
Command-Shift-G (while in Finder)
To show hidden files in Finder:
Command-Shift-. (period)
2021-02-22 postgresql installation
Path to psql: /Applications/Postgres.app/Contents/Versions/13/bin/psql
Add path to psql in terminal: export PATH=/Applications/Postgres.app/Contents/Versions/13/bin:$PATH;
Installation Directory: /Library/PostgreSQL/13
Server Installation Directory: /Library/PostgreSQL/13
Data Directory: /Library/PostgreSQL/13/data
Database Port: 5432 -> changed to 5434 because 5432 and 5433 were already in use (not sure why)
Database Superuser: postgres
Password: See 1Password
Operating System Account: postgres
Database Service: postgresql-13
Command Line Tools Installation Directory: /Library/PostgreSQL/13
pgAdmin4 Installation Directory: /Library/PostgreSQL/13/pgAdmin 4
Stack Builder Installation Directory: /Library/PostgreSQL/13
Trying to install pg (PostgreSQL)gem install pg -- --with-pg-config=/opt/local/lib/postgresql0.18.4/bin/pg_config
sudo PATH=$PATH:/Library/PostgreSQL/13.2/bin gem install pg
export CONFIGURE_ARGS="with-pg-include=/Library/PostgreSQL/13/include/"
2021-020-20 5:15PM removed from ~/.zshrc
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
2021-02-20 5:59PM TO DO: remove the script calls in the following files:
X• ~/.bashrc
X• ~/.bash_profile
X• ~/.profile