Applies to everything: components, services, directives, etc.
- One thing per file
- Max 400 lines of code per file
# Unix find documentation: https://kb.iu.edu/d/admm | |
# Remove all node_modules that were modified 60 days or earlier (to free up disc space) | |
find ./* -maxdepth 1 -path '*node_modules*' -type d -mtime +60 -exec rm -rf {} \; | |
# Show all directories containing node_modules that were modified 60 days or earlier | |
find ./* -maxdepth 1 -path '*node_modules*' -type d -mtime +60 -print | |
# Run this script where all the checked out projects are. | |
find . -maxdepth 2 -type d -ctime +60 -name node_modules | grep -vE "(node-deploy|node-release|stash-client|kibana-dashboards|package-manager)" | xargs rm -rf |
const fs = require("fs"); | |
const path = require("path"); | |
const PATH = "." | |
function listDirs(files) { | |
files.forEach(file => { | |
fs.stat(path.join(PATH, file), (err, stats) => { | |
if (stats.isDirectory()) { | |
console.log(file); |
find . -type f -print0 | xargs -0 grep -l "needle" |
cat test-file.js | grep "\(it(\|describe(\)" |
// the first five are the G5 currencies. The whole lot are the G10 | |
const currencies = ["EUR", "GBP", "YEN", "USD", "CHF", "AUD", "CAD", "NZD", "NOK", "SEK"]; |
// Based on material css | |
.container { | |
margin: 0 auto; | |
.row { | |
margin-left: -4px; | |
margin-right: -4px; | |
} | |
} | |
.row { |
# Run Chrome as IE11 | |
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-agent="Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; Ypkch32; rv:11.0) like Gecko" |
function log(value, label = "-") { | |
console.log(" "); | |
console.log(" "); | |
console.log(label, JSON.stringify(value, null, " ")); | |
} |