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
@intent("API wrapper method to send a single message to a single slack channel") | |
@allowed_users(roles=[roles.ADMIN, roles.END_USER]) | |
@data_protection(possible_pii="attr:message") | |
@side_effects(has_side_effect=side_effects.EXTERNAL_API) | |
@memory(should_use_kb=10) | |
@speed(should_run_in_ms=1000) | |
@tests([post_message_to_slack_ultra_large_message_should_fail, post_message_to_slack_should_succeed]) | |
def post_message_to_slack(channel: SlackChannel, message: SlackMessage): | |
requests.post("https://api.slack.com", message) |
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
for i in $(seq 10); do uuid v1; sleep 1; done | |
cfb84790-2dd7-11e9-bf24-d7119ae2d1f1 | |
d05b6560-2dd7-11e9-b1ec-7741959a2db9 | |
d0fc8760-2dd7-11e9-a109-a559ffed0b17 | |
d19ebad0-2dd7-11e9-826c-91dfdee76140 | |
d2411550-2dd7-11e9-80b6-8918b1061e5e | |
d2e348c0-2dd7-11e9-9611-1782751eac1c | |
d385a340-2dd7-11e9-b240-5d8c2d636711 | |
d42872f0-2dd7-11e9-a307-f581cc850936 | |
d4cbdee0-2dd7-11e9-b1d8-9d336aace739 |
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
#!/bin/bash | |
set -e | |
# Use this script instead of m2ee directly | |
# | |
# It will dynamically create a sensitive configuration file in RAM which | |
# will be used by m2ee and will be removed directly afterwards | |
# Preparation: remove sensitive parts from the m2ee.yaml file and store them somewhere safely | |
# such as in HashiCorp Vault or an encrypted gpg file. You can keep the rest of the m2ee.yaml |
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
#!/usr/bin/env python2 | |
import os | |
import uuid | |
import subprocess | |
bucket = os.getenv('S3_BUCKET') | |
access_key = os.getenv('S3_ACCESS_KEY') | |
secret_key = os.getenv('S3_SECRET_KEY') | |
region = "eu-west-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
package main | |
import "crypto/sha1" | |
import "crypto/x509" | |
import "fmt" | |
import "encoding/pem" | |
import "os" | |
import "time" | |
import "bufio" | |
import "strings" |
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
package main | |
import "crypto/tls" | |
import "crypto/sha1" | |
import "crypto/x509" | |
import "fmt" | |
import "encoding/pem" | |
import "os" | |
import "time" | |
import "bufio" |
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
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="/error_page/style.css"> | |
<script src="/error_page/script.js"></script> | |
</head> | |
<body> | |
This application is currently offline. | |
</body> | |
</html> |
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
{ | |
"status": 0, | |
"result": | |
{ | |
"session_token": "87a33786-c041-456a-a2c6-d5ef1663dfd3", | |
"runtime_version": "4.3.0", | |
"project_id": "12345678-90ab-cdef-1234-567890abcdef", | |
"paused_microflows": | |
[ | |
{ |
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
{ | |
"action": "start_session", | |
"params": { | |
"breakpoints": [ | |
{ | |
"microflow_name": "...", | |
"object_id": "...", | |
"condition": "..." | |
}, ... | |
] |
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
Map<String,SortDirection> filteredMap = Maps.newHashMap(); | |
for(Entry<String,SortDirection> entry : sort.entrySet()) | |
{ | |
AttributePath attributePath = parsePath(entityName, entry.getKey()); | |
if(!attributePath.getAttribute().isVirtual()) | |
filteredMap.put(entry.getKey(), entry.getValue()); | |
} |
NewerOlder