Skip to content

Instantly share code, notes, and snippets.

View kena0ki's full-sized avatar
🐢

Ken Aoki kena0ki

🐢
View GitHub Profile
@uupaa
uupaa / nginx.conf
Last active February 28, 2023 09:29
nginx: Avoid CORS and reverse proxy settings
http {
server {
listen 8080;
server_name localhost;
charset UTF-8;
# Avoid CORS and reverse proxy settings
# [1] xhr request: http://localhost:8080/api/xxx/yyy/zzz
# [2] /api/xxx/yyy/zzz
# [3] http://your-dev-server.example.com/api/xxx/yyy/zzz
@paulirish
paulirish / what-forces-layout.md
Last active July 22, 2024 06:32
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@misraX
misraX / macOS Installing Vim From Source.md
Last active April 2, 2020 01:19
macOS Installing Vim From Source With Python3, Python2 and Ruby Support.

README file guides to install latest vim with python2, python3 and ruby using official source installers:

These methods have been tested in macOS sierra 10.12.6 and will likely not fail in most macOS new releases.

Tested with:

  • xcode-select version 2347.
  • Python 3.6.2.
  • Python 2.7.14.
  • VIM - Vi IMproved 8.0.