Skip to content

Instantly share code, notes, and snippets.

🐔
Chicken chicken

Ivan Akulov iamakulov

🐔
Chicken chicken
Block or report user

Report or block iamakulov

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
@iamakulov
iamakulov / index.md
Last active Jun 20, 2019
What you should (and shouldn’t) enable in Cloudflare for web performance
View index.md

What you should (and shouldn’t) enable in Cloudflare for web performance

Cloudflare is a web-performance-and-security-as-a-service company.

To configure your web app to run faster, you need to:

  • sign up for Cloudflare
  • connect it to your site (by moving DNS records and setting up proxying)
  • enable a few toggles in the settings.
View keybase.md

Keybase proof

I hereby claim:

  • I am iamakulov on github.
  • I am iamakulov (https://keybase.io/iamakulov) on keybase.
  • I have a public key ASB2dHz9Wm6YtJySDOi9D6Ir6PGiWzLdvreB2cru45lWJQo

To claim this, I am signing this object:

@iamakulov
iamakulov / index.md
Last active Jul 13, 2018
Куда инвестировать валюту в Беларуси
View index.md

(Для канала про бизнес: @iamakulov_learning_biz)

1. Депозиты

Депозиты. Доходность на февраль 2018 года — 1...2% годовых. Это примерно равно или ниже инфляции доллара. Вклады чаще неотзывные (то есть забрать просто так не получится). На короткие вклады процент меньше, плюс нужно платить подоходный налог (если вклад до двух лет).

2. Облигации Беларуси в иностранной валюте

На примере выпуска №244:

@iamakulov
iamakulov / passive-true-analysis.md
Last active May 23, 2019
Analysis of passive: true
View passive-true-analysis.md

Analysis of passive: true

In 2017, Chrome, Firefox and Safari added support for passive event listeners. They help to make scrolling work smoother and are enabled by passing {passive: true} into addEventListener().

The explainer mentions that passive: true works for wheel and touch events. I practically analyzed when passive: true actually helps:

Event Works better with passive: true Is passive by default
wheel¹ Yes (Chrome), No (Firefox) No (Chrome), No (Firefox)
touchstart Yes (Chrome), ?² (Firefox) Yes (Chrome), ?² (Firefox)
@iamakulov
iamakulov / test.js
Last active Jun 23, 2017 — forked from tricoder42/bundle.js
Removing development files from bundle (using NormalModuleReplacementPlugin)
View test.js
// This import should be dropped in production,
// because it's very large and contains development data
// (like locales for all languages).
import load from './very.large'
export const main = () => {
let data = {}
if (process.env.NODE_ENV !== 'development') {
data = load()
@iamakulov
iamakulov / index.md
Last active Sep 26, 2019
Webpack’s ContextReplacementPlugin examples
View index.md
@iamakulov
iamakulov / index.md
Last active May 23, 2019
Imports and webpack contexts
View index.md
@iamakulov
iamakulov / index.md
Last active Feb 2, 2018
Fixing babel-plugin-add-module-exports in Webpack 2
View index.md

babel-plugin-add-module-exports generates an incorrect bundle if you use ES modules in the latest versions of Webpack 2 (at least in 2.1.0-beta.27 and .28). Here’s what to do.

1. Remove the plugin:

{
  "plugins": [
-   "add-module-exports"
  ]
}
@iamakulov
iamakulov / index.js
Last active Dec 13, 2016
Webpack’s externals work with local paths too
View index.js
// my-app/webpack.config.js
{
externals: {
'jquery': 'jQuery',
/* ↑ With this line, Webpack will replace every
* import $ from 'jquery';
*
* in your code with approximately
* const $ = window.jQuery;
*
You can’t perform that action at this time.