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
import time | |
import gdb | |
def deref_str(addr): | |
plong = gdb.lookup_type('char' ).pointer() | |
val = gdb.Value(addr).cast(plong) | |
return val.string('ascii') | |
class MyBreakpoint(gdb.Breakpoint): |
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
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.154.2/containers/python-3/.devcontainer/base.Dockerfile | |
# [Choice] Python version: 3, 3.9, 3.8, 3.7, 3.6 | |
ARG VARIANT="3" | |
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} | |
# [Option] Install Node.js | |
ARG INSTALL_NODE="true" | |
ARG NODE_VERSION="lts/*" | |
RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi |
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
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
labels: | |
k8s-app: metrics-server | |
name: metrics-server | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole |
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
from http.server import SimpleHTTPRequestHandler, HTTPServer | |
import json | |
class CustomHandler(SimpleHTTPRequestHandler): | |
def do_GET(self): | |
if self.path == '/': | |
self.send_response(200) | |
self.send_header('Content-type', 'text/html') | |
self.end_headers() | |
html_code = ''' |