See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
const Database = require('better-sqlite3'); | |
const db = new Database('foobar.db', { verbose: console.log }); | |
const commandToCreateUserTable = ` | |
CREATE TABLE IF NOT EXISTS users ( | |
id INTEGER PRIMARY KEY AUTOINCREMENT, | |
name VARCHAR(255) NOT NULL, | |
email VARCHAR(255) NOT NULL, | |
created_at timestamp NOT NULL DEFAULT current_timestamp, | |
updated_at timestamp NOT NULL DEFAULT current_timestamp |
///////////////////////////////////////////////////////// | |
// // | |
// _oo0oo_ // | |
// o8888888o // | |
// 88" . "88 // | |
// (| -_- |) // | |
// 0\ = /0 // | |
// ___/`---'\___ // | |
// .' \\| |// '. // |
const images = document.querySelectorAll('div#block-ibmedia-content img'); | |
const imageUrls = Array.from(images).map(image => image.src); | |
const gallery = document.createElement('div'); | |
gallery.id = 'ibmedia-gallery'; | |
gallery.style.display = 'none'; | |
for (var i = 0; i < images.length; i++) { | |
const image = images[i]; |
const _ = require('lodash'); | |
const ngheSiUuTu = [ | |
'Tuan', | |
'Tung', | |
'Vinh', | |
'Kien', | |
'Linh', | |
]; |
// What about compose()? | |
// It’s just pipe in the other direction. | |
compose = (...function) => (value) => fns.reduceRight((currentValue, currentFunction) => currentFunction(currentValue), value); | |
compose( | |
reverse, | |
get6Characters, | |
uppercase, | |
getName |
{ | |
"enableSomeThings": true | |
} |
const SHA256 = require("crypto-js/sha256"); | |
class Block { | |
constructor(index, timestamp, data, previousHash = "") { | |
this.index = index; | |
this.timestamp = timestamp; | |
this.data = data; | |
this.previousHash = previousHash; | |
this.hash = this.calculateHash(); | |
} |
const _ = require("lodash"); | |
const moment = require("moment"); | |
// Load the AWS SDK for Node.js | |
const AWS = require("aws-sdk"); | |
// Set the region to us-west-2 | |
AWS.config.update({ region: "us-west-2" }); | |
// Create the SQS service object | |
const sqs = new AWS.SQS({ apiVersion: "2012-11-05" }); |
-Xmx8192m | |
-XX:ReservedCodeCacheSize=1024m | |
-Xms2048m | |
-XX:+UseG1GC | |
-XX:SoftRefLRUPolicyMSPerMB=250 | |
-XX:CICompilerCount=2 | |
-XX:+HeapDumpOnOutOfMemoryError | |
-XX:-OmitStackTraceInFastThrow | |
-ea | |
-Dsun.io.useCanonCaches=false |