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
# <type>: (If applied, this commit will...) <subject> (Max 50 char) | |
# |<---- Using a Maximum Of 50 Characters ---->| | |
# Explain why this change is being made | |
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->| | |
# Provide links or keys to any relevant tickets, articles or other resources | |
# Example: Github issue #23 |
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 key/value should be on his own line | |
PACKAGE_VERSION=$(cat package.json \ | |
| grep version \ | |
| head -1 \ | |
| awk -F: '{ print $2 }' \ | |
| sed 's/[",]//g') | |
echo $PACKAGE_VERSION |
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 transaction = async () => { | |
let trx = await sequelize.transaction() | |
try{ | |
const user = await User.create({ | |
first_name: 'wwang', | |
last_name: 'ahahaha' | |
}, {trx}) | |
const updateResult = await User.update({ | |
first_name: 'wang' | |
}, { |
This file has been truncated, but you can view the full 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
/*! | |
* ReDoc - OpenAPI/Swagger-generated API Reference Documentation | |
* ------------------------------------------------------------- | |
* Version: "1.22.0" | |
* Repo: https://github.com/Rebilly/ReDoc | |
*/ |
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 path = require('path'); | |
const express = require('express') | |
const app = express() | |
const archiver = require('archiver') | |
app.get('/', function(req, res) { | |
const archive = archiver('zip'); |
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 mongoose from 'mongoose'; | |
run().catch(error => console.error(error.stack)); | |
async function run() { | |
await mongoose.connect('mongodb://localhost:27017/test'); | |
await mongoose.connection.dropDatabase(); | |
const BlogPost = mongoose.model('BlogPost', new mongoose.Schema({ |
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 request from 'request-promise'; | |
const geo = (req, res) => { | |
const latitude = req.body.latitude; | |
const longitude = req.body.longitude; | |
let options = { | |
method: 'POST', | |
uri: 'https://apis.map.qq.com/ws/geocoder/v1', |