- Install Hubot locally
- Install Slack Adapter
- Configure integration on Slack
- Go to
[your-slack].slack.com/services/new/hubot
- Go to
- Deploy to Heroku
If you want to rename the automatically generated heroku domain name:
[your-slack].slack.com/services/new/hubotIf you want to rename the automatically generated heroku domain name:
| #add 'node_modules' to .gitignore file | |
| git rm -r --cached node_modules | |
| git commit -m 'Remove the now ignored directory node_modules' | |
| git push origin <branch-name> |
| import Ember from 'ember'; | |
| var Promise = Ember.RSVP.Promise; | |
| export default function preloadImages(...urls) { | |
| let promises = urls.map(url => { | |
| return new Promise((resolve, reject) => { | |
| let image = new Image(); | |
| image.onload = resolve; | |
| image.onerror = reject; | |
| image.src = url; |
| export default Ember.Component.extend({ | |
| fadeDurationInMilliseconds: 300, | |
| didInsertElement() { | |
| let duration = this.get("fadeDurationInMilliseconds"), | |
| element = this.$(); | |
| element.fadeIn(duration); | |
| }, | |
| % brew install gifsicle | |
| # modify colors as needed, it will warn you if you specify more than necessary | |
| % gifsicle --colors 128 -O3 -o output.gif input.gif |
| function setUserAgent(window, userAgent) { | |
| // Works on Firefox, Chrome, Opera and IE9+ | |
| if (navigator.__defineGetter__) { | |
| navigator.__defineGetter__('userAgent', function () { | |
| return userAgent; | |
| }); | |
| } else if (Object.defineProperty) { | |
| Object.defineProperty(navigator, 'userAgent', { | |
| get: function () { | |
| return userAgent; |
| /** | |
| * Configuration #1: Basic Configuration Class | |
| * | |
| * A basic example utilising a sealed instance of a configuration | |
| * class, with user-provided options merged in upon instantation | |
| * of the implementation. | |
| */ | |
| class Config { | |
| constructor() { |
| ### Taken from https://github.com/Hyperparticle/hyperparticle.github.io/blob/2365749469b1eea3e8c4b18af24a4865fc426fd3/.circleci/config.yml | |
| # Javascript Node CircleCI 2.0 configuration file | |
| # | |
| # Check https://circleci.com/docs/2.0/language-javascript/ for more details | |
| # | |
| version: 2 | |
| jobs: | |
| build: | |
| docker: |
| // The class itself is based on the animation helper class in | |
| // https://github.com/paulmg/ThreeJS-Webpack-ES6-Boilerplate | |
| // but I have changed almost everything except for the class name and the update function. | |
| import * as THREE from 'three'; | |
| export default class Animation { | |
| constructor(scene, animations) { | |
| this.scene = scene; | |
| this.animations = animations; |