Skip to content

Instantly share code, notes, and snippets.

View kkemple's full-sized avatar

Kurt Kemple kkemple

View GitHub Profile
@remy
remy / _readme.md
Last active February 4, 2016 17:07
gist cli helper

Gist cli helper

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)
@staltz
staltz / cycle-bmi.coffee
Created March 3, 2016 15:32
Cycle.js example in CoffeeScript
{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')
@tj
tj / update.js
Last active April 29, 2023 14:53
shouldComponentUpdate utility
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' ]
@mxstbr
mxstbr / README.md
Last active September 1, 2017 02:02
Syntax highlighting ESNext (inc. JSX) for Keynote presentations

Syntax Highlighting ESNext (inc. JSX)

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! 🎉

@JamieMason
JamieMason / .babelrc
Created December 5, 2016 08:41
Tree-Shaking with Babel 6, Webpack 2, and React.
{
"presets": [
["es2015", {
"es2015": {
"loose": true,
"modules": false
}
}], "react"
]
}
@jevakallio
jevakallio / reactiveconf-slam-poetry.md
Last active July 7, 2021 19:57
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

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:
@jbaxleyiii
jbaxleyiii / heighliner.js
Last active May 4, 2017 22:44
Heighliner [Functional GraphQL Server Framework]
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
@lelandrichardson
lelandrichardson / react-native.js
Last active July 21, 2022 17:56
React Native flow types
declare var __DEV__: boolean;
declare module 'react-native' {
declare type Color = string | number;
declare type Transform =
{ perspective: number } |
{ scale: number } |
{ scaleX: number } |