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
| [Unit] | |
| Description=Doc-to-pdf service | |
| [Service] | |
| ExecStart=/var/task/app/app.js | |
| Restart=always | |
| User=ec2-user | |
| # Note Debian/Ubuntu uses 'nogroup', RHEL/Fedora uses 'nobody' | |
| Group=nogroup | |
| Environment=PATH=/usr/bin:/usr/local/bin |
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
| # testservice - test service job file | |
| description "my service description" | |
| author "Me <myself@i.com>" | |
| # Stanzas | |
| # | |
| # Stanzas control when and how a process is started and stopped | |
| # See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas |
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" /> | |
| <meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" /> | |
| <title>Homework 3</title> | |
| <link rel="stylesheet" href="./homework3.css" /> | |
| </head> |
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
| body { | |
| font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif; | |
| font-size: 14px; | |
| } | |
| div { | |
| margin: 3em auto; | |
| width: 660px; | |
| } |
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
| -c force screen capture to go to the clipboard | |
| -b capture Touch Bar - non-interactive modes only | |
| -C capture the cursor as well as the screen. only in non-interactive modes | |
| -d display errors to the user graphically | |
| -i capture screen interactively, by selection or window | |
| control key - causes screen shot to go to clipboard | |
| space key - toggle between mouse selection and | |
| window selection modes | |
| escape key - cancels interactive screen shot | |
| -m only capture the main monitor, undefined if -i is set |
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
| require('dotenv').config() | |
| const { launch } = require('chrome-launcher') | |
| const { Chromeless } = require('chromeless') | |
| const login = require('./src/login') | |
| const { spawn } = require('child_process') | |
| const path = require('path') | |
| const crypto = require('crypto') | |
| const AWS = require('aws-sdk') | |
| const fs = require('fs') |
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
| cd /tmp | |
| yum install libcurl-devel | |
| git clone https://github.com/pramsey/pgsql-http.git | |
| cd pgsql-http | |
| make && make install | |
| cd /tmp | |
| git clone https://github.com/citusdata/pg_cron.git | |
| cd pg_cron | |
| make && make install |
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
| CREATE EXTENSION pg_cron; | |
| select cron.schedule( | |
| '* * * * *', | |
| $$select * from http_post( | |
| 'http://requestbin.fullcontact.com/y7bgepy7', | |
| '{ "foo": "bar" }', | |
| 'application/json' | |
| )$$ | |
| ); |
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
| require('http').createServer((req, res) => { | |
| res.setHeader('content-type', 'text/html') | |
| res.end('OK') | |
| }).listen(process.env.PORT || 80) |
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 -v | |
| su ec2-user -c "curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash" | |
| su ec2-user -c "source /home/ec2-user/.nvm/nvm.sh && nvm install node" | |
| su ec2-user -c "source /home/ec2-user/.nvm/nvm.sh && nvm use node" | |
| ln -s /home/ec2-user/.nvm/versions/node/v10.11.0/bin/node /usr/bin/node | |
| ln -s /home/ec2-user/.nvm/versions/node/v10.11.0/bin/npm /usr/bin/npm |