Skip to content

Instantly share code, notes, and snippets.

@piscolomo
piscolomo / circle.yml
Created June 2, 2016 16:04 — forked from nafu/circle.yml
CircleCIでherokuのprebootの設定を自動で行う ref: http://qiita.com/nafu/items/4c480934871bbdfb56e9
deployment:
production:
branch: master
commands:
- NEED_MAINTENANCE_MODE=`./script/circleci.sh`; if [ $NEED_MAINTENANCE_MODE -eq 1 ]; then heroku features:disable preboot --app production; else heroku features:enable preboot --app production; fi
- NEED_MAINTENANCE_MODE=`./script/circleci.sh`; if [ $NEED_MAINTENANCE_MODE -eq 1 ]; then heroku maintenance:on --app production; fi
- NEED_MAINTENANCE_MODE=`./script/circleci.sh`; if [ $NEED_MAINTENANCE_MODE -eq 1 ]; then heroku scale worker=0 --app production; fi
- git push -f [email protected]:production.git $CIRCLE_SHA1:refs/heads/master
- NEED_MAINTENANCE_MODE=`./script/circleci.sh`; if [ $NEED_MAINTENANCE_MODE -eq 1 ]; then heroku run 'rake db:migrate' --app production; fi
- heroku run 'rake db:seed' --app production
@piscolomo
piscolomo / unescapeHtml.js
Created January 19, 2016 21:22
Angular filter for unescapeHtml
appModule.filter('unescapeHtml', function(){
var entityMap = {
'&': "&",
'&lt;': "<",
'&gt;': ">",
'&quot;': '"',
'&#39;': "'",
'&#x2F;': "/",
};