Skip to content

Instantly share code, notes, and snippets.

View IgorShcherba's full-sized avatar
🏠
Working from home

Igor Shcherba IgorShcherba

🏠
Working from home
  • callstack
  • Poland / Poznan
View GitHub Profile
@IgorShcherba
IgorShcherba / gist:5def35084874b9ac47807642d38a6aba
Created July 20, 2025 10:47
There are some recommendations for Xcode build settings that could help speeding up build time.
# 1. Build Active Architectures only
Set **Yes** for *Debug* builds and **No** for *Release*
![[Pasted image 20250720111729.png]]
# 2. Debug information format
Set **DWARF** for *Debug* (should be that by default) - this disables adding dsyms (debug symbols)
![[Pasted image 20250720114714.png]]
@IgorShcherba
IgorShcherba / what-forces-layout.md
Created March 28, 2024 09:16 — forked from paulirish/what-forces-layout.md
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
@IgorShcherba
IgorShcherba / download-old-chrome-versions.md
Created January 22, 2024 15:48 — forked from barbietunnie/download-old-chrome-versions.md
How to download old versions of Chrome

How to download old versions of Chrome

Click here to download old versions of Chrome for Linux, Mac and Windows.

The download_url field of the desired section houses the URL to the download.

Alternatively, for not too old versions, you can get it directly here.

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@IgorShcherba
IgorShcherba / yml
Created February 15, 2022 19:12
Gihub action config for automatic publishing a package to npm.js
name: Publish
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
@IgorShcherba
IgorShcherba / pull_request_template.md
Created January 31, 2022 08:07
pull request template (RN projects)

Description

Reason for change

Project root:

yarn add -D --save-exact eslint-config-airbnb eslint-config-airbnb-typescript eslint-config-prettier eslint-config-react-app eslint-import-resolver-typescript eslint-webpack-plugin eslint-plugin-flowtype eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks babel-eslint eslint-plugin-jest @typescript-eslint/parser @typescript-eslint/eslint-plugin prettier prettier-eslint prettier-eslint-cli eslint-plugin-prettier

$ vim .eslintrc

{
  "plugins": ["prettier", "@typescript-eslint"],
@IgorShcherba
IgorShcherba / es6-element-ready.js
Created December 29, 2020 09:19 — forked from jwilson8767/es6-element-ready.js
Wait for an element to exist. ES6, Promise, MutationObserver
// MIT Licensed
// Author: jwilson8767
/**
* Waits for an element satisfying selector to exist, then resolves promise with the element.
* Useful for resolving race conditions.
*
* @param selector
* @returns {Promise}
*/
@IgorShcherba
IgorShcherba / youtubeID.js
Created December 7, 2020 13:00 — forked from takien/youtubeID.js
Get YouTube ID from various YouTube URL using JavaScript
/**
* Get YouTube ID from various YouTube URL
* @author: takien
* @url: http://takien.com
* For PHP YouTube parser, go here http://takien.com/864
*/
function YouTubeGetID(url){
var ID = '';
url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/);
import { useState, useEffect, useRef } from 'react';
// Usage
function App() {
// State and setters for ...
// Search term
const [searchTerm, setSearchTerm] = useState('');
// API search results
const [results, setResults] = useState([]);
// Searching status (whether there is pending API request)