Skip to content

Instantly share code, notes, and snippets.

View simbathesailor's full-sized avatar
🎯
Focusing

Anil Kumar Chaudhary simbathesailor

🎯
Focusing
View GitHub Profile
const bypass = [
// function names to avoid logging
];
const collapsed = [
// function names to groupCollapsed
];
module.exports = function(babel) {
const { types: t } = babel;
const wrapFunctionBody = babel.template(`{

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals

@bvaughn
bvaughn / eager-prefetching-async-data-example.js
Last active November 30, 2022 21:16
Advanced example for eagerly prefetching async data in a React component.
// This is an advanced example! It is not intended for use in application code.
// Libraries like Relay may make use of this technique to save some time on low-end mobile devices.
// Most components should just initiate async requests in componentDidMount.
class ExampleComponent extends React.Component {
_hasUnmounted = false;
state = {
externalData: null,
};
@rhysburnie
rhysburnie / node-or-browser.js
Last active September 21, 2023 16:13
Detect node or browser
// determine if in-browser or using node.js
// thruthy
var _nodejs = (
typeof process !== 'undefined' && process.versions && process.versions.node);
if (_nodejs) {
_nodejs = {
version: process.versions.node
};
}
@nodkz
nodkz / .babelrc.js
Last active March 25, 2024 16:16
Babel 7.0 with .babelrc.js DEPRECATED! This config was created when babel 7 was in beta
/* eslint-disable prefer-template */
const path = require('path');
const aliases = require('./aliases');
// ///////////////////////////////////////////////////////////////
// ////////////////// PLUGINS ////////////////////////////////
// ///////////////////////////////////////////////////////////////
const commonPlugins = [
@uupaa
uupaa / image.resize.in.github.flavored.markdown.md
Last active May 9, 2024 08:14
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@staltz
staltz / introrx.md
Last active May 10, 2024 12:08
The introduction to Reactive Programming you've been missing