- Open and bring to front a specific app
osascript -e "tell application \"APP\" -e "activate" -e "end tell"
osascript -e 'tell app "Terminal" to activate'
osascript -e 'tell app "Terminal" to do script "cmatrix"'
# Turn on Notifications | |
do shell script "defaults -currentHost write com.apple.notificationcenterui doNotDisturb -bool FALSE; defaults -currentHost delete com.apple.notificationcenterui doNotDisturbDate; osascript -e 'quit application \"NotificationCenter\" ' && killall usernoted" -- this set 'Do not disturb' to false in the pref | |
# Show Desktop | |
do shell script "defaults write com.apple.finder CreateDesktop -bool true; killall Finder" | |
# Show all windows | |
tell application "System Events" | |
set visible of (every process) to true | |
end tell |
/*jslint node: true */ | |
'use strict'; | |
// ## Globals | |
var argv = require('minimist')(process.argv.slice(2)); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var changed = require('gulp-changed'); | |
var concat = require('gulp-concat'); | |
var gulp = require('gulp'); | |
var gulpif = require('gulp-if'); |
Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.
All files were downloaded from https://cdnjs.com and named accordingly.
Output from ls
command is stripped out (irrelevant stuff)
$ ls -lhS
566K Jan 4 22:03 angular2.min.js
ACADEMIA DA FORÇA AÉREA | AFA | SP | |
---|---|---|---|
ACADEMIA DA POLÍCIA CIVIL DO ESTADO DA BAHIA | ACADEPOL | BA | |
ACADEMIA DE POLÍCIA MILITAR DO BARRO BRANCO | APMBB | SP | |
ACADEMIA DE POLÍCIA MILITAR DOM JOÃO VI | APMDJVI | RJ | |
ACADEMIA DE POLÍCIA MILITAR | APM | BA | |
ACADEMIA MILITAR DE AGULHAS NEGRAS | AMAN | RJ | |
ANHANGUERA EDUCACIONAL S.A. | UNIANHANGUERA | RS | |
ANHANGUERA EDUCACIONAL | AESA | SP | |
ASSOCIAÇÃO CATARINENSE DE ENSINO | ACE | SC | |
ASSOCIAÇÃO DE ENSINO SUPERIOR DO PIAUÍ | AESPI | PI |
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)); |
Despite being derived from classical MVC pattern JavaScript and the environment it runs in makes Javascript MVC implementation have its own twists. Lets see how typical web MVC functions and then dive into simple, concrete JavaScript MVC implementation.
Typical server-side MVC implementation has one MVC stack layered behind the singe point of entry. This single point of entry means that all HTTP requests, e.g. http://www.example.com or http://www.example.com/whichever-page/ etc., are routed, by a server configuration, through one point or, to be bold, one file, e.g. index.php.
At that point, there would be an implementation of Front Controller pattern which analyzes HTTP request (URI at first place) and based on it decides which class (Controller) and its method (Action) are to be invoked as a response to the request (method is name for function and member is name for a variable when part of the class/object).