Skip to content

Instantly share code, notes, and snippets.

View brunojppb's full-sized avatar
🌱
code gardening...

Bruno Paulino brunojppb

🌱
code gardening...
View GitHub Profile
@brunojppb
brunojppb / branch_check.sh
Created September 20, 2018 18:06
check if master branch is currently set for deployment. fail otherwise.
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
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>
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
@brunojppb
brunojppb / teamcity_2018_ubuntu_setup.md
Last active September 10, 2021 07:49
Setup TeamCity 2018 on Ubuntu

Setting up TeamCity 2018 on Ubuntu

Install Java 8

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
@brunojppb
brunojppb / sbt_clean_project.sh
Created March 21, 2018 22:10
Clean SBT target cache
find . -regex ".*/target" -exec rm -r {} +
@brunojppb
brunojppb / slick_debug.md
Created February 9, 2018 15:48
How to debug slick generated SQL

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

@brunojppb
brunojppb / markdown.md
Created October 7, 2017 10:14 — forked from jonschlinkert/markdown-cheatsheet.md
A better markdown cheatsheet. I used Bootstrap's Base CSS documentation as a reference.

Typography

Headings

Headings from h1 through h6 are constructed with a # for each level:

# h1 Heading
## h2 Heading
### h3 Heading
@brunojppb
brunojppb / deploy.sh
Last active September 18, 2017 08:52 — forked from gre/deploy.sh
Super-small scripts for easy PlayFramework deployment
#!/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";
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 {

ContraChequeAPI

REST API para leitura de contracheques do estado da Paraíba.

Rotas

Login
POST  https://contrachequepb.herokuapp.com/api/contracheques/login