This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prints size of free space in localStorage | |
(1024 * 1024 * 5 - unescape(encodeURIComponent(JSON.stringify(localStorage))).length)/1024/1024 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Immutable from 'immutable'; | |
import {Record, Map} from 'immutable'; | |
import ImmutablePropTypes from 'react-immutable-proptypes'; | |
import merge from 'merge'; | |
export const PropTypes = merge(ImmutablePropTypes, React.PropTypes); | |
export function alteredRecord(...args) { | |
const methods = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import d3 from 'd3'; | |
import {responsivefy} from './lib'; | |
export default function Chart(node, options, initialData) { | |
const [width, height] = [ | |
options.width - options.margin.left - options.margin.right, | |
options.height - options.margin.top - options.margin.bottom | |
]; | |
function chart(data) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": ["es2015", "react"], | |
"plugins": [ | |
"transform-class-properties", | |
"transform-function-bind", | |
"transform-runtime", | |
"transform-object-rest-spread" | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
# Run the browser | |
if [ $(tty) == /dev/tty1 ]; then | |
xinit ./run_browser.sh | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#brew install python | |
#brew install mercurial | |
#/usr/local/bin/pip install mercurial_keyring | |
# patch from http://selenic.com/repo/hg/rev/e3a5922e18c3 | |
cat <<-EOF | patch -p2 /usr/local/Cellar/mercurial/3.8.4/lib/python2.7/site-packages/mercurial/demandimport.py | |
diff -r 8bbe208c1812 -r e3a5922e18c3 mercurial/demandimport.py | |
--- a/mercurial/demandimport.py Sat Oct 05 01:02:22 2013 +0900 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Global styles based on Reboot.css | |
* http://v4-alpha.getbootstrap.com/content/reboot/ | |
* https://github.com/twbs/bootstrap/blob/v4-dev/scss/_reboot.scss | |
*/ | |
/* | |
Reset the box-sizing | |
Change from `box-sizing: content-box` to `border-box` so that when you add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import ReactDOM from 'react-dom'; | |
/** | |
* Statefull application | |
*/ | |
class App extends Component { | |
/** | |
* Application state |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import Router from './Router'; | |
import NewDocument from './NewDocument'; | |
import DocumentsList from './DocumentsList'; | |
export default class App extends Component { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Can be used with Custom JavaScript for Websites | |
// https://chrome.google.com/webstore/detail/custom-javascript-for-web/poakhlngfciodnhlhhgnaaelnpjljija | |
// but is necessary to allow 'local URLs' in chrome://extensions/ | |
if (document.title.indexOf('Marketch') === 0) { | |
$('.artboard').on('mouseup', () => setTimeout(init, 100)); | |
} | |
function init () { | |
const $code = $('textarea[name="code"]'); |
OlderNewer