Skip to content

Instantly share code, notes, and snippets.

🏳️‍🌈
Just gayin' up the place the best I can

Michelle Tilley BinaryMuse

🏳️‍🌈
Just gayin' up the place the best I can
Block or report user

Report or block BinaryMuse

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@BinaryMuse
BinaryMuse / index.js
Created Jul 23, 2017
requirebin sketch
View index.js
const etch = require('etch')
function toHTMLElement(vdom) {
const component = {
update() { /* noop */ },
render () { return vdom }
}
etch.initialize(component)
return component.element
@BinaryMuse
BinaryMuse / appEntryPoint.js
Created Dec 31, 2016 — forked from markerikson/appEntryPoint.js
Webpack React/Redux Hot Module Reloading (HMR) example
View appEntryPoint.js
import React from "react";
import ReactDOM from "react-dom";
import configureStore from "./store/configureStore";
const store = configureStore();
const rootEl = document.getElementById("root");
@BinaryMuse
BinaryMuse / index.js
Last active Sep 7, 2016
requirebin sketch
View index.js
var h = require('virtual-dom/h')
var diff = require('virtual-dom/diff')
var patch = require('virtual-dom/patch')
var createElement = require('virtual-dom/create-element')
function TimerWidget (amount) {
this.amount = amount
}
View keybase.md

Keybase proof

I hereby claim:

  • I am binarymuse on github.
  • I am binarymuse (https://keybase.io/binarymuse) on keybase.
  • I have a public key ASCtA8eXhfLRyncjDpXzn2w8bzhPl0oXrLITMsqGZ26BeQo

To claim this, I am signing this object:

View git-fix-remote
#!/bin/bash
set -e
origin="$1"
[ "$origin" == "" ] && echo "Please specify a remote to fix" && exit 1
regex="github.com/(.*)/(.*)(.git)?"
current_url=$(git config remote."$origin".url)
@BinaryMuse
BinaryMuse / Architecture.md
Created Mar 24, 2016 — forked from evancz/Architecture.md
Ideas and guidelines for architecting larger applications in Elm to be modular and extensible
View Architecture.md

Architecture in Elm

This document is a collection of concepts and strategies to make large Elm projects modular and extensible.

We will start by thinking about the structure of signals in our program. Broadly speaking, your application state should live in one big foldp. You will probably merge a bunch of input signals into a single stream of updates. This sounds a bit crazy at first, but it is in the same ballpark as Om or Facebook's Flux. There are a couple major benefits to having a centralized home for your application state:

  1. There is a single source of truth. Traditional approaches force you to write a decent amount of custom and error prone code to synchronize state between many different stateful components. (The state of this widget needs to be synced with the application state, which needs to be synced with some other widget, etc.) By placing all of your state in one location, you eliminate an entire class of bugs in which two components get into inconsistent states. We also think yo
View new-pane-commands.js
// Existing commands that used to be 'pane:split-*'
'pane:split-left-and-copy-active-item'
'pane:split-right-and-copy-active-item'
'pane:split-up-and-copy-active-item'
'pane:split-down-and-copy-active-item'
// New commands to create splits
'pane:split-left'
'pane:split-right'
'pane:split-up'
@BinaryMuse
BinaryMuse / complete.js
Last active Jun 13, 2019
DND: Blog Post - Staggered Animation with React Motion
View complete.js
import React from "react";
import { Motion, StaggeredMotion, spring } from "react-motion";
import { constant, range } from "lodash";
const DEG_TO_RAD = Math.PI / 180;
const MAIN_BUTTON_DIAM = 100;
const CHILD_BUTTON_DIAM = 50;
const CHILDREN_ICONS = [
"at", "linkedin", "facebook", "github", "twitter"
@BinaryMuse
BinaryMuse / README.md
Last active Jan 31, 2016
ES7 Decorator version of `LinkedStateMixin` that supports dot-separated paths
View README.md

Make your React ES6 classes LinkState aware with a decorator. Supports nested state keys by specifying the key name with dots.

@NestedValueLink
class MyComponent extends React.Component {
  constructor(...args) {
    super(...args);

    this.state = {
      path: { to: { key: "" } }
View index.coffee
_ = require("underscore");
# https://github.com/BinaryMuse/trie-hard
dictionary = require "./dictionary"
letters = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
scores = [ 1, 3, 3, 2, 1, 4, 2, 4, 1, 8, 5, 1, 3, 1, 1, 3, 10, 1, 1, 1, 1, 4, 4, 8, 4, 10]
scoresByLetter = _.object(letters, scores)
class ScrabbleGame
You can’t perform that action at this time.