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
class Peekable(): | |
"""An iterable class which can return the next element of the wrapped | |
iterator without advancing it.""" | |
def __init__(self, iterator): | |
self.iterator = iterator | |
self.peeked = False | |
def peek(self): | |
if not self.peeked: | |
self.peeked = True |
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
THISFILE="$(pwd)/$0" | |
REPODIR=$(dirname $(dirname $(dirname "$THISFILE"))) | |
# Notify the user that we are updating HEAD. | |
echo -e "\033[32m" | |
echo "Updating HEAD for you." | |
echo git --git-dir "$REPODIR/.git" --work-tree "$REPODIR/" reset --hard master | |
echo -e "\033[0m" | |
git --git-dir "$REPODIR/.git" --work-tree "$REPODIR/" reset --hard master |
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
#!/bin/bash | |
kubectl run -it --rm --overrides='{"spec": {"hostNetwork": true}}' --image nicolaka/netshoot:latest netshoot -- bash |
OlderNewer