Skip to content

Instantly share code, notes, and snippets.

View BinaryMuse's full-sized avatar
🏳️‍🌈
Just gayin' up the place the best I can

Michelle Tilley BinaryMuse

🏳️‍🌈
Just gayin' up the place the best I can
View GitHub Profile
048e49afdacdaeabec1d74cd9a2bf9021acf8f8c232d709ac7f78a40dcff3dc9060ff2e84b8e7465fa11b94ddd0b5f572c4e5b15073c42205077bc25a4025777b6 jordemort
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
body, html {
padding: 0;
margin: 0;
width: 100%;

bump-package-dep

Automatically sets and commits appropriate versions of package dependencies for Atom based on current package.json values.

Example

Here, Atom is bundling tree-view v0.215.3, but we have v0.216.0 as the current version in tree-view's package.json:

$ jq '.packageDependencies."tree-view"' package.json
@BinaryMuse
BinaryMuse / index.js
Created July 23, 2017 03:24
requirebin sketch
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 December 31, 2016 08:26 — forked from markerikson/appEntryPoint.js
Webpack React/Redux Hot Module Reloading (HMR) example
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 September 7, 2016 03:34
requirebin sketch
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
}
@BinaryMuse
BinaryMuse / keybase.md
Created July 29, 2016 20:53
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:

#!/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 March 24, 2016 02:45 — forked from evancz/Architecture.md
Ideas and guidelines for architecting larger applications in Elm to be modular and extensible

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
@BinaryMuse
BinaryMuse / new-pane-commands.js
Created March 17, 2016 05:13
New Atom Pane Commands
// 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'