GraphQL Endpoint - https://<store domain>/api/graphql/
Use the GraphiQL browser client to write, validate, and test your GraphQL queries.
Returns current user account information.
import os | |
import json | |
import pathlib | |
directory = "./" | |
locale_file = "./locales/en.default.json" | |
def search_html_files(directory, search_string): | |
result = False | |
for root, dirs, files in os.walk(directory): |
server { | |
# ... | |
location ~ \.(asp|aspx|axd|asx|asmx|ashx|cfm|jsp|jspx|do|action|pl|php|php3|php4|phtml|py|rb|rhtml|ini|stm|net|env|cgi|dll|fcgi|conf)$ { | |
return 410; | |
} | |
# ... | |
import datetime | |
from dateutil.relativedelta import relativedelta | |
def today(date=None,iso=False): | |
if date is None: date=datetime.date.today() | |
if iso: return date.isoformat() | |
else: return date | |
def yesterday(date=None,iso=False): | |
if date is None: date=today() |
{ | |
"count": 43, | |
"next": "https://app.calltracker.io/api/calls/?limit=100&offset=100", | |
"previous": null, | |
"results": [ | |
{ | |
"id": 48155, | |
"timestamp": "2018-07-25T19:41:12.786731Z", | |
"status": "answered", | |
"company_id": 1000, |
// grab our env variables for access | |
var domain = pm.environment.get("domain"); | |
var username = pm.environment.get('username'); | |
var password = pm.environment.get('password'); | |
// Send request to get token and set as env variabled {{authorization}} | |
pm.sendRequest({ | |
url: domain + '/api/token', | |
method: 'POST', | |
header: { |
from django.db import connection | |
sqltime = 0 | |
for query in connection.queries: | |
sqltime += float(query["time"]) | |
print('Page render: ' + str(sqltime) + 'sec for ' + str(len(connection.queries)) + 'queries') |
#!/bin/bash | |
# | |
# Litecoin CPU Mining setup on Ubuntu Server | |
# | |
sudo apt-get update; | |
# install prerequisit software/libs | |
sudo apt-get -y install make automake build-essential libcurl4-openssl-dev htop |
class ModelDiffMixin(object): | |
""" | |
Ref: https://stackoverflow.com/questions/1355150/django-when-saving-how-can-you-check-if-a-field-has-changed | |
""" | |
def __init__(self, *args, **kwargs): | |
super(ModelDiffMixin, self).__init__(*args, **kwargs) | |
self.__initial = self._dict | |
@property | |
def _dict(self): |
--- | |
version: '2' | |
services: | |
nginx: | |
image: "#####.dkr.ecr.us-east-1.amazonaws.com/nginx:latest" | |
cpu_shares: 50 | |
mem_limit: 104857600 | |
logging: | |
driver: awslogs | |
options: |