- Github
- Heroku
- Local
cd ..; mv keezy-api keezy-web; cd keezy-web
git remote set-url staging [email protected]:keezy-web-staging.git
git remote set-url production [email protected]:keezy-web-production.git
psql template1 -c 'ALTER USER "keezy-api" RENAME TO "keezy-web"';
psql template1 -c 'ALTER DATABASE "keezy-api_development" RENAME TO "keezy-web_development"';
psql template1 -c 'ALTER DATABASE "keezy-api_test" RENAME TO "keezy-web_test"';
cat lines |sort -n -k1,1
In config/development.rb
:
config.consider_all_requests_local = false
::-webkit-scrollbar {
width: 8px;
}
::-webkit-scrollbar-track {
background: none;
}
::-webkit-scrollbar-thumb {
background: rgb(106, 107, 108);
}
.tree-view {
font-size: 12px;
}
.editor {
line-height: 1.6;
}
.editor .cursor {
line-height: 1.6;
}
.preview-pane .results-view .preview {
font-family: Inconsolata-dz;
font-size: 13px;
}
#!/bin/bash
for man in 1 3 5 7; do
ln -sf /usr/local/lib/node_modules/npm/man/man${man}/* /usr/local/share/man/man${man}
done
ln -sf /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
npm update npm -g
#!/bin/sh
(( ${#} > 0 )) || {
sudo ${0} sudo
exit $?
}
[ -e /var/db/receipts/org.nodejs.pkg.bom ] || {
echo 'Nothing to do.'
exit 0
}
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom \
| while read i; do
rm /usr/local/${i}
done
rm -rf /usr/local/lib/node \
/usr/local/lib/node_modules \
/var/db/receipts/org.nodejs.*
exit 0
- Match the beginning of a string:
\A
- Match the beginning of a line:
^
- Match the end of a line:
$
- Match the end of a string:
\Z
- Prefer the current branch's file:
git checkout --ours file
- Prefer the other branch's file:
git checkout --ours file
- Revert to the conflicted merge file provided by rebase:
git checkout --conflict=merge file
With git you have the opportunity to do it the way it should have originally been done, after the fact. There is still work to do with the merge, but it is work that would have been needed to be done along the way anyhow. The cost isn't over-paid, it's just paid late.
- Revert to the last commit on master where all branches diverged
- Merge the most-divergent feature branch onto master
- For each other branch, rebase it onto master and merge it into master
Configure a default remote for the heroku
command per git repository:
git config heroku.remote heroku-remote-name
This is a limited problem and occurs when a large number of files change.
The Herkou deploy script runs rake assets:precompile
to precompile files indicated in config.assets.precompile
.
These files are included in the Heroku slug and copied to the dyno /app/public/assets/
directory.
The dyno filesystem keeps the 3 most-recent versions of each file on disk.
Only new and changed files are compiled and copied, so the time required is typically low but occasionally more.
find . -type f |grep -vE "\.(js|css|html)$"
v
negates the matchE
uses a regex
- Sprockets known issue, won't fix: sstephenson/sprockets#347
- Workaround with Heroku step 2 only: https://gist.github.com/afeld/5704079
config.assets.precompile
defaults to all.js
and.css
files- Verify this will get all the files we need (this is what I actually incrementally used to review the list of files):
find . -type f |grep -vE "\.(js|css|html|css|html|erb|haml|png|gif|jpg|jpeg|svg|eot|otf|svc|woff|ttf|coffee|yml|md|ico|ai|eps|pdf|map|ts|map|sh|txt|rb|gemspec|php)$" |grep -vE "(README|gitignore|bower.json|LICENSE|Makefile|Rakefile|MANIFEST)"
That's a whole lotta grep right there.
$ find . -type f | grep -E ".(js|html)$"