pkg | download/week | issues | stars | comment |
---|---|---|---|---|
react-bootstrap ↗ | 235k | 62 | 17k | bootstrap 3 |
material-ui ↗ | 160k | 146 | 34k | full of bugs, speaking from experience |
antd ↗ | 64k | 174 | 26k | |
semantic-ui-react ↗ | 51k | 53 | 6.4K | |
reactstrap ↗ | 46k | 58 | 4k | bootstrap 4 |
@blueprintjs/core ↗ | 27k | 240 | 9k | splitted into multiple packages |
react-native-web ↗ | 11k | 27 | 9kk | used at twitter.com and on react-native docs (not just mobile) |
react-toolbox |
/** | |
* Calculates width of a grid element. | |
* | |
* Accepts an array of two numbers, the column size | |
* and total number of columns (respectively). | |
* | |
* Uses the total columns to determine total width, | |
* then multiplies by the column size to calculate | |
* current column width. | |
* |
This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
const waitFor = (ms) => new Promise(r => setTimeout(r, ms)) | |
const asyncForEach = async (array, callback) => { | |
for (let index = 0; index < array.length; index++) { | |
await callback(array[index], index, array) | |
} | |
} | |
const start = async () => { | |
await asyncForEach([1, 2, 3], async (num) => { | |
await waitFor(50) |
These files show one way to make the next.js "with-global-stylesheet" example work with the amazingly awesome Storybook ecosystem.
Specifically, the three files below replace the next.config.js
file, in the "with-global-stylesheet" example.
More generically, they demonstrate how to share webpack configuration extensions between next.js and Storybook.
A massive THANK YOU to tmeasday for all his help to get these working!
const randomInterval = (() => { | |
const random = (min, max) => Math.random() * (max - min) + min; | |
return (callback, min, max) => { | |
const time = { | |
start: performance.now(), | |
total: random(min, max) | |
}; | |
const tick = now => { | |
if (time.total <= now - time.start) { | |
time.start = now; |
Code spliting in webpack to help decrease loaded dependencies on load.
- UI that gets displayed as a callback from an event can benefit.
- We can async. load a ES6
import()
and code after it is returned using a promise.
// At top of file, assign an `import()` that is returned from a function.
const getBloodhound = () => import('bloodhound-js');
// Add an event that will trigger loading the module.
While attempting to explain JavaScript's reduce
method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List
is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it much simpler to think about both the old list and the new one, what they contain, and
Penetrating Testing/Assessment Workflow & other fun infosec stuff
https://github.com/jivoi/pentest
My feeble attempt to organize (in a somewhat logical fashion) the vast amount of information, tools, resources, tip and tricks surrounding penetration testing, vulnerability assessment, and information security as a whole*
- Reconnaissance
- Passive/Semi-Passive
- Tools
- Passive/Semi-Passive
- Discover - https://github.com/leebaird/discover