There are two parts to networking within QEMU:
- The virtual network device that is provided to the guest (e.g. a PCI network card).
- The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).
from starlette.applications import Starlette | |
from starlette.responses import HTMLResponse | |
from starlette.websockets import WebSocket | |
from jinja2 import Template | |
import uvicorn | |
template = """\ | |
<!DOCTYPE HTML> | |
<html> |
Jenkinsfile VIM syntax highlighting | |
echo 'au BufNewFile,BufRead Jenkinsfile setf groovy' >> ~/.vimrc |
import BaseHTTPServer | |
import SimpleHTTPServer | |
import socket | |
class HTTPServer6(BaseHTTPServer.HTTPServer): | |
address_family = socket.AF_INET6 | |
if __name__ == '__main__': |
import json | |
import logging | |
from flask import Flask, g | |
from flask_oidc import OpenIDConnect | |
import requests | |
logging.basicConfig(level=logging.DEBUG) | |
app = Flask(__name__) |
# Splits video to separate scenes files | |
# Inspired by https://stackoverflow.com/a/38205105 | |
#!/bin/bash | |
file="" | |
out="./" | |
diff=0.4 | |
bitrate="512k" | |
trim=0 |
""" | |
Exports issues from a list of repositories to individual csv files. | |
Uses basic authentication (Github username + password) to retrieve issues | |
from a repository that username has access to. Supports Github API v3. | |
Forked from: unbracketed/export_repo_issues_to_csv.py | |
""" | |
import argparse | |
import csv | |
from getpass import getpass | |
import requests |
$ uname -r
# Want to run your Flask tests with CSRF protections turned on, to make sure | |
# that CSRF works properly in production as well? Here's an excellent way | |
# to do it! | |
# First some imports. I'm assuming you're using Flask-WTF for CSRF protection. | |
import flask | |
from flask.testing import FlaskClient as BaseFlaskClient | |
from flask_wtf.csrf import generate_csrf | |
# Flask's assumptions about an incoming request don't quite match up with |