aws s3 sync s3:// /
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
const groupBy = (items, key) => items.reduce( | |
(result, item) => ({ | |
...result, | |
[item[key]]: [ | |
...(result[item[key]] || []), | |
item | |
] | |
}), | |
{} | |
) |
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
const fetch = require('node-fetch') | |
const { URLSearchParams } = require('url') | |
const { dateFromJSON, dateToJSON } = require('../database/utils') | |
const { User } = require('../database') | |
const DRS_API_BASE_URL = 'https://dash-replenishment-service-na.amazon.com' | |
const CLIENT_SECRET = process.env.DRS_CLIENT_SECRET | |
// const REDIRECT_URL = `${process.env.BASE_URL}/api/amazonLWA` | |
async function handleErrors (response) { | |
const json = await response.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
function constructCSVFromJSON (json, columns, separator = ',') { | |
const header = columns.join(separator) + '\n' | |
let body = '' | |
if (Array.isArray(json)) { | |
body = json.reduce((accum, result) => accum + createRowFromJSON(columns, result, separator), '') | |
} else { | |
body = createRowFromJSON(columns, json, separator) | |
} | |
return header + body |
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
{"version":1,"resource":"file:///Users/khaledosman/Documents/github/morwins-server/example-response.js","entries":[{"id":"ztZ2.js","source":"textFileCreate.source","timestamp":1651599279809}]} |
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
/** | |
* Mongoose JobQueue Module | |
* module mongoose-jobqueue | |
* description A simple jobqueue using [mongoosejs](http://mongoosejs.com). | |
* This document follows the [JSDocs](http://usejsdoc.org/) markup. | |
*/ | |
/** | |
* @typedef {Object} Job | |
* @property {string} id The unique id of the job. |
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 { | |
background: #FFF; | |
filter: invert(1) hue-rotate(210deg); | |
} |
- Both Local And Remote *
- sudo bin/elasticsearch-plugin install repository-s3 (or setup from config / yaml file if docker)
- run elastic-search (
./bin/elastic
) - Create s3 bucket
- Create IAM role with access to the s3 bucket and copy his access & secret keys
- Add your credentials to elastic search configuration or via config/ elastic-search.yaml file
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
git rm -r --cached . | |
git add . | |
git commit -m "fixed untracked files" |
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('inspector').open(9229, "localhost", true) |