Skip to content

Instantly share code, notes, and snippets.

import sys
class TestTriedToAccessNetwork(BaseException):
pass
if 'test' in sys.argv:
import socket
class PatchedSocket(socket.socket):
@stantonk
stantonk / 0_reuse_code.js
Created November 15, 2015 21:37
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@stantonk
stantonk / jdk_download.sh
Created June 3, 2017 06:42 — forked from P7h/jdk_download.sh
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@stantonk
stantonk / Dockerfile
Created June 12, 2019 19:00 — forked from calavera/Dockerfile
Dockerfile to build the Go version of Execsnoop and run it with JSON output format
FROM ubuntu:18.04
# Install BCC Tools
RUN set -ex; \
echo "deb [trusted=yes] http://repo.iovisor.org/apt/bionic bionic-nightly main" > /etc/apt/sources.list.d/iovisor.list; \
apt-get update -y; \
DEBIAN_FRONTEND=noninteractive apt-get install -y auditd bcc-tools curl gcc git libelf1 libbcc-examples;
# Install Go
ENV GO_SHA 1dfe664fa3d8ad714bbd15a36627992effd150ddabd7523931f077b3926d736d