- exercise in cloning facebook/dataloader without reading source
// fake api call accepting [...keys]
function getData(keys) {
return Promise.resolve(
/** | |
<div> -- track 'top' of scrollable parent | |
-- track 'scrollLeft' of container to move fixed header | |
<Table.Container> | |
<Table.Header> | |
<Table.Row> -- clone row and set 'top' and 'position: fixed' | |
<Table.HeaderCell /> -- track dimensions of original row cells | |
-- bind dimensions of cloned row cells to tracked cells | |
</Table.Row> | |
</Table.Header> |
import React, {Component} from 'react'; | |
import {Menu} from 'semantic-ui-react'; | |
import segmentize from 'segmentize'; | |
import min from 'lodash/min'; | |
import max from 'lodash/max'; | |
import p from 'prop-types'; | |
export class PaginationContainer extends Component { | |
static propTypes = { | |
render: p.func, |
import faker from "faker"; | |
import { isUndefined, times, shuffle} from "lodash"; | |
// const data = shuffle( | |
// times(10, x => ({ | |
// order: x, | |
// id: faker.internet.email(), | |
// name: faker.name.findName() | |
// })) | |
// ); |
import React, {PureComponent} from 'react'; | |
import isFunction from 'lodash/isFunction'; | |
const I18nContext = React.createContext(); | |
export const i18nDictionary = { | |
'en-US': safeTranslationAccessor({ | |
'navigation.report-issue': 'Report Issue', | |
'navigation.logout': 'Log Out', | |
'dashboard.favorites': 'Favorites', |
class AngularComponent { | |
static $inject = []; | |
constructor(...args) { | |
this.$inject = this.constructor.$inject.reduce( | |
(acc, injectName, index) => ({ | |
...acc, | |
[injectName]: args[index], | |
}), | |
{} |
const cases = (testName, ...testCases) => (test) => testCases.forEach(args=>it(testName, async () => test(...args))); | |
describe('Test Cases', () => { | |
const multiply = (x,y) => x*y; | |
cases( | |
'can multiply things...', | |
[1,2,2], | |
[2,2,4], | |
[3,3,9], |
git branch --merged | ?{-not ($_ -like "*master")} | %{git branch -d $_.trim()} | |
git branch --no-merged | ?{-not ($_ -like "*master")} | %{git branch -D $_.trim()} |
var criteria = 'remote react'; | |
var comments = document.querySelectorAll('.comment-tree .athing'); | |
[].slice.call(comments).forEach((e) => { | |
var terms = criteria.split(' '); | |
var matches = terms.every(t=>(e.innerText.match(new RegExp(t, 'gi')) || []).length) | |
if(!matches){ | |
e.style.display = 'none' | |
} | |
}) |
[ | |
"http://www.echojs.com/rss", | |
"http://blog.andyet.com/rss", | |
"http://www.2ality.com/feeds/posts/default", | |
"http://feeds.feedburner.com/addyosmani", | |
"http://blog.angularjs.org/feeds/posts/default", | |
"http://feedpress.me/iawa", | |
"http://feeds.feedburner.com/dillingerMedia", | |
"http://feeds.feedburner.com/badassjs", | |
"http://builtwithreact.io/feed.xml", |