Skip to content

Instantly share code, notes, and snippets.

View krambuhl's full-sized avatar
❤️
I love you!

Eevee Kreevee krambuhl

❤️
I love you!
  • Boogie Woogie Industrial Complex
  • Portland, Oregon
  • 20:11 (UTC -07:00)
View GitHub Profile
@krambuhl
krambuhl / elm-arch.js
Created July 30, 2016 00:52
elm'ish architecture in javascript
function Table(el) {
this.cacheElements(el);
this.defineUpdates();
// MODEL
this.state = {};
// define initial view state
this.setState({
activeRow: 0
@krambuhl
krambuhl / appleseed-component.js
Created September 28, 2016 00:07
Appleseed component template
import createComponent from 'appleseed';
const ui = ({ el }) => ({
el: el
});
const init = ({ ui }) => ({
});
// variable : type annotation
// name : ArgumentType -> ArgumentType -> ReturnType
// fnAdd : (Num, Num) -> Num
function addFn(a, b) { return a + b; }
// ex.
addFn(1, 2) === 3
import React from 'react'
import classnames from 'classnames'
import styles from './styles.css'
export default function Wrapper ({
tagName: Tag = 'div',
variant = Wrapper.shell,
className,
children,
...attrs
import React, { useEffect } from "react"
import debounce from "lodash.debounce"
const EqualHeight = ({ nodes, children }) => {
const handleResize = debounce(() => {
const currentNodes = nodes.map(node => node.current).filter(a => a)
const dimensionsList = currentNodes.map(node => {
// remove any forced sizing information
node.style.height = 'auto'
node.style.maxHeight = ''
{"lastUpload":"2020-05-14T17:43:42.428Z","extensionVersion":"v3.4.3"}