Skip to content

Instantly share code, notes, and snippets.

View fellipeh's full-sized avatar
🏠
Working from home

Fellipe Henrique fellipeh

🏠
Working from home
View GitHub Profile
MyAppMobile.angular.service('ParametrosService', ['$rootScope', function ($rootScope) {
'use strict';
return {
parametros: {nome: '', valor: ''},
refresh: function() { $rootScope.$broadcast('refresh_parametros'); }
};
}]);
$scope.parametros = ParametrosService.parametros;
$scope.Titulo = $scope.parametros.nome;
console.log('FiltroPageCtrl');
console.log($scope.parametros);
$scope.goURL = function (v_url) {
$window.location.href = v_url;
};
MyAppMobile.angular.factory('FiltroService', ['$document', '$http', function ($document, $http) {
'use strict';
var destaques = {},
eventListeners = {
'produtoClicked': []
};
destaques.addEventListener = function (eventName, callback) {
eventListeners[eventName].push(callback);
MyAppMobile.angular.controller('FiltroPageController', ['$scope', '$http', '$window', 'InitService',
'ParametrosService', 'FiltroService',
function ($scope, $http, $window, InitService, ParametrosService, FiltroService) {
'use strict';
$scope.parametros = ParametrosService.parametros;
$scope.Titulo = $scope.parametros.nome;
MyAppMobile.angular.controller('CategoriaPageController', ['$scope', '$http', '$window', 'InitService',
'CategoriaListService', 'ParametrosService',
function ($scope, $http, $window, InitService, CategoriaListService, ParametrosService) {
'use strict';
$scope.goURL = function (v_url) {
ParametrosService.parametros.nome = 'params';
ParametrosService.parametros.valor = 'cat=' + v_url;
console.log(ParametrosService.parametros);
MyAppMobile.angular.factory('ParametrosService', ['$document', '$http', function ($document, $http) {
'use strict';
return {
parametros: {
nome: '',
valor: ''
}
};
import re
def merge_dicts(*dicts):
# http://stackoverflow.com/questions/7204805/dictionaries-of-dictionaries-merge
if not reduce(lambda x, y: isinstance(y, dict) and x, dicts, True):
raise TypeError("Object in *dicts not of type dict")
if len(dicts) < 2:
raise ValueError("Requires 2 or more dict objects")
#!/usr/bin/env bash
curl -X POST http://local.enota.com.br:8000/api/assinatura/iugu/retornoboleto/ --data "'data[id]': ['83A0C50B5A0A43AD8F60C1066B16A163'], 'data[status]': ['paid'], 'event': ['invoice.status_changed']"
@require_http_methods(['POST'])
@csrf_exempt
def get_iugu_retorno(request):
d1 = request.POST
d2 = d1.get('data[id]')
{% extends 'base/base.html' %}
{% load staticfiles %}
{% load i18n %}
{% load account %}
{% load url from future %}
{% load socialaccount %}
{% block conteudo %}
<div class="row">
<div class="col-md-4"></div>