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
// ============== NGINX CONFIG FILE ================= | |
# for several node or uwsgi apps hosted in sub locations | |
# Forward all HTTP requests to HTTPS | |
server { | |
listen 80 | |
server_name www.domain.com domain.com; | |
return 301 https://$host$request_uri; | |
} | |
server { |
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
// ============== PM2 ECOSYSTEM FILE ================= | |
// /srv/www/pm2/ecosystem.config.js | |
// shared environment variables | |
const commonEnv = { | |
devEnv: {}, | |
prodEnv: { | |
SHARED_SECRET: '123456', | |
ANOTHER_SHARED_SECRET: '123456', | |
NODE_ENV: 'PROD', |
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 json | |
import time | |
import math | |
import sys | |
import xmltodict | |
import requests | |
from datetime import date | |
with open("config.json") as f: | |
config = json.load(f) |
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 React, { useState, useEffect } from 'react'; | |
import { getInventory } from './services/services'; | |
import { makeStyles } from '@material-ui/core'; | |
import { HotTable } from '@handsontable/react'; | |
import Handsontable from 'handsontable'; | |
import 'handsontable/dist/handsontable.full.css'; | |
const useStyles = makeStyles((theme) => ({ | |
container: { |
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 FileSaver from 'file-saver'; | |
import Excel from 'exceljs'; | |
/* Export excel file with dynamic dropdowns | |
All hope abandon, ye who enter here. | |
Data argument looks like | |
{ | |
columns: [ { col1Def }, { col2Def } ], | |
rows: [ { columnDataField: value, columnDataField: value } ] | |
fileName: 'Name' |