This file contains 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
2019-04-30 20:35:04.933+0000 WARN [io.netty.channel.AbstractChannelHandlerContext] An exception 'java.lang.OutOfMemoryError: Java heap space' [enable DEBUG level for full stacktrace] was thrown by a user handler's exceptionCaught() method while handling the following exception: | |
2019-04-30 20:35:04.933+0000 WARN [io.netty.channel.AbstractChannelHandlerContext] An exception 'java.lang.OutOfMemoryError: Java heap space' [enable DEBUG level for full stacktrace] was thrown by a user handler's exceptionCaught() method while handling the following exception: | |
2019-04-30 20:35:04.935+0000 ERROR [o.n.b.r.DefaultBoltConnection] Unable to close pack output of bolt session 'bolt-181'. | |
java.lang.NullPointerException | |
at org.neo4j.bolt.v1.transport.ChunkedOutput.close(ChunkedOutput.java:231) | |
at org.neo4j.bolt.runtime.DefaultBoltConnection.close(DefaultBoltConnection.java:313) | |
at org.neo4j.bolt.runtime.DefaultBoltConnection.processNextBatch(DefaultBoltConnection.java:242) | |
at org.neo4j.bolt.runt |
This file contains 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
function faz() { | |
az account set --subscription $(az account list -o table | fzf | cut -c '62-98') | |
az account show | |
} |
This file contains 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
##TCP FLAGS## | |
Unskilled Attackers Pester Real Security Folks | |
============================================== | |
TCPDUMP FLAGS | |
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere) | |
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere) | |
Pester = PSH = [P] (Push Data) | |
Real = RST = [R] (Reset Connection) | |
Security = SYN = [S] (Start Connection) |
This file contains 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
#!/bin/bash | |
join -a 1 -1 1 -2 2 \ | |
<(kubectl top node | sed -e 's/NAME/NODE/') \ | |
<( \ | |
join -1 1 -2 1 \ | |
-o 1.1,2.7,1.2,1.3 \ | |
<(kubectl top pod) \ | |
<(kubectl get pod -o wide) \ | |
| sed -e 's/NAME/POD/' \ |
This file contains 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
function wait_for_http_200_ok(){ | |
URL="$1" | |
timeout="$((SECONDS+60))" | |
while true; do | |
HTTP_CODE=$( curl --silent --write-out %{http_code} --output /dev/null ${URL} ) | |
[[ "200" = "$HTTP_CODE" ]] && break | |
[[ "${SECONDS}" -ge "${timeout}" ]] && echo "timed out waiting for ${URL}" && exit 1 | |
sleep 1 | |
done | |
} |
This file contains 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
#!/bin/bash | |
screen ~/Library/Containers/com.docker.docker/Data/vms/0/tty |
This file contains 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
1. screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty | |
2. when done use CTRL-A CTRL-\ and then y (for yes) to exit | |
Alternative method: | |
1. docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh | |
This file contains 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 ruby | |
require 'socket' | |
require 'openssl' | |
require 'json' | |
host = 'kubernetes' | |
metrics = '/apis/metrics.k8s.io/v1beta1' | |
sock = TCPSocket.new host, 443 |
This file contains 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
#!/bin/sh | |
# | |
# Setup a work space called `work` with two windows | |
# first window has 3 panes. | |
# The first pane set at 65%, split horizontally, set to api root and running vim | |
# pane 2 is split at 25% and running redis-server | |
# pane 3 is set to api root and bash prompt. | |
# note: `api` aliased to `cd ~/path/to/work` | |
# | |
session="work" |
This file contains 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
# | |
# Acts as a nginx HTTPS proxy server | |
# enabling CORS only to domains matched by regex | |
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/ | |
# | |
# Based on: | |
# * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html | |
# * http://enable-cors.org/server_nginx.html | |
# | |
server { |