Skip to content

Instantly share code, notes, and snippets.

Joe Maddalone joemaddalone

Block or report user

Report or block joemaddalone

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
View gist:d0f422f57e02ccdfc5b485b7553e4dc3
const Map = ({list, key, children}) => {
const child = React.Children.only(children);
const Item = child.type;
return list.map((item, index) => {
const keyed = Object.assign({key: item[key] || index}, item)
return React.createElement(Item, keyed);
})
};
View gist:55513f115ef315af58ccf6987d283a7b
/***********************************/
/******* react.createElement *******/
/***********************************/
Item -> rc -> div -> hello world
Item props
Items -> shapes
clean index.html
move to index.js
View vscode-settings.json
{
"editor.snippetSuggestions": "top",
"editor.insertSpaces": false,
"editor.minimap.enabled": false,
"editor.hideCursorInOverviewRuler": true,
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"workbench.colorTheme": "Afterglow",
"window.zoomLevel": 2,
"workbench.iconTheme": "vs-seti",
View vscode-snippets.json
{
"htmli": {
"prefix": "htmli",
"body": "<link rel=\"import\" href=\"$0\" />",
"description": ""
},
"wat": {
"prefix": "wat",
"body": "attachedCallback(){\n\t$0\n}",
"description": ""
View setup.md

index.html

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Setup</title>
</head>
<body>
  <div id="app"></div>
View gist:745a1af65f895e774e4a
## Redo & add to React Fundamentals:
* https://egghead.io/lessons/react-static-methods
* https://egghead.io/lessons/react-custom-proptype-validation
* https://egghead.io/lessons/react-contexts
* https://egghead.io/lessons/react-react-synthetic-event-system
* https://egghead.io/lessons/react-dom-event-listeners-in-a-react-component
## Kill
* https://egghead.io/lessons/react-what-s-new-and-different-in-react-v0-12-0
@joemaddalone
joemaddalone / filltextGist
Last active Sep 6, 2017
gist example for filltext.com
View filltextGist
{
"rows" : "!",
"id" : "{index}",
"active" : "{bool}",
"fname" : "{firstName}",
"lname" : "{lastName}",
"category" : "[13,16,19,21]",
"tel" : "{phone}",
"address" : "{addressObject}",
"cc" : "{ccObject}",
View cg-animation
# CG #
> #### Overall Issues: ####
* Performance on lower powered devices when animating & retrieving data in parallel.
* Intercept route changes, navigate + trigger: false
* identify end state as next view's initial state
* Possible library http://ricostacruz.com/jquery.transit/
* Add explorer viewstate to Session variable
* Can *n* number of genes be shown at the same time with current drawing utils?
@joemaddalone
joemaddalone / abbrevify
Created Mar 22, 2014
find unique abbreviations from array... did not end up needing or completing this, but might be useful later
View abbrevify
function abbevify(items,targetLength,pos,obj){
var obj = obj || {},
pos = pos || 1,
arr = items.slice(0),
t = arr[0].substring(0, pos)
if(!obj[t]){
obj[t] = arr.shift();
pos=1
}
You can’t perform that action at this time.