Skip to content

Instantly share code, notes, and snippets.

View april's full-sized avatar
🔒
making the web safer

April King april

🔒
making the web safer
View GitHub Profile
Traceback (most recent call last):
File "/Users/april/Source/misbehaving.site/env/lib/python3.6/site-packages/flask/app.py", line 1997, in __call__
return self.wsgi_app(environ, start_response)
File "/Users/april/Source/misbehaving.site/env/lib/python3.6/site-packages/whitenoise/base.py", line 66, in __call__
return self.application(environ, start_response)
File "/Users/april/Source/misbehaving.site/env/lib/python3.6/site-packages/flask/app.py", line 1989, in wsgi_app
return response(environ, start_response)
File "/Users/april/Source/misbehaving.site/env/lib/python3.6/site-packages/werkzeug/wrappers.py", line 1277, in __call__
start_response(status, headers)
TypeError: unable to add header to the response
@april
april / gist:1a6f6f88d6054d93bdc05802d3ad72fb
Last active September 19, 2017 15:38
Modern Cube Cards, Never Cast or Cast Only Once
Number Never Cast: 60
Number Cast Only Once: 40
Cards Never Cast:
White (6)
---------
Odric, Lunarch Marshal
Linvala, the Preserver
Disenchant
@april
april / example.html
Last active October 5, 2017 20:53
strict-dynamic
Note that instead of using a unique nonce on each page load, you could instead
have the sha256 hash of the contents of that inline script and be completely static.
> Content-Security-Policy: script-src 'strict-dynamic' 'nonce-abcdef123467890' 'unsafe-inline' https:
<html>
<head>
<title>Hello World</title>
</head>
<body>
<meta name="referrer" content="origin" />
<meta name="referrer" content="no-referrer" />
+0/+1
+0/+2
+1/+0
+1/+1
+1/+2
+2/+0
+2/+2
-0/-1
-0/-2
-1/-0
server {
listen 58080;
# Disable the port number in redirects, since it's behind a load balancer
port_in_redirect off;
location / {
if ($http_x_forwarded_proto != 'https') {
return 301 https://$host$request_uri;
}
{
"state": "secure",
"cipherSuite": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"keaGroupName": "none",
"signatureSchemeName": "RSA-PKCS1-SHA512",
"isDomainMismatch": false,
"isExtendedValidation": false,
"isNotValidAtThisTime": false,
"isUntrusted": false,
"certificateTransparencyStatus": "not_applicable",
ERROR in ./src/background_scripts/httpObservatory.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /Users/april/Source/security-report-card/src/background_scripts/httpObservatory.js: Unexpected token (45:17)
43 | 'bar': 'baz'
44 | };
> 45 | const foobar = ...foo;
@april
april / gist:b4f4db5ac7cb1c36d4d5840679d483b3
Created April 4, 2019 20:38
All the crazy X-Frame-Options of the world. :)
"''
*, *, *
*
\""
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@april
april / arena-macos-full-screen-fixes.sh
Last active June 23, 2025 07:28
Fixes Magic Arena's broken full screen implementation on macOS
#!/bin/bash
# this forces Arena into full screen mode on startup, set back to 3 to reset
# note that if you go into the Arena "Graphics" preference panel, it will reset all of these
# and you will need to run these commands again
defaults write com.wizards.mtga "Screenmanager Fullscreen mode" -integer 0
defaults write com.wizards.mtga "Screenmanager Resolution Use Native" -integer 0
# you can also replace the long complicated integer bit with any other scaled 16:9
# resolution your system supports.