Skip to content

Instantly share code, notes, and snippets.

View belek's full-sized avatar
🤘
do more, work harder

Belek belek

🤘
do more, work harder
View GitHub Profile
@belek
belek / gist:bb7f9bd43756982fe77e9db68ec4f5bf
Created September 19, 2018 05:28
car registration log 2
pmt-pkz-stub : {"pan"=>"12345678", "expiryMonth"=>"01", "expiryYear"=>"2024", "cardHolder"=>"belek", "cardSecurityCode"=>"123", "cardHolderPhone"=>"", "checkData"=>"", "tranGUID"=>"c429c190-69fc-4441-8876-6fd09425d287", "javascriptSupport"=>"true", "firstRequest"=>"false", "return_url"=>"http://localhost:8004/bank_cards/finish_registration?document_id=4", "customer_ref"=>"768667434604", "amount"=>"51000", "tempTotalAmount"=>"", "customMerchant"=>"TENG"}
pmt-pkz-stub : [DEBUG 2018-09-19 11:28:15] (PKZ_STUB): Get transaction with attrs: {:customer_ref=>"768667434604", :status=>"PENDING_CUSTOMER_INPUT"}
pmt-pkz-stub : [DEBUG 2018-09-19 11:28:15] (PKZ_STUB): Update {:customer_ref=>"768667434604", :status=>"PENDING_CUSTOMER_INPUT", :id=>"9"} with attrs: {:status=>"AUTHORISED"}
prt-rails : Started GET "/bank_cards/finish_registration?document_id=4&userId=eyJjYXJkX2hvbGRlciI6ImJlbGVrIiwiY2FyZF9udW1iZXIiOiIxMjM0NTY3OCJ9cardId=eyJudW1iZXIiOiIxMjM0NTY3OCIsImFtb3VudCI6IjUxMDAwIiwic3RhdHVzIjoiUkVHSVNURVJFRCJ9" for 127.0.
@belek
belek / resp.json
Created September 7, 2017 10:37
Пример ответа зон доплат
{
"zones": [
{
"cost": "50.00",
"geom": {
"type": "Polygon",
"coordinates": [
[
[
74.70544874668121,
@belek
belek / storage.py
Created February 23, 2017 20:01
django_minio post: Connection
def connection(self):
if self._connection is None:
try:
self._connection = Minio(
self.server, self.access_key, self.secret_key, self.secure)
except InvalidEndpointError:
self._connection = None
return self._connection
@belek
belek / storage.py
Last active March 6, 2017 16:03
django_minio post: Define custom Storage class
from django.core.files.storage import Storage
class MinioStorage(Storage):
server = 'play.minio.io:9000'
access_key = 'Q3AM3UQ867SPQQA43P2F'
secret_key = 'zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG'
bucket = 'mybucket'
secure = True
package main
import (
"log"
"net/http"
"net/url"
"fmt"
"golang.org/x/net/html"
"io/ioutil"
)