Homebrew Formula patching old ImageMagick release 6.9.7-4
$ brew install https://gist.githubusercontent.com/asanchez75/7c3cd4358fb982c4028bfc021424dfbc/raw/62eb3ce49d82b8a5c6033ecb89bdefbec9d00e84/imagemagick.rb
function breakWord(stringToBreak, dictionary) { | |
for (var i = 1; i <= stringToBreak.length; i++) { | |
var prefix = stringToBreak.substring(0, i); | |
if(dictionary.has(prefix)) { | |
var suffix = stringToBreak.substring(i, stringToBreak.length); | |
function breakWord(stringToBreak, dictionary) { | |
if(dictionary.has(stringToBreak)) return stringToBreak; | |
var length = stringToBreak.length; | |
for (var i=1; i < length; i++) { | |
var prefix = stringToBreak.substring(0, i); | |
if(dictionary.has(prefix)) { | |
var sufix = stringToBreak.substring(i, length); | |
var segSufix = breakWord(sufix, dictionary); | |
if(segSufix != null) { |
function StringBuffer() { | |
this.__strings__ = []; | |
} | |
StringBuffer.prototype.append = function (str) { | |
this.__strings__.push(str); | |
}; | |
StringBuffer.prototype.toString = function () { |
{ | |
// babel parser to support ES6/7 features | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"ecmaVersion": 7, | |
"ecmaFeatures": { | |
"experimentalObjectRestSpread": true, | |
"jsx": true | |
}, | |
"sourceType": "module" |
app.get('/auth/facebook', (req, res, next) => { | |
passport.authenticate('facebook', { | |
callbackURL: 'http://localhost:3000/auth/facebook/callback?' + | |
(req.query.redirect_uri ? '&redirect_uri=' + req.query.redirect_uri : '') + | |
(req.query.account_linking_token ? '&account_linking_token=' + req.query.account_linking_token : ''), | |
scope: ['public_profile', 'email', 'user_friends', 'user_likes'] | |
})(req, res, next); | |
}); | |
app.get('/auth/callback/facebook', (req, res, next) => { |
//Send the login button | |
botly.sendButtons({ | |
id: recipientId, | |
text: 'Please Login :)', | |
buttons: [botly.createAccountLinkButton(`https://${LOGIN_DOMAIN}/auth/facebook`)], | |
}); | |
//Listen on the account link event | |
botly.on('account_link', (sender, message, link) => { | |
//Continue conversation |
'use strict'; | |
require('dotenv').config(); | |
const express = require('express'); | |
const router = express.Router(); | |
const bodyParser = require('body-parser'); | |
const LINKED = {}; | |
const question = {}; | |
const http = require('http'); |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<div style="margin: 20px;display: block;"> | |
<canvas style="width: 600px; height: 300px" id="chart"></canvas> | |
</div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.js"></script> | |
<script> | |
var ws = new WebSocket('ws://127.0.0.1:8008/'); |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<div style="margin: 20px;display: block;"> | |
<canvas style="width: 600px; height: 300px" id="chart"></canvas> | |
</div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/1.0.2/Chart.js"></script> | |
<script> | |
var ws = new WebSocket('ws://127.0.0.1:8008/'); |