dropdb gemini_development
createdb gemini_development
If getting farts about environment var not being set
bundle exec rails db:environment:set RAILS_ENV=test
export RAILS_ENV=test
Gemini & where db:structure is involved
RAILS_ENV=test bundle exec rake db:drop db:create db:structure:load db:migrate db:seed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/MacOS | |
VBoxManage modifyhd --resize 100000 ~/VirtualBox\ VMs/CMIT\ Environment/MartyDemo.vdi | |
# Then install the parted ISO & run VM & repartition |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VIEW DIAGS | |
diag?op=health | |
diag?op=<smaller> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#STOP NGINX | |
systemctl stop nghttpx.service # halt service | |
systemctl disable nghttpx.service # disable on startup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT sqltext.TEXT, | |
req.session_id, | |
req.status, | |
req.command, | |
req.cpu_time, | |
req.total_elapsed_time | |
FROM sys.dm_exec_requests req | |
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias xxcomp='find . | grep ".*\.rb$" | xargs -L 1 ruby -c | grep -v "Syntax OK"'s | |
alias xxfocus='bundle exec rspec --tag focus --format documentation' | |
alias xxrc='git diff-tree -r --no-commit-id --name-only @\{u\} | xargs bundle exec rubocop -a' | |
alias xxdbreset='RAILS_ENV=test bundle exec db:drop db:create db:structure:load db:migrate' | |
# rake | |
alias dbms='bundle exec rake db:migrate:status' | |
alias be='bundle exec' | |
alias datav0='bundle exec rake data:migrate VERSION=0' | |
function dbdown() { bundle exec rake db:migrate:down VERSION=$1; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo systemctl restart postgresql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su - | |
su postgres | |
psql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout origin/master db/structure.sql | |
git checkout origin/master spec/lib/gemini/tie_20*/dump.psql | |
RAILS_ENV=test be rake db:drop db:create db:structure:load db:migrate | |
RAILS_ENV=test be rake gemini:update_dump_files | |
git checkout origin/master db/structure.sql | |
RAILS_ENV=test be rake db:drop db:create db:structure:load db:migrate | |
git status | |
git add db/structure.sql | |
git add spec/lib/gemini/tie_20*/dump.psql | |
git commit -m "regen structure and dumps" |
OlderNewer