View gist:2825008f0932c51b0d52e566a8ebc2fa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT array_agg(DISTINCT cis.active_cert_record.hash) AS hash, | |
array_agg(DISTINCT cis.active_cert_record.domain_name) AS domain_name, | |
array_agg(DISTINCT cis.active_cert_record.protocol_version) AS protocol_version, | |
cis.active_cert_record.subject_organization, | |
cis.active_cert_record.subject_organizational_unit, | |
cis.active_cert_record.subject_common_name, | |
cis.active_cert_record.signature | |
FROM cis.active_cert_record | |
WHERE CAST(md5(cis.active_cert_record.signature) AS UUID) = 'xxxxx-xxx-xxxx-xxxx' | |
AND cis.active_cert_record.protocol_version <> '{}' |
View credi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib, collections, hmac, hashlib, uuid, codecs | |
import urllib.parse | |
import urllib.request | |
#Payment url | |
PAYMENT_URL = 'https://migs.mastercard.com.au/vpcpay' | |
SECURE_SECRET = '5A7F9982DA5955FE2CAF9AB946C237EAXXX' | |
#Payment Data |
View xxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@classmethod | |
def post(self, request, *args, **kwargs): | |
from .serializers import HomePageSerializer | |
from experience.serializers import ExperienceTranslation, ExperienceTranslationPerformanceDetailDateSerializer | |
from event.serializers import EventTranslation, EventTranslationPerformanceDetailDateSerializer | |
if 'HTTP_ACCEPT_LANGUAGE' in request.META.keys() and \ | |
request.META.get('HTTP_ACCEPT_LANGUAGE') in \ | |
dict(settings.LANGUAGES).keys(): |
View asdasd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def GetRoomsExtra(solutions, hotel): | |
return [ dict(solution, **{'room_extra': Room.objects.get(code=solution['rooms_details'][0]['room_code'], level__identifier=hotel)}) for solution in solutions] |
View ...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$auth.authenticate(socialnetwork) | |
.then(function(response){ | |
if(response.status == 200){ | |
$auth.setToken(response.data.token) | |
loginAutentication(response) | |
} | |
}) | |
.catch(function(data){ | |
console.log(data) |
View route
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
angular.module('visitbh').config(routerConfig); | |
/** @ngInject */ | |
function routerConfig($stateProvider, $urlRouterProvider, $windowProvider) { | |
var $window = $windowProvider.$get(); | |
$stateProvider | |
.state('app', { |
View model.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Departament(models.Model): | |
name = models.CharField(max_length=100) | |
description = models.CharField(max_length=500, blank=True) | |
status = models.BooleanField(default=False, blank=True) | |
created_at = models.DateTimeField(auto_now_add=True, blank=True) | |
def __unicode__(self): | |
return self.name | |
class Area(models.Model): |
View Serializers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CardsUserField(serializers.RelatedField): | |
def to_representation(self, value): | |
data = CardsSerializer(value) | |
return data.data | |
def to_internal_value(sef,data): | |
return data | |
class Meta: |