Starting a personal node project could be easy; starting a team node project could be challenging.
I am a developer currently working in SEEK Australia.
In my experience, common mistakes developer make when starting a projects are:
- No Linting
#!/usr/bin/env node | |
const fs = require('fs'); | |
const models = require('../models'); | |
for (const model in models) { | |
const tableName = models[model].tableName; | |
let defaultValue = ''; | |
let onUpdate = ''; |
Starting a personal node project could be easy; starting a team node project could be challenging.
I am a developer currently working in SEEK Australia.
In my experience, common mistakes developer make when starting a projects are:
from lxml import html | |
import requests | |
import os | |
import json | |
from tqdm import tqdm | |
COURSES = """https://egghead.io/courses/cycle-js-fundamentals | |
https://egghead.io/courses/use-d3-v3-to-build-interactive-charts-with-javascript |
db.currentOp().inprog.forEach( | |
function(op) { | |
if(op.secs_running > 5) printjson(op); | |
} | |
) |
SELECT id, concat('kill ', id, ';') as kill_command, state, command, time, info | |
FROM information_schema.processlist | |
WHERE command <> 'Sleep' | |
AND info NOT LIKE '%PROCESSLIST%' | |
ORDER BY time DESC LIMIT 50; |
SET NAMES utf8; | |
SET time_zone = '+00:00'; | |
SET foreign_key_checks = 0; | |
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; | |
SET NAMES utf8mb4; | |
DROP TABLE IF EXISTS `districts`; | |
CREATE TABLE `districts` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, |
openssl key pair generate | |
//client - using meteor.js | |
const nodersa = Npm.require('node-rsa'); | |
import { HTTP } from 'meteor/http'; | |
const syncPost = Meteor.wrapAsync( HTTP.post, HTTP ); | |
encryptStringWithRsaPublicKey( data ) { | |
const absolutePath = Assets.absoluteFilePath( "public.key" ); //public key file path | |
const publicKey = fs.readFileSync( absolutePath, "utf8" ); |
#!/bin/sh | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$") | |
if [[ "$STAGED_FILES" = "" ]]; then | |
exit 0 | |
fi | |
PASS=true |
{ | |
"passfail": false, // Stop on first error | |
"maxerr": 100, // Maximum error before stopping | |
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment. | |
"browser": true, // Standard browser globals e.g. `window`, `document`. | |
"esnext": true, // Allow ES.next specific features such as `const` and `let`. | |
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.). | |
"camelcase": false, // Permit only camelcase for `var` and `object indexes`. | |
"curly": false, // Require {} for every new block or scope. | |
"eqeqeq": true, // Require triple equals i.e. `===`. |