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 / 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
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
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>
@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
@brunojppb
brunojppb / git_e_rails.md
Last active May 22, 2024 18:37
configurando o git e o Rails no ubuntu

Instalar o git:

sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev

Instalar o rbenv:

git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
@brunojppb
brunojppb / django_migration_commands.md
Created December 5, 2018 09:06
django migration commands using docker compose

Generate Migrations

# django = cocker compose service name
$ docker-compose exec -u $UID django ./manage.py makemigrations

Migrate DB

docker-compose exec -u $UID django ./manage.py migrate 
@brunojppb
brunojppb / change_apple_screenshot_format.md
Created February 6, 2019 21:27
change apple screenshot default file format

To change apple screenshot saving format, just enter this command in the terminal

defaults write com.apple.screencapture type [exntension]

where extension is the target extension you want to save. Like jpg, png, pdf, etc...

Privacy Policy

Bruno Paulino built the Card Vault app as a Commercial app. This SERVICE is provided by Bruno Paulino and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Card Vault unless otherwise defined in this Privacy Policy.

@brunojppb
brunojppb / fontastic_sizer.js
Created February 25, 2019 12:17
Show select input to change icon font-size for preview in Fontastic generated HTM
/** Show select input to change icon font-size for preview in Fontastic generated HTML (http://app.fontastic.me) */
const xpath = "//h2[text()='CSS mapping']";
const mainHeader = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
const fontSizes = [16, 24, 32, 64, 128, 256];
const selectList = document.createElement('select');
selectList.id = "font-size-select";
fontSizes.forEach(size => {
const option = document.createElement('option');
@brunojppb
brunojppb / backup_redmine.sh
Last active April 3, 2019 20:26
Backup Redmine script
# Backup redmine script
# see https://www.redmine.org/projects/redmine/wiki/RedmineBackupRestore
# Check redmine path
ps fax | grep redmine
# Dump mysql data
/usr/bin/mysqldump -u <USERNAME> -p<PASSWORD> -h <HOSTNAME> <DATABASE> > /var/data/redmine/backups/redmine-db-"`date +"%Y-%m-%d"`".sql
# TODO: Dump binary data (attachments)