If you want to write an AngularJs (1.5) component using Angular (>=2) approach, you could use:
import { FooComponent } from './foo.component';
angular.module('app.module', [])
.component('fooComponent', FooComponent);
server { | |
listen 8000; | |
server_tokens off; | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; | |
# | |
# Custom headers and headers various browsers *should* be OK with but aren't |
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
import {Injectable, EventEmitter} from 'angular2/core'; | |
@Injectable() | |
export class EmitterService { | |
private static _emitters: { [ID: string]: EventEmitter<any> } = {}; | |
static get(ID: string): EventEmitter<any> { | |
if (!this._emitters[ID]) | |
this._emitters[ID] = new EventEmitter(); | |
return this._emitters[ID]; |
/** | |
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ================== | |
* | |
* This patch works around iOS9 UIWebView regression that causes infinite digest | |
* errors in Angular. | |
* | |
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular | |
* have the workaround baked in. | |
* | |
* To apply this patch load/bundle this file with your application and add a |
#!/usr/bin/env node | |
//this hook installs all your plugins | |
// add your plugins to this list--either | |
// the identifier, the filesystem location | |
// or the URL | |
var plugins = require('./plugins/fetch.json'); | |
var pluginlist = []; |
This excercise computes PageRank of npm dependencies graph.
wget https://skimdb.npmjs.com/registry/_design/scratch/_view/byField
rank.js
(see below):Number of nodes: 123,969; Number of edges: 281,471; PageRank computed in 1,187 ms;
#!/bin/bash | |
FINAL_BINARY_FILEPATH="platforms/android/build/outputs/apk/wakatime-android-release-signed.apk" | |
echo "*** Build Ionic release for Android ***" | |
rm $FINAL_BINARY_FILEPATH | |
ionic build --release android | |
echo "Signing APK..." | |
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ~/Dropbox/WakaTime/Build/Android/wakatime.keystore -storepass $WAKATIME_STOREPASS platforms/android/build/outputs/apk/android-release-unsigned.apk android | |
echo "Optimizing APK (zipalign)..." | |
~/Library/Android/sdk/build-tools/23.0.3/zipalign -v -f 4 platforms/android/build/outputs/apk/android-release-unsigned.apk $FINAL_BINARY_FILEPATH | |
# echo "Opening APK..." |
Jake Archibald (@jaffathecake): The ServiceWorker is coming; look busy
https://speakerdeck.com/jaffathecake/the-serviceworker-is-coming-look-busy
https://github.com/jakearchibald/trained-to-thrill/
https://www.youtube.com/watch?v=SmZ9XcTpMS4
Hunter Loftis (@hunterloftis): We Will All Be Game Progmrammers
http://wwabgp.herokuapp.com/s
http://youtu.be/QX0eauXBKwc
CarterRabasa (@carterrabasa): A Community of People; Not Projects
/* | |
* vg-bkg-size | |
* A Videogular plugin to emulate background-size CSS property for video: "cover" or "contain" | |
* | |
* Use: | |
* <videogular vg-bkg-size="cover" center="true"></videogular> | |
* vg-bkg-size => "cover" or "contain" | |
* center => true or false | |
* | |
* Copyright (c) 2014 Panurge Web Studio |