This file contains hidden or 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 python3 | |
# Install mitmdump & mitmproxy with `brew install mitmproxy` | |
# run with: mitmdump -s mitm-error.py | |
# fire requests: curl --proxy localhost:8080 https://test.example.com/test | |
# set up your system proxy or configure your browser to use the proxy localhost:8080 | |
import sys | |
import re | |
import json | |
from mitmproxy import http, proxy, options |
This file contains hidden or 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
# Copy this file and run mitmproxy like this:: | |
# | |
# mitmproxy -s mitmproxy-quicker.py --mode reverse:http://dummy.invalid | |
# | |
# Then edit the code below. For example, | |
# http://localhost:8080/index.html will serve the HTML page defined below. | |
# mitmproxy will automatically reload the script whenever you save it to disk. | |
# You can specify a real fallback upstream instead of ``dummy.invalid``, | |
# or remove the ``--mode`` option altogether for a regular (forward) proxy. | |
# |
This file contains hidden or 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
// Use OpenGL 3.0+, but don't use GLU | |
#define GLFW_INCLUDE_GL3 | |
#define GLFW_NO_GLU | |
#include <GL/glfw.h> | |
#include <glm/glm.hpp> | |
#include <glm/gtc/matrix_transform.hpp> | |
#include <glm/gtc/type_ptr.hpp> | |
extern "C" { |