Skip to content

Instantly share code, notes, and snippets.

@thischarmingsam8
thischarmingsam8 / Dockerfile for Ionic 1 with Android SDK and Karma and headless Chrome
Last active May 19, 2019 16:57
Dockerfile for Ionic 1 with Android SDK and Karma w/ headless Chrome
FROM ubuntu:18.04
ENV APP_HOME /srv/app
WORKDIR $APP_HOME
# Install node 8.16
RUN apt-get update
RUN apt-get -y install build-essential
RUN apt-get -y install wget curl gnupg unzip libfontconfig bzip2
@thischarmingsam8
thischarmingsam8 / IdleTimer.coffee
Created April 26, 2014 11:44
Coffeescript version of the simple page idle timer.
class window.IdleTimer
constructor: () ->
@timer
@timeIncrement = 1000
@timeIdle = 0
@timeMax = 10000
@expired = false
@interactionMethods = ['click','mousemove']
@thischarmingsam8
thischarmingsam8 / IdleTimer.ts
Created April 23, 2014 21:33
Typescript class for detecting and reacting to page idle state, still needs touch detection etc.
class IdleTimer
{
timer: any;
timeIncrement: number = 1000;
timeMax: number = 10000;
timeIdle: number = 0;
expiryCallback: Function;
awakeCallback: Function;
tickCallback: Function;
interactionMethods: string[];