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 Rort1 < RTanque::Bot::Brain | |
include RTanque::Bot::BrainHelper | |
NAME = self.to_s | |
TURRET_FIRE_RANGE = RTanque::Heading::ONE_DEGREE * 15.0 | |
WALL_DETECTION_DISTANCE = 50 | |
def tick! | |
check_hit! | |
@friendly_fire = true if sensors.button_down?('f') |
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
# add to .bashrc or .bash_profile | |
# usage: | |
# sshpod <podlabel> | |
# sshpod <podlabel> --namespace=<namespace> | |
sshpod() { | |
POD_NAME=$(kubectl get pods --selector "app=$1" -o jsonpath="{.items[0].metadata.name}" $2) | |
kubectl exec -it $POD_NAME /bin/bash | |
} |
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 ruby | |
# simple script for checking network stabilty | |
# cron me like: | |
# */15 * * * * ruby /home/user/check_net.rb URL >> /home/user/check_net.log | |
# set URL to https://... to check dns resolution, tls handshake and http request at once | |
# output | |
# <public-ip-of-checking-host>/<reverse-ip-lookup-of-checking-host>/<time>/status |