This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
{ | |
"firestore": { | |
"rules": "firestore.rules", | |
"indexes": "firestore.indexes.json" | |
}, | |
"emulators": { | |
"firestore": { | |
"port": 8080 | |
} | |
} |
import java.util.Scanner; | |
public class TicTacToe { | |
public static int getValidInt(String prompt) { | |
Scanner in = new Scanner(System.in); | |
while(true) | |
{ | |
System.out.print(prompt); |
// just an example. A cleaner way is to wrap the showLine-stuff in a dedicated component | |
<template> | |
<div> | |
<my-line v-if="showLine" :data="lineData" :options="options"> | |
</div> | |
</template> | |
<script> | |
export default { | |
data () { |
/* chatbots.js */ | |
// […] | |
// listener that handles incoming messages | |
slackController.hears(['.*'], ['direct_message', 'direct_mention'], (bot, message) => { | |
// pass the slack message to IBM Watson's Conversation | |
Conversation.sendMessage(String(message.text), undefined) | |
.then(response => { | |
slackController.log('Response from Watson received'); |
/* chatbots.js */ | |
const Botkit = require('botkit'); | |
const Conversation = require('./conversation'); // this is new | |
const slack_token = process.env.SLACK_TOKEN; | |
const slack_oauth = process.env.SLACK_OAUTH; | |
exports.fn = { | |
/** | |
* Starts Slack-Bot | |
* |
/* conversation.js */ | |
const ConversationV1 = require('watson-developer-cloud/conversation/v1'); | |
// new instance of Conversation | |
const conversation = new ConversationV1({ | |
username: process.env.CONVERSATION_USERNAME, | |
password: process.env.CONVERSATION_PASSWORD, | |
version_date: ConversationV1.VERSION_DATE_2017_02_03 | |
}); | |
/** |
/* chatbots.js */ | |
const Botkit = require('botkit'); | |
// use the tokens you got from the previous step | |
const slack_token = process.env.SLACK_TOKEN; | |
const slack_oauth = process.env.SLACK_OAUTH; | |
exports.fn = { | |
/** | |
* Starts Slack-Bot | |
* |
/* server.js */ | |
const express = require('express'); | |
const app = express(); | |
const port = process.env.PORT || 4205; | |
const router = express.Router(); | |
// start server | |
app.listen(port, function (req, res) { | |
console.info(`Started Express server on port ${port}`) | |
}); |
… | |
“scripts”: { | |
“start”: “node index.js”, | |
“deploy-to-now”: “now -e SALUTATION=@salutation” | |
}, | |
… |