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
| variable "bucket_name" { | |
| default = "max-bucket-for-testing" | |
| } | |
| provider "aws" { | |
| region = var.aws_region | |
| profile = var.aws_profile | |
| } | |
| resource "aws_s3_bucket" "artifacts" { |
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
| #!/bin/bash | |
| ip=$1 | |
| maxConnectionAttempts=10 | |
| sleepSeconds=10 | |
| #Waiit until SSH on Bastion server is working | |
| echo "Attempting to ssh" | |
| index=1 | |
| while (( $index <= $maxConnectionAttempts )) | |
| do |
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
| import argparse | |
| import csv | |
| import sys | |
| from datetime import datetime | |
| from django.utils.timezone import make_aware | |
| from django.core.management.base import BaseCommand | |
| from metrics import models |
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
| variable "aws_region" { | |
| type = string | |
| } | |
| variable "aws_access_key" { | |
| type = string | |
| } | |
| variable "aws_secret_key" { | |
| type = string |
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
| ssh -L 8080:localhost:80 vagrant@192.168.33.11 |
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
| vagrant ssh -c "sudo cat /home/vagrant/devstack/local.conf" > local.conf |
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
| while true; do echo -e "HTTP/1.1 200 OK\n\n $(date)" | nc -l localhost 1500; done |
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
| `DEFAULT_ROOT_USER=root | |
| DEFAULT_ROOT_PASS=pass` | |
| .split('\n') | |
| .map(el => el.split('=')).map(([l, r]) => | |
| console.log(`set { | |
| name = "${l}" | |
| value = "${r}" | |
| }`)) |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| <script src="https://cdn.jsdelivr.net/npm/pdfjs-dist@2.2.228/build/pdf.min.js"></script> | |
| <style> | |
| #the-canvas { | |
| border: 1px solid black; | |
| direction: ltr; |
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
| var Canvas = require('canvas'); | |
| var assert = require('assert'); | |
| var fs = require('fs'); | |
| var pdfjsLib = require('pdfjs-dist'); | |
| function NodeCanvasFactory() {} | |
| NodeCanvasFactory.prototype = { | |
| create: function NodeCanvasFactory_create(width, height) { | |
| assert(width > 0 && height > 0, 'Invalid canvas size'); | |
| var canvas = Canvas.createCanvas(width, height); |