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 express = require('express'); | |
const https = require('https'); | |
const fs = require('fs'); | |
const proxy = require('http-proxy-middleware'); | |
const app = express(); | |
app.use('/api1', proxy({ | |
target: 'https://example.com/one-api', | |
changeOrigin: true, |
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 tolerance = 200; // swipe distance in pixels | |
const swipeLeft$ = Rx.Observable.fromEvent(document, "touchstart") | |
// Switch to listen to touchmove to determine position | |
.switchMap(startEvent => | |
Rx.Observable.fromEvent(document, "touchmove") | |
// Listen until "touchend" is fired | |
.takeUntil(Rx.Observable.fromEvent(document, "touchend")) | |
// Output the pageX location | |
.map(event => event.touches[0].pageX) | |
// Accumulate the pageX difference from the start of the touch |
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 gulp = require('gulp'); | |
const events = require('events'); | |
const eventEmitter = new events.EventEmitter(); | |
const sass = require('gulp-sass'); | |
const sourcemaps = require('gulp-sourcemaps'); | |
const autoprefixer = require('gulp-autoprefixer'); | |
const prompt = require('gulp-prompt'); | |
const gutil = require('gulp-util'); | |
const browserSync = require('browser-sync').create(); |
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
$.fn.extend({ | |
/** | |
* Outputs a timer to an element in the DOM | |
* @param {number} seconds - A positive | |
*/ | |
countdownTimer: function (time) { | |
return this.each(function () { | |
var $this = $(this); | |
var timer = time; |