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
    
  
  
    
  | FROM python:3.8 | |
| SHELL ["/bin/bash", "-c"] | |
| ENV PIP_NO_CACHE_DIR off | |
| ENV PIP_DISABLE_PIP_VERSION_CHECK on | |
| ENV PYTHONUNBUFFERED 1 | |
| ENV PYTHONDONTWRITEBYTECODE 0 | |
| RUN apt-get update \ | |
| && apt-get install -y --force-yes \ | |
| nano python-pip gettext chrpath libssl-dev libxft-dev \ | |
| libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev\ | 
  
    
      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
    
  
  
    
  | REDIS_URL = os.getenv('REDIS_URL', 'redis://localhost:6379') | |
| CACHES = { | |
| "redis": { | |
| "BACKEND": "django_redis.cache.RedisCache", | |
| "LOCATION": REDIS_URL, | |
| "OPTIONS": { | |
| "CLIENT_CLASS": "django_redis.client.DefaultClient", | |
| } | |
| }, | |
| "default": { | 
  
    
      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
    
  
  
    
  | def server_setup(server_id: int): | |
| """Connects to server and runs installation of required software""" | |
| server = Server.objects.get(pk=server_id) | |
| server.setup_status = SETUP_STATUS.started | |
| server.save(update_fields=['setup_status', ]) | |
| rsa_key = server.user.private_key | |
| print(f"ran server_setup server_id={server_id}") | |
| setup_command = "curl -sSL https://app.appliku.com/server_api/initial_installation.sh | bash" | |
| try: | |
| pkey = paramiko.RSAKey.from_private_key(StringIO(rsa_key)) | 
  
    
      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
    
  
  
    
  | manager = digitalocean.Manager(token=user.digital_ocean_token) | |
| images = manager.get_global_images() | |
| image_id = None | |
| for i in images: | |
| if i.slug == 'ubuntu-18-04-x64': | |
| image_id = i.id | |
| if not image_id: | |
| return "Server creation failed, could not find a suitable image" | |
| droplet = digitalocean.Droplet( | |
| token=user.digital_ocean_token, | 
  
    
      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
    
  
  
    
  | bool checkSeesEnemy(){ | |
| int layerMask = 1 << 8; | |
| RaycastHit hit; | |
| if (Physics.Raycast(transform.position, transform.TransformDirection (Vector3.forward), out hit, see_distance, layerMask)) { | |
| Debug.DrawRay(transform.position, transform.TransformDirection (Vector3.forward) * hit.distance, Color.yellow); | |
| Debug.Log("Did Hit"); | |
| return true; | |
| } else { | |
| Debug.DrawRay(transform.position, transform.TransformDirection (Vector3.forward) *1000, Color.white); | |
| Debug.Log("Did not Hit"); | 
  
    
      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
    
  
  
    
  | FROM node:9 | |
| USER node | |
| RUN mkdir /home/node/.npm-global | |
| ENV PATH=/home/node/.npm-global/bin:$PATH | |
| ENV NPM_CONFIG_PREFIX=/home/node/.npm-global | |
| COPY interface/package.json /home/node/ | |
| COPY interface/package-lock.json /home/node/ | |
| RUN npm i -g [email protected] | |
| RUN npm i -g @angular/[email protected] | |
| WORKDIR /home/node | 
  
    
      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 bash | |
| if [ -z "${STAGE_PRIVATE_KEY}" ]; then echo "STAGE_PRIVATE_KEY is not set"; exit 255; fi | |
| if [ -z "${STAGE_PUBLIC_KEY}" ]; then echo "STAGE_PRIVATE_KEY is not set"; exit 255; fi | |
| pwd | |
| ls | |
| id | |
| mkdir ~/.ssh/ | |
| echo -n "$STAGE_PRIVATE_KEY" > ~/.ssh/id_rsa | |
| echo -n "$STAGE_PUBLIC_KEY" > ~/.ssh/id_rsa.pub | 
  
    
      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
    
  
  
    
  | node@f03e150cb3aa:/code/interface$ npm list | |
| [email protected] /code/interface | |
| +-- UNMET DEPENDENCY [email protected] | |
| +-- UNMET DEPENDENCY @angular-redux/[email protected] | |
| +-- UNMET DEPENDENCY @angular-redux/[email protected] | |
| +-- UNMET DEPENDENCY @angular/[email protected] | |
| | `-- UNMET DEPENDENCY [email protected] | |
| +-- UNMET DEPENDENCY @angular/[email protected] | |
| | `-- UNMET DEPENDENCY [email protected] | |
| +-- UNMET DEPENDENCY @angular/[email protected] | 
  
    
      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
    
  
  
    
  | mv ~/.emacs ~/.emacs_dont_need_this | 
  
    
      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
    
  
  
    
  | from OpenSSL import SSL | |
| import socket | |
| import datetime | |
| import sys | |
| def get_domain_certificate_expiration_days(domain: str, port: int=443) -> int: | |
| cur_date = datetime.datetime.utcnow() | |
| cert_tested = 0 |