Skip to content

Instantly share code, notes, and snippets.

View nickolasteixeira's full-sized avatar

|__**__| nickolasteixeira

View GitHub Profile
# Write code that implements the scoring and rules for a simplified
# single-player blackjack game. Aim to make your code easy to
# re-use by other developers.
# Required functionality::
# Draw card
# See current hand
# Get score of current hand
# Get score for an explicitly defined hand
@nickolasteixeira
nickolasteixeira / build_docker_image.sh
Created January 18, 2020 00:33
Build your docker image for OMSC 6200 p1
#!/bin/bash
#build a docker image from your current directory
#name it gios, tag is v1
docker build -t gios:v1 .
@nickolasteixeira
nickolasteixeira / run_docker.sh
Last active January 18, 2020 00:39
Run this bash script after running the build_docker_image.sh script. Make sure to set an env variable on your system to jwtGT and assign the value of the jwt token from Georgia Tech: https://bonnie.udacity.com/auth_tokens/two_factor
#!/bin/bash
# Start docker container (--cap-add=SYS_PTRACE allows for gdb, --security-opt seccomp=unconfined for this error message : warning: Error disabling address space randomization: Operation not permitted)
#jwtGT env variable is your 2factor jwt token. I am setting it as an env variable in your container
#Make sure to set an env variable on your system to jwtGT and assign the value of the jwt token from Georgia Tech: https://bonnie.udacity.com/auth_tokens/two_factor
docker run --cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
-e jwtGT=$jwtGT \
-it gios:v1 /bin/bash
@nickolasteixeira
nickolasteixeira / Dockerfile
Created January 18, 2020 00:30
Dockerfile for OMSCS 6200 Project 1 with jwt token auth
FROM udacity/project-assistant-base:3.0
MAINTAINER fsgeek@gatech.edu
ARG develop
ARG gpgkeyfile
ENV DEBIAN_FRONTEND=noninteractive
RUN wget -O - https://ppa.bitanical.com/pward8@gatech.edu.gpg.key|apt-key add - && \
echo "deb https://ppa.bitanical.com/apt/debian bionic main" >> /etc/apt/sources.list.d/ppa.bitanical.list
@nickolasteixeira
nickolasteixeira / Create a Wyre Account (Bearer Token Auth)
Last active April 21, 2022 12:33
Create a Wyre Account (Bearer Token Auth)
################### Generate a secrey key ###################
# First generate your own secret key.
## Add code here to generate your own secret key
# Python: https://blog.miguelgrinberg.com/post/the-new-way-to-generate-secure-tokens-in-python
# Nodejs: https://stackoverflow.com/questions/8855687/secure-random-token-in-node-js (Make sure to change it to 25-35 characters)
#################### Get API Key ###################
# Next, send a post request with your secret key, which will return a api key
import requests
def count_keys(data):
total = 0
for i in data:
total += 1
if type(data[i]) is dict:
total += count_keys(data[i])
elif type(data[i]) is list: