Skip to content

Instantly share code, notes, and snippets.

View rscardinho's full-sized avatar

Reynaldo Scardinho rscardinho

  • 87Labs
  • São Paulo/SP
View GitHub Profile
@rscardinho
rscardinho / download-db-from-heroku.md
Created March 13, 2019 20:02
download-db-from-heroku.md

heroku pg:backups capture -a event-service-production

curl -o event_service_production.sqlc (heroku pg:backups public-url -a event-service-production)

rake db:drop db:create

WINDOWS (WLS)

pg_restore --verbose --clean --no-acl --no-owner -h 127.0.0.1 -d event_service_development -U postgres event_service_production.sqlc

@rscardinho
rscardinho / reference.js
Created April 16, 2019 16:00
alphabetical-sort-reference
function sort() {
var sortableList = $('.sortable-category');
var listitems = $('.draggable-category', sortableList);
listitems.sort(function (a, b) {
return ($(a).text().toUpperCase() > $(b).text().toUpperCase()) ? 1 : -1;
});
sortableList.append(listitems);
}
@rscardinho
rscardinho / strucuture.yml
Created April 25, 2019 13:41
item catalog details
catalog: Name of the item catalog
custom_title: Catalog name that will be displayed in the UI if present
position: position of the catalog in the list
Categories:
category1: Name of the category
above_the_line: 1 for line items above the and 0 for below. this setting will be applyed to all line items inside the category
line_items: list of all line item names. they will be displayed in the UI in the same order as they are here
@rscardinho
rscardinho / casting.yml
Created April 25, 2019 13:44
catalog example
casting:
custom_title: Casting Catalog
position: 11
Categories:
Talent:
above_the_line: 0
line_items: ['talent1', 'talent2']