$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
This file contains 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
if [ %teamcity.build.branch% = master ]; then exit 0; else echo "ERROR: you are trying to deploy %teamcity.build.branch% branch. Only master is allowed. If you are sure about that, disable this build step"; exit 1; fi |
This file contains 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
curl -X POST --data-urlencode "payload={\"channel\": \"#general\", \"username\": \"%teamcity.build.triggeredBy% (TeamCity)\", \"text\": \":rocket: New deployment sent to production servers. [%teamcity.build.branch%]\", \"icon_emoji\": \":rocket:\"}" https://hooks.slack.com/services/<YOUR_URL_HERE> |
This file contains 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
if [ %teamcity.build.branch% = master ]; then exit 0; else echo "WARNING! you are trying to deploy %teamcity.build.branch% branch. Only master is allowed. If you are sure about that, disable this build step"; exit 1; fi |
This file contains 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
find . -regex ".*/target" -exec rm -r {} + |
To show the generated SQL using slick ad Play framework:
add this line to application.conf
logger.scala.slick.jdbc.JdbcBackend.statement=DEBUG
Add those lines to logback.xml
This file contains 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
#!/bin/bash | |
REMOTE=play@SERVER_IP | |
REMOTE_APP=/home/play/PROJECT_NAME/ | |
sbt stage || exit 1; | |
rsync -va target/ $REMOTE:$REMOTE_APP/target; | |
ssh $REMOTE "cd $REMOTE_APP; ./stop.sh"; | |
ssh $REMOTE "cd $REMOTE_APP; ./start.sh"; |
This file contains 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
import UIKit | |
extension CGFloat { | |
/** Targeting the Photo Book API, converts pixels to points */ | |
var pixelToPoints: CGFloat { | |
let pointsPerInch: CGFloat = 72 | |
let scale: CGFloat = UIScreen.main.scale | |
let pixelPerInch: CGFloat | |
if UIDevice.current.userInterfaceIdiom == .pad { |