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
Feature: Real-time websocket streaming # features/streamer.feature:1 | |
Scenario: Receiving recently-created annotations over the websocket # features/streamer.feature:2 | |
Given I am acting as the test user "smokey" # features/steps/api.py:44 | |
And I am listening for notifications on the websocket # features/steps/websocket.py:75 | |
client >> Frame(fin=True, opcode=1, data=b'{"messageType": "client_id", "value": "c9c9cf10-7f4e-433a-9817-934ac8db6670"}') | |
2017-05-16 17:44:23 [DEBUG] client >> Frame(fin=True, opcode=1, data=b'{"messageType": "client_id", "value": "c9c9cf10-7f4e-433a-9817-934ac8db6670"}') | |
client >> Frame(fin=True, opcode=1, data=b'{"filter": {"clauses": [], "actions": {"create": true, "update": true, "delete": true}, "match_policy": "include_all"}}') | |
2017-05-16 17:44:23 [DEBUG] client >> Frame(fin=True, opcode=1, data=b'{"filter": {"clauses": [], "actions": {"create": true, "update": true, "delete": true}, "match_policy": "include_all"}}') | |
When I create a |
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
diff --git a/wp-config.php b/wp-config.php | |
index 08cac9b0..cc45af6c 100755 | |
--- a/wp-config.php | |
+++ b/wp-config.php | |
@@ -104,13 +104,10 @@ else: | |
$secretsPath = 'wp-content/uploads/private/secrets.ini'; | |
$secrets = file_exists($secretsPath) ? parse_ini_file($secretsPath) : false; | |
- if ( in_array( $_ENV['PANTHEON_ENVIRONMENT'], array( 'live' ) ) && $secrets ) { | |
- define( 'DBI_AWS_ACCESS_KEY_ID', $secrets['dbi_aws_access_key_id'] ); |
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
id = sa.Column(types.URLSafeUUID, server_default=sa.func.uuid_generate_v1mc(), primary_key=True) | |
references = sa.Column(pg.ARRAY(types.URLSafeUUID, zero_indexes=True)) | |
thread_root_id = column_property(references[0]) | |
thread_root = sa.orm.relationship('Annotation', primaryjoin=remote(id) == foreign(thread_root_id), uselist=False) |
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 flask import Flask | |
from flask import make_response, render_template | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
resp = make_response(render_template('index.html')) | |
resp.headers['Content-Security-Policy'] = ("default-src 'none'; " |
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
diff --git a/Makefile b/Makefile | |
index a0e4750..cfdb2c6 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -5,6 +5,11 @@ ESLINT := node_modules/.bin/eslint | |
EXORCIST := node_modules/.bin/exorcist | |
MUSTACHE := node_modules/.bin/mustache | |
+CLIENT_ENTRYPOINT := $(shell node -p 'require.resolve("hypothesis")' 2>/dev/null) | |
+ifndef CLIENT_ENTRYPOINT |
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/sh | |
set -eu | |
if [ "$#" -lt "2" ]; then | |
echo >&2 "Usage: h-ssh <ENV> <APP> [SSH_ARGS]" | |
exit 1 | |
fi | |
ENV=$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
<!doctype html> | |
<p> | |
Ihr naht euch wieder, schwankende Gestalten. Die früh sich einst dem trüben | |
Blick gezeigt? Versuch’ ich wohl euch diesmal fest zu halten! Fühl’ ich | |
mein Herz noch jenem Wahn geneigt. Ihr drängt euch zu! | |
</p> | |
<p> | |
Lorem ipsum dolor sit amet, consectetuer adipiscing elit! Aenean commodo ligula |
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 multiprocessing | |
import time | |
def generate(queue, close): | |
queue.put_nowait('x' * 65523) | |
close.wait() | |
def main(): |
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 locale | |
import os | |
import time | |
import psycopg2 | |
import requests | |
DATABASE_URL = os.environ['DATABASE_URL'] | |
WEBHOOK_URL = os.environ['WEBHOOK_URL'] |
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
Just some text which includes <h1>HTML tags</h1> for testing. | |
What about this one <script>alert('XSS!');</script> then? |