Skip to content

Instantly share code, notes, and snippets.

convert -dispose background -delay 7 -page +0+0 source-*.png -loop 0 target.gif
@linclark
linclark / gist:6874840b6fc8a2828c4e4263351fce2e
Created November 11, 2016 19:46
virtual-dom-step-by-step: ReactDOM.render
const element = React.createElement(List, {});
const container = document.getElementById("app");
ReactDOM.render(element, container);
#![feature(link_args)]
#[link_args = "-s EXPORTED_FUNCTIONS=['_hello_world']"]
extern {}
extern crate semver;
use semver::Version;
use semver::VersionReq;
data:text/html;charset=utf-8,<div id="test">test</div><script>document.getElementById("test").addEventListener("click", function( event ) {event.target.innerHTML = "click count: " + event.detail; console.log(event)}, false);</script>
@linclark
linclark / current.html
Last active May 12, 2016 15:05
HTML output by grip rep
<span class="objectBox objectBox-object" role="presentation">
<span class="objectLeftBrace" role="presentation">{</span>
<span>
<span class="nodeName">objProp</span>
<span class="objectEqual" role="presentation">: </span>
<span class="objectBox objectBox-object" role="presentation">
<span class="objectTitle"></span>
<span class="objectLeftBrace" role="presentation">{</span>
<span>
<span class="nodeName">type</span>
diff --git a/app/ui/browser/index.jsx b/app/ui/browser/index.jsx
index 4ab9a68..e2a5972 100644
--- a/app/ui/browser/index.jsx
+++ b/app/ui/browser/index.jsx
@@ -20,6 +20,10 @@ import configureStore from './store/store';
import rootReducer from './reducers';
import Immutable from 'immutable';
+import * as actions from './actions/main-actions';
+
module.exports = {
entry: '...',
output: {...},
externals: {
react: "React"
}
}
{
"name": "...",
"version": "...",
"browserify": {
"transform": [ "browserify-shim" ]
},
"browserify-shim": {
"angular": "global:angular"
}
}
// This function is called immediately. The second function is passed in
// as the factory parameter to this function.
(function (factory) {
// If there is a variable named module and it has an exports property,
// then we're working in a Node-like environment. Use require to load
// the jQuery object that the module system is using and pass it in.
if(typeof module === "object" && typeof module.exports === "object") {
factory(require("jquery"), window, document);
}
// Otherwise, we're working in a browser, so just pass in the global
@linclark
linclark / package.json
Created February 24, 2015 17:34
package.json for using-jquery-plugins-global
{
"name": "using-jquery-plugins-global",
"version": "1.0.0",
"dependencies": {
"jquery": "^2.1.3",
"tipso": "^1.0.2"
},
"browser": {
"tipso": "./node_modules/tipso/src/tipso.js"
},