This file contains hidden or 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 hidden or 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
| <?php | |
| add_action('admin_init', function () { | |
| // Redirect any user trying to access comments page | |
| global $pagenow; | |
| if ($pagenow === 'edit-comments.php') { | |
| wp_redirect(admin_url()); | |
| exit; | |
| } |
This file contains hidden or 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 hidden or 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
| <IfModule mod_deflate.c> | |
| # Compress HTML, CSS, JavaScript, Text, XML and fonts | |
| AddOutputFilterByType DEFLATE application/javascript | |
| AddOutputFilterByType DEFLATE application/json | |
| AddOutputFilterByType DEFLATE application/schema+json | |
| AddOutputFilterByType DEFLATE application/rss+xml | |
| AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
| AddOutputFilterByType DEFLATE application/x-font | |
| AddOutputFilterByType DEFLATE application/x-font-opentype | |
| AddOutputFilterByType DEFLATE application/x-font-otf |
This file contains hidden or 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 hidden or 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: [''] | |
| }) |