First, install the gist
command using brew install gist
, then add this to your .zshrc (or whatever).
By default this will:
- create all gists as secret (
-p
) - copy the gist url to the clipboard (
-c
) - open the browser to the gist (
-o
)
{run} = require '@cycle/core' | |
{Observable} = require 'rx' | |
{div, input, h2, makeDOMDriver} = require '@cycle/dom' | |
intent = (domSource) => | |
changeWeight$ = domSource | |
.select('#weight').events('input') | |
.map((ev) => ev.target.value) | |
changeHeight$ = domSource | |
.select('#height').events('input') |
let rows = {} | |
export default function(props = [], state = []) { | |
return function(target) { | |
const proto = Object.create(target.prototype) | |
proto.shouldComponentUpdate = function(newProps, newState) { | |
let id = (this._update_id = this._update_id || Math.random()) |
const webpack = require('webpack') | |
const path = require('path') | |
module.exports = { | |
entry: { | |
// the app bundle | |
main: path.join(__dirname, 'app.js'), | |
// the vendor bundle, white-list stuff here | |
vendor: [ 'react', 'react-dom' ] |
To get syntax highlighting for ESNext (including JSX), you need to have pygments-lexer-babylon
installed:
pip install pygments pygments-lexer-babylon
Now when you run pygmentize
on a .jsx
file it'll automatically use the new lexer! 🎉
{ | |
"presets": [ | |
["es2015", { | |
"es2015": { | |
"loose": true, | |
"modules": false | |
} | |
}], "react" | |
] | |
} |
The HIT License (HIT) | |
Copyright (c) 2017 Ken Wheeler | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
import { graphql } from "graphql"; | |
import { Schema, Type, Field, IntType, StringField } from "../schema"; | |
it("creates an executable schema", async () => { | |
// build field resolvers | |
// these will implement Functor and Semigroup (and maybe more) | |
const code = Field(IntType, ({ code }) => code); | |
const message = StringField(({ message }) => message); | |
// create a type from defined fields |
declare var __DEV__: boolean; | |
declare module 'react-native' { | |
declare type Color = string | number; | |
declare type Transform = | |
{ perspective: number } | | |
{ scale: number } | | |
{ scaleX: number } | |