Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
| import { zipObject } from 'lodash'; | |
| export const CSVExport = csvData => { | |
| const { items, headers, filename } = csvData; | |
| // use headers if available, if not, use the key names for headers | |
| // updated to create same type with zipped object | |
| const headerKeys = Object.keys(items[0]); | |
| const rowHeader = headers || zipObject(headerKeys, headerKeys); | 
| 'use strict' | |
| const AWS = require("aws-sdk"); | |
| const S3 = new AWS.S3(); | |
| module.exports = async function (inputs, context) { | |
| // example encoded images can be created here: https://www.base64-image.de/ | |
| // upload image to S3 | |
| try { | |
| const s3BucketLocation = await uploadImageToS3(inputs.DeviceDiagnosticRequest.IMEIImage, "IMEIImage", inputs, context); | |
| } catch (error) { | 
| 'use strict' | |
| const AWS = require("aws-sdk"); | |
| const S3 = new AWS.S3(); | |
| module.exports = async function (inputs, context) { | |
| // example encoded images can be created here: https://www.base64-image.de/ | |
| // upload image to S3 | |
| try { | |
| const s3BucketLocation = await uploadImageToS3(inputs.DeviceDiagnosticRequest.IMEIImage, "IMEIImage", inputs, context); | |
| } catch (error) { | 
| require('dotenv/config') | |
| const express = require('express') | |
| const multer = require('multer') | |
| const AWS = require('aws-sdk') | |
| const uuid = require('uuid/v4') | |
| const app = express() | |
| const port = 3000 | 
| <?php | |
| /* | |
| * MySQL Mass Find and Replace | |
| * Author: Lee Woodman - https://www.linkedin.com/in/leewoodman | |
| * License: GNU | |
| */ | |
| // Connect to your MySQL database. | |
| $hostname = "localhost"; | |
| $username = "root"; | 
| <?php | |
| $challenge = $_REQUEST['hub_challenge']; | |
| $verify_token = $_REQUEST['hub_verify_token']; | |
| // Set this Verify Token Value on your Facebook App | |
| if ($verify_token === 'testtoken') { | |
| echo $challenge; | |
| } | |
| $input = json_decode(file_get_contents('php://input'), true); | 
| #!/bin/bash | |
| while read oldrev newrev ref | |
| do | |
| branch=`echo $ref | cut -d/ -f3` | |
| if [ "master" == "$branch" ]; then | |
| git --work-tree=./path/under/root/dir/live-site/ checkout -f $branch | |
| echo 'Changes pushed live.' | |
| fi |