A simple groovy console script to find AEM pages with a certain component then display them in a nice table
Copy script to AEM groovy console, change parameters and run!
Copy script to AEM groovy console, change parameters and run!
| { | |
| "name": "webpack-sass", | |
| "version": "1.0.0", | |
| "scripts": { | |
| "start": "webpack-dev-server --open --mode development", | |
| "build": "webpack -p" | |
| }, | |
| "devDependencies": { | |
| "babel-core": "^6.26.0", | |
| "babel-loader": "^7.1.4", |
| var DATABASE_NAME = 'test_db'; | |
| var DB_USERNAME = 'abc'; | |
| var DB_PASSWORD = 'abc@123'; | |
| var Sequelize = require('sequelize'); | |
| var FS = require('fs'); | |
| var sequelize = new Sequelize( | |
| DATABASE_NAME, | |
| DB_USERNAME, |
This guide assumes you have the emmet and language-babel packages already installed in Atom
keymap.cson file by clicking on Atom -> Keymap… in the menu bar'atom-text-editor[data-grammar~="jsx"]:not([mini])':| { | |
| "keys": ["tab"], | |
| "command": "expand_abbreviation_by_tab", | |
| // put comma-separated syntax selectors for which | |
| // you want to expandEmmet abbreviations into "operand" key | |
| // instead of SCOPE_SELECTOR. | |
| // Examples: source.js, text.html - source | |
| "context": [ | |
| { |
We will compare ASP.NET and Node.js for backend programming.
Source codes from examples.
This document was published on 21.09.2015 for a freelance employer. Some changes since then (14.02.2016):
async/await. yield and await are used almost in the same way, so I see no point to rewrite the examples.Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math| #!/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 |
| var gulp = require('gulp'); | |
| var sourcemaps = require('gulp-sourcemaps'); | |
| var source = require('vinyl-source-stream'); | |
| var buffer = require('vinyl-buffer'); | |
| var browserify = require('browserify'); | |
| var watchify = require('watchify'); | |
| var babel = require('babelify'); | |
| function compile(watch) { | |
| var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.