View convert.js
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
import client from './mongodb.js' | |
import { transformObject, convertToDate } from './utils.js' | |
;(async () => { | |
const nfeDB = client.db('nfeServiceDB') | |
const nfeCollection = nfeDB.collection('nfe') | |
const count = await nfeCollection.countDocuments({ vs: '1.0', 'NFe.infNFe.ide.dhEmi': { $type: 'string' } }) | |
// eslint-disable-next-line no-console | |
console.log('count', count) |
View index.js
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 { Client, Location, List, Buttons, LocalAuth } = require('./index'); | |
import pkg from 'whatsapp-web.js' | |
const { Client, Location, List, Buttons, LocalAuth } = pkg | |
const client = new Client({ | |
authStrategy: new LocalAuth(), | |
puppeteer: { headless: false } | |
}) | |
// const browser = await puppeteer.launch({ |
View gist:2d6c39bda7c3361454b27e34c87ce3bd
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
352206041550260006745506400012822013044218431,aasdsad, asdsad, asda, ACP559, 94.6 | |
352206041550260006745506400012822013044218431,aasdsad, asdsad, asda, ART9614, 131.05 | |
find - Mongo | |
lines = [] | |
for (const nfe of nfes) { | |
// const dets = findAll det (nfe._id) |
View MaskedInput.js
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
import React from 'react' | |
import { css as transformStyleObject, get } from '@theme-ui/css' | |
import { useTheme } from '@emotion/react' | |
import { css as createClassName } from '@emotion/css' | |
import { IMaskInput } from 'react-imask' | |
const MaskedInput = React.forwardRef(({ __themeKey = 'forms', __css, variant = 'input', sx, style, ...rest }, ref) => { | |
const theme = useTheme() | |
const autofillStyles = { |
View index.js
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
#!/usr/bin/env node | |
const fsp = require('fs').promises; | |
const { program } = require('commander'); | |
const got = require('got'); | |
const AVERAGE_QTY = 10; | |
const LOOP_DELAY = 100; | |
async function read(tempFile) { |
View index.js
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
#!/usr/bin/env node | |
// npx https://gist.github.com/alobato/9516e3a1ad8d27cf9d7b20efa8c899eb -s IP -p /Users/user/.ssh/id_rsa | |
const fs = require('fs'); | |
// const AWS = require('aws-sdk'); | |
const { program } = require('commander'); | |
// const execa = require('execa'); | |
const { Client } = require('ssh2'); | |
const { readFileSync } = require('fs'); |
View index.js
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
#!/usr/bin/env node | |
const fs = require('fs'); | |
const AWS = require('aws-sdk'); | |
const { program } = require('commander'); | |
const execa = require('execa'); | |
program | |
.option('-d, --db-name <name>', 'Database') | |
.option('-p, --db-password <pass>', 'Database password') |
View index.js
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
#!/usr/bin/env node | |
const { program } = require('commander'); | |
const inquirer = require('inquirer'); | |
program | |
.option('-d, --debug', 'output extra debugging') |
View monitrc
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
# $ sudo apt install monit | |
# $ sudo monit | |
# $ sudo systemctl enable monit // enable autostart | |
# $ sudo service monit reload | |
# $ sudo monit -t | |
# $ sudo monit validate | |
# $ sudo systemctl status monit | |
# $ sudo cat /var/log/monit.log | |
# $ ssh -NL 2812:localhost:2812 deployer@IP |
View google_fonts.css
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
@font-face { | |
font-family: 'ABeeZee'; | |
font-style: normal; | |
font-weight: 400; | |
src: local('ABeeZee'), local('ABeeZee-Regular'), url(http://fonts.gstatic.com/s/abeezee/v9/JYPhMn-3Xw-JGuyB-fEdNA.ttf) format('truetype'); | |
} | |
@font-face { | |
font-family: 'Abel'; | |
font-style: normal; | |
font-weight: 400; |
NewerOlder