This file contains 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
replication: | |
replSetName: "rs0" | |
net: | |
bindIp: localhost,<hostname(s)|ip address(es)> |
This file contains 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
const http = require('http'); | |
exports.handler = async (event) => { | |
// TODO implement | |
const response = await getURL(); | |
return response; | |
}; | |
function getURL(){ | |
console.log("GET URL"); |
This file contains 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
for remote in `git branch -r | grep -v /HEAD`; do git checkout --track $remote ; done |
This file contains 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
for remote in `git branch | grep -v /HEAD`; do git push backup $remote -f ; done |
This file contains 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
/** | |
* Google Cloud Vision integration | |
*/ | |
const vision = require("@google-cloud/vision"); | |
// Creates a client | |
const client = new vision.ImageAnnotatorClient(); | |
exports.vision_serverless = function(req, res) { | |
if (req.method === "POST") { |
This file contains 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
version: 0.2 | |
phases: | |
install: | |
commands: | |
# Get Chrome Information | |
- curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | |
- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list | |
- apt-get -y update | |
# Install chrome |
This file contains 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
capabilities: { | |
chromeOptions: { | |
args: ['--headless', '--disable-gpu', '--window-size=800x600','--disable-dev-shm-usage','--no-sandbox'] | |
}, | |
browserName: "chrome" | |
}, |
This file contains 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
browsers: ["HeadlessChrome"], | |
customLaunchers: { | |
HeadlessChrome: { | |
base: "ChromeHeadless", | |
flags: [ | |
"--no-sandbox", // required to run without privileges in Docker | |
"--disable-web-security", | |
"--disable-gpu", | |
"--remote-debugging-port=9222" | |
] |
This file contains 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
// Load .env file | |
require('dotenv').config() | |
const express = require('express'); | |
const config = require('./src/config') | |
const app = express(); | |
const port = process.env.PORT || 3000 | |
app.get("*",(req,res)=>{ | |
res.setHeader("Content-Type","application/json") | |
res.send(JSON.stringify(config)); |
This file contains 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
const env = process.env.ENV || "DEV"; | |
switch (env) { | |
case "DEV": | |
module.exports = require("./development.config"); | |
break; | |
default: | |
module.exports = require("./production.config"); | |
} |
NewerOlder