Why does it make sense to use FlowType or TypeScript when working with JavaScript? A good approach in answering this question is to build a small game or application to make the benefits clear.
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
"use strict"; | |
// animation utils | |
// =============== | |
const trackTime = id => { | |
const [entry] = performance.getEntriesByName(id); | |
if (!entry) { | |
performance.mark(id); |
This is a CFP for ReactiveConf 2017's open call for Lightning talks. If you'd like to see this talk become a reality, please ⭐ star this gist. #ReactiveConf
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
{ Machine } = require 'stateMachine' | |
{ TextLayer } = require 'TextLayer' # https://github.com/awt2542/textLayer-for-Framer | |
InputModule = require 'input' # https://github.com/ajimix/Input-Framer | |
Framer.Defaults.Layer = | |
backgroundColor: null | |
color: 'black' | |
p = |
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
// Explanation: | |
// This is a migration script for your users to be compatible with the Apollo version of Nova | |
// We do not support anymore users properties on the `telescope` namespace. They will be duplicated onto __setting: | |
// Example: `user.telescope.karma` becomes `user.__karma` | |
// Note: we do not remove the `user.telescope` object, you'll still be able to go back to your previous full Meteor build if you feel that Apollo doesn't fit your needs | |
// How to use: | |
// Create a new /server directory at the root of your project then paste the script below in /server/migration.js | |
import Users from 'meteor/nova:users'; |
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
:root { | |
--ease-in-quad: cubic-bezier(.55, .085, .68, .53); | |
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19); | |
--ease-in-quart: cubic-bezier(.895, .03, .685, .22); | |
--ease-in-quint: cubic-bezier(.755, .05, .855, .06); | |
--ease-in-expo: cubic-bezier(.95, .05, .795, .035); | |
--ease-in-circ: cubic-bezier(.6, .04, .98, .335); | |
--ease-out-quad: cubic-bezier(.25, .46, .45, .94); | |
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1); |
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 slackpost(channel, name, text) { | |
HTTP.post("https://q42.slack.com/services/hooks/incoming-webhook", {"params": | |
{"token": "TODO: fill in token!", | |
"payload": JSON.stringify({ | |
"channel": "#" + channel, | |
"username": name, | |
"text": text, | |
"icon_emoji": (name.indexOf("bot") > -1 ? ":ghost:" : "") | |
}) | |
}} |