Skip to content

Instantly share code, notes, and snippets.

<ActionsTable
columns={columnConfig}
componentsConfig={componentConfig}
selectableRows
fixedHeight={'40vh'}
singleRowSelected={onUserSelected}
data={data}
tableOptions={{
tableTitle: true,
search: true,
//Click first close span
const possibleText = ['CLose', 'Dismiss', 'Close', 'I agree'];
const possibleTags = ['span', 'button', 'a'];
const findAndClick = tag => {
Array.from(
document.querySelectorAll(tag)
).find(item => {
let found = false;
possibleText.forEach(text => {
@chrislaughlin
chrislaughlin / test.jsx
Created August 1, 2018 11:36
Allow text selection
<div
onClick={event => {
if (document.getSelection() === '') {
event.stopPropigation();
}
}
>
text
</div>
@chrislaughlin
chrislaughlin / Theres-no-Imposters-Here.md
Last active September 3, 2018 21:00
#ReactiveConf 2018: Lighting Talk Submission

https://reactiveconf.com/

This is a proposal for a lightning talk at Reactive Conf. Please 🌟 this gist to push the proposal! If you're on your phone, please request the 🖥 desktop site to star this gist 😇 #ReactiveConf

There’s no Imposters Here

The google trend for imposter syndrome took a spike in December 2014, it wasn’t until mid 2017 that the topic reached peek in the tech industry. It is an indiscriminate force that affects all people in tech. Fueled by the constant bombardment of blog posts, tweets and new advancements in technology. Imposter syndrome can haunt someone throughout their career.

However “there are no imposters here” The tech community is actively working to remove barriers and provide inclusion for all. In these times we need to identify and stop imposter syndrome.

@chrislaughlin
chrislaughlin / Top-5-Chrome-Developer-Tools-Features.md
Last active October 3, 2018 06:44
#ReactiveConf 2018: Lighting Talk Submission

This is a proposal for a lightning talk at Reactive Conf. Please 🌟 this gist to push the proposal! If you're on your phone, please request the 🖥 desktop site to star this gist 😇 #ReactiveConf

#Top 5 Chrome Developer Tools Features

A quick paced look at my top 5 most used and most useful Chrome Developers Tools features. From inspecting elements to profiling applications.

const getKeyName = keyCode => {
switch (keyCode) {
case 37:
return "left";
case 38:
return "up";
case 39:
return "right";
case 40:
return "down";
function findImports (j, ast, pkg) {
return ast.find(j.ImportDeclaration, {
source: {
value: pkg
}
})
}
/**
* Detects CommonJS and import statements for the given package.
* @return true if import were found, else false
let testArray = Array(1000000).fill().map((_, i) => i * i);
let testMap = new Map();
testArray.forEach(item => testMap.set(item, item));
const find = () => {
console.time('Array find');
testArray.find(val => val == 9604)
console.timeEnd('Array find');
};