Skip to content

Instantly share code, notes, and snippets.

View xavxyz's full-sized avatar
🎋
growing flex

Xavier Cazalot xavxyz

🎋
growing flex
View GitHub Profile
@sjoerdvisscher
sjoerdvisscher / slackbot.js
Last active August 18, 2017 15:59
Create Slack bots with Meteor!
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:" : "")
})
}}

Three Days of the Good Parts

Douglas Crockford

Frontend Masters - December 2015

Schedule

The First Day

  • Programming Style and Your Brain
  • And Then There Was JavaScript
@bendc
bendc / easing.css
Created September 23, 2016 04:12
Easing CSS variables
: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);
@SachaG
SachaG / nova-users-apollo-migration.js
Last active June 8, 2017 15:12 — forked from xavxyz/nova-users-apollo-migration.js
Migration script for Nova Users to run server-side: from user.telescope.settingX to user.__settingX (without removing user.telescope.settingX for backward compatibility)
// 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';
@andrewliebchen
andrewliebchen / app.coffee
Last active February 4, 2018 13:08
React-style state machine for Framer
{ 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 =
@kitten
kitten / reactiveconf-sc-cfp.md
Last active November 17, 2020 15:06
ReactiveConf 2017 Lightning Talk CFP: With styled-components into the future

styled-components Logo

With styled-components into the future

Preprocessing is dead, long live preprocessing!


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

@bendc
bendc / raf-boilerplate.js
Created August 28, 2017 13:52
rAF tutorial: boilerplate code
"use strict";
// animation utils
// ===============
const trackTime = id => {
const [entry] = performance.getEntriesByName(id);
if (!entry) {
performance.mark(id);
@busypeoples
busypeoples / Flow_Chapter_One.md
Last active July 11, 2018 10:23
Chapter 1: Using Flow

Back To The Basics

Chapter 1: Using Flow

Introduction

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.