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 / helpscout_webhook_play_framework.scala
Created October 11, 2019 11:50
Handling HelpScout webhooks in Play Framework and Scala
/**
* How to handle HelpScout webhooks using Play Framework & Scala (Without using the HelpScout library)
* See original docs: https://developer.helpscout.com/webhooks/
*/
/** On your controller.
* Map this function to a valid route
* and register your webhook using the HelpScout API
*/

To install pycurl on Mac:

brew cask install wkhtmltopdf
brew reinstall openssl
pip install pycurl==7.43.0.1 --install-option=--with-openssl --install-option=--openssl-dir=/usr/local/opt/openssl
pip install phonenumbers
@brunojppb
brunojppb / postgres-brew.md
Created August 15, 2019 06:50 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@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)
@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');

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 / 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...

@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 / git_e_rails.md
Last active January 25, 2024 00:15
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