Skip to content

Instantly share code, notes, and snippets.

View misterarias's full-sized avatar
🤓
Nerding

Juan Arias misterarias

🤓
Nerding
View GitHub Profile
# export AWS credentials for given profile
aws.load_credentials() {
_unset() { unset AWS_PROFILE AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY ; }
_hint() { echo && echo "[HINT] Use '-1' to unload current session" ; }
# 'default' is not a profile we want to use
local profiles more_profiles aws_access_key_id aws_secret_access_key chosen_profile
profiles=$(grep -o '\[.*\]' ~/.aws/credentials | tr -d "][" )

Keybase proof

I hereby claim:

  • I am misterarias on github.
  • I am ariasfreire (https://keybase.io/ariasfreire) on keybase.
  • I have a public key ASDyWgxDEZFWMZmSq9JvP9I9oIqKBu8aGa3qFwPm55uClAo

To claim this, I am signing this object:

board_size = 10
boats = [
{'size': 6, 'amount': 1 },
{'size': 4, 'amount': 2 },
{'size': 3, 'amount': 3 },
{'size': 2, 'amount': 3 }
]
import random
@misterarias
misterarias / sim.py
Created July 9, 2015 14:26
script chorras para carlos
#!/usr/bin/env python
import sys
import socket
def main(args):
port = int(args[0])
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("localhost", port))
while True:
f = open("chorradas.txt")