Skip to content

Instantly share code, notes, and snippets.

View neuberoliveira's full-sized avatar
🐞
deploying new bugs to fix them latter

Neuber Oliveira neuberoliveira

🐞
deploying new bugs to fix them latter
View GitHub Profile
@neuberoliveira
neuberoliveira / escopo-pm-delivery.md
Last active May 5, 2020 14:51
Primeira Mesa - Delivery

Ambiente

Sem muitas exigencias, somente Docker com docker-compose ja resolve

Padrao de resposta

tudo retorna http 200, nao é restfull ainda, temos um padrao de resposta que dever ser seguido para facilitar a o gerenciamento no front, seja app, site ou painel

Login

Para nao ter mais um painel, tanto para parceiro quanto para os restaurantes, vamos usar algo no sentido de um login mais unificado, ja temos algo nesse sentido, ainda rudimentar.

Ate por que muito provavelmente sera preciso consumir mais da nosssa api restrita a parceiros

@neuberoliveira
neuberoliveira / random-emoji
Created February 18, 2019 14:38
Random GitMoji
#!/usr/bin/python
import sys
from random import randint
emojiList = [
":art:",
":zap:",
":fire:",
":bug:",
":ambulance:",
@neuberoliveira
neuberoliveira / random-name.py
Created January 2, 2018 20:50
Generate random name using the behindthename.com/random
#!/usr/bin/python
import urllib
import re
from HTMLParser import HTMLParser
url = 'https://www.behindthename.com/random/random.php?number=2&gender=both&surname=&norare=yes&nodiminutives=yes&all=no&usage_ara=1&usage_arm=1&usage_bre=1&usage_eng=1&usage_fre=1&usage_fri=1&usage_ger=1&usage_ita=1&usage_por=1&usage_sco=1&usage_grem=1&usage_romm=1&usage_grea=1&usage_roma=1'
class MyHTMLParser(HTMLParser):
found_container = False
@neuberoliveira
neuberoliveira / generate-keyhash
Created November 29, 2017 17:21
Generate keyhashfor android app based on your keystore file
#!/bin/bash
if [ ! $1 ]; then
echo 'Keystore file is required'
exit
fi
if [ ! $2 ]; then
echo 'Alias is required'
exit
#!/usr/bin/env python
import os
import re
import random
import subprocess
def generateSalt(size):
ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
chars=[]
@neuberoliveira
neuberoliveira / ImagePickerService.js
Last active July 22, 2016 18:01
Image Picker Service for Ionic. Depends of plugins: camera, imagePicker
//plugin dependency: https://github.com/wymsee/cordova-imagePicker.git
angular.module('starter.services')
.factory('ImagePicker', function($rootScope, $cordovaImagePicker, $cordovaCamera, $ionicActionSheet, $q){
var options = {
maximumImagesCount:1,
width: 1200,
height: 0,
quality: 90,
};
@neuberoliveira
neuberoliveira / LocalStorageService.js
Last active July 22, 2016 18:03
Local Storage Service for Ionic
angular.module('starter.services')
.factory('LocalStorage', ['$window', function($window) {
return {
set: function(key, value) {
$window.localStorage[key] = value;
},
get: function(key, defaultValue) {
return $window.localStorage[key] || defaultValue;
},
@neuberoliveira
neuberoliveira / ApiRequestService.js
Created July 22, 2016 17:11
Request Servicefor Ionic
angular.module('starter.services')
.factory('ApiRequest', function($rootScope, $http, $q, $ionicLoading, $ionicPopup, $cordovaFile, $cordovaFileTransfer){
var ApiRequest = function(){
var METHOD_GET = 'GET';
var METHOD_POST = 'POST';
var self = this;
var baseUrl = $rootScope.BASE_HOST_API;
var action = '';