This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @see https://github.com/siongui/palidictionary/blob/master/static/js/draggable.js | |
* @see http://docs.angularjs.org/guide/compiler | |
*/ | |
angular.module('draggableModule', []). | |
directive('draggable', ['$document' , function($document) { | |
return { | |
restrict: 'A', | |
link: function(scope, elm, attrs) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Observable } = require('rxjs/Observable'); | |
require('rxjs/add/observable/fromEvent'); | |
require('rxjs/add/operator/map'); | |
require('rxjs/add/observable/merge'); | |
function createOnline$() { | |
//merge several events into one | |
return Observable.merge( | |
//use .map() to transform the returned Event type into a true/false value | |
Observable.fromEvent(window, 'offline').map(() => false), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const AWS = require('aws-sdk'); | |
const S3 = new AWS.S3({ | |
signatureVersion: 'v4', | |
}); | |
const sharp = require('sharp'); | |
const BUCKET = process.env.BUCKET ? process.env.BUCKET : "mybucket"; | |
const URL = process.env.URL ? process.env.URL : "http://localhost:5858"; // for local development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { map, expand } from 'rxjs/operators'; | |
import { EMPTY } from 'rxjs'; | |
import { CompressorService } from './compressor.service'; | |
@Component({ | |
selector: 'app-root', | |
template: '<input type="file" (change)="process($event)" multiple/>', | |
styles: [''] | |
}) |