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
function decodeBase62(number) { | |
var alphabet = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
var out = 0 | |
var len = number.length - 1 | |
for (var t = 0; t <= len; t++) { | |
out = out + alphabet.indexOf(number.substr(t, 1)) * Math.pow(62, len - t) | |
} | |
return out | |
} |
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 http = require('http') | |
const url = require('url') | |
const path = require('path') | |
const fs = require('fs') | |
const mime = { | |
"html": "text/html", | |
"css": "text/css", | |
"js": "text/javascript", | |
"json": "application/json", | |
"gif": "image/gif", |
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
description "Hubot Slack bot" | |
# Slack-specific environment variables. Change these: | |
env HUBOT_SLACK_TOKEN=aaaaaaaaaaaaaaaaaaaaaaaaaa | |
env HUBOT_SLACK_TEAM=example | |
env HUBOT_SLACK_BOTNAME=flash_gordan | |
env HUBOT_AUTH_ADMIN=admin | |
# Subscribe to these upstart events | |
# This will make Hubot start on system boot |