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
# print http headers and body | |
tshark -R 'http' -S -V -l | awk '/^[HL]/ {p=30} /^[^ HL]/ {p=0} /^ / {--p} {if (p>0) print}' |
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 bash | |
IP=`ifconfig | grep "inet " | grep -v "inet 127.0.0.1" | cut -f 2 -d " "` | |
PORT=$1 | |
if [ -z "$1" ] | |
then | |
PORT=8000 | |
fi | |
# Copy ip and port to pasteboard |
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 java.util.HashMap; | |
import java.util.Map; | |
public class LRUCache<K, V> { | |
private final Map<K, Pair<Node<K>, V>> map = new HashMap<K, Pair<Node<K>,V>>(); | |
private Node<K> head = null; | |
private Node<K> tail = null; | |
private final int maxSize; | |