Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View amit-gshe's full-sized avatar

Amit amit-gshe

  • Radbug
  • Singapore
View GitHub Profile
@amit-gshe
amit-gshe / arena_gym.py
Last active June 14, 2023 02:34
diambra debug for the wrong opponent
characters = {0: "Kyo", 1: "Benimaru", 2: "Daimon", 3: "Terry", 4: "Andy", 5: "Joe",
6: "Ryo", 7: "Robert", 8: "Yuri", 9: "Leona", 10: "Ralf", 11: "Clark", 12: "Athena",
13: "Kensou", 14: "Chin", 15: "Chizuru", 16: "Mai", 17: "King", 18: "Kim", 19: "Chang", 20: "Choi",
21: "Yashiro", 22: "Shermie", 23: "Chris", 24: "Yamazaki", 25: "Mary",
26: "Billy", 27: "Iori", 28: "Mature", 29: "Vice", 30: "Heidern",
31: "Takuma", 32: "Saisyu", 33: "Heavy-D!", 34: "Lucky", 35: "Brian",
36: "Eiji", 37: "Kasumi", 38: "Shingo", 39: "Rugal", 40: "Geese",
41: "Krauser", 42: "Mr.Big", 43: "Goenitz", 44: "Orochi"}
# DIAMBRA Gym base class providing frame and additional info as observations
#!/usr/bin/env bash
set -e
AccessKeyId=test
Secret=test
file_array=()
for dir in $*; do
for file in `find $dir -type f`; do
# echo $file
@amit-gshe
amit-gshe / smb.conf
Last active June 24, 2020 16:43
samba lan no password
# sudo chmod ugo+rwx Public
[global]
map to guest = Bad User
server role = standalone server
idmap config * : backend = tdb
[Public]
comment = Home Directories
path = /home/lerjin/Public
guest ok = Yes
read only = No
default_network_id=$(docker network ls -f name=luckytime -q)
sudo nsenter --net=/var/run/docker/netns/lb_${default_network_id:0:9} sysctl -w net.ipv4.vs.expire_nodest_conn=1
sudo nsenter --net=/var/run/docker/netns/lb_${default_network_id:0:9} sysctl -w net.ipv4.vs.expire_quiescent_template=1
sudo nsenter --net=/var/run/docker/netns/lb_${default_network_id:0:9} sysctl -w net.ipv4.vs.conn_reuse_mode=0
#!/usr/bin/env sh
docker swarm join --token SWMTKN-1-1psmsi1k6q5fzfxon36eam98qs6xe0ytww7ba7jicxntb5kde7-1c1oz8kh5x7bs9voxtras5mme 10.2.100.98:2377
sleep 10
default_network_id=$(docker network ls -f name=luckytime -q)
sudo nsenter --net=/var/run/docker/netns/lb_${default_network_id:0:9} sysctl -w net.ipv4.vs.expire_nodest_conn=1
sudo nsenter --net=/var/run/docker/netns/lb_${default_network_id:0:9} sysctl -w net.ipv4.vs.expire_quiescent_template=1
sudo nsenter --net=/var/run/docker/netns/lb_${default_network_id:0:9} sysctl -w net.ipv4.vs.conn_reuse_mode=0
curl https://gist.githubusercontent.com/amit-gshe/846444924e63cae3b31c80829b60104b/raw/98f643321d14542afa69d423f9868354ea222dd6/install_cwagent.sh|bash
@amit-gshe
amit-gshe / install.sh
Last active June 8, 2020 15:36
install.sh
#!/usr/bin/env sh
sudo yum update -y
sudo yum install -y docker tmux
sudo gpasswd -a $USER docker
sudo sed -i /^OPTIONS/d /etc/sysconfig/docker
sudo systemctl enable --now docker
sudo reboot
#!/usr/bin/env sh
CLOUD_WATCH_AGENT_URL=https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm
CLOUD_WATCH_AGENT_CONFIG_URL=https://gist.githubusercontent.com/amit-gshe/5849485bb1bdec8192e9c7b190994151/raw/6bc8175460add58e8ba8c354b617abebc053730d/config.json
check_command() {
for command in $@
do
if ! [ -x "$(command -v $command)" ]; then
echo "Error: command $command not exists"
exit 1
fi
@amit-gshe
amit-gshe / config.json
Created May 19, 2020 14:36
cwagent config
{
"agent": {
"metrics_collection_interval": 60,
"run_as_user": "cwagent"
},
"metrics": {
"append_dimensions": {
"AutoScalingGroupName": "${aws:AutoScalingGroupName}",
"ImageId": "${aws:ImageId}",
"InstanceId": "${aws:InstanceId}",