Skip to content

Instantly share code, notes, and snippets.

View russll's full-sized avatar
🎯
Focusing

Ruslan russll

🎯
Focusing
  • UAE, Dubai
View GitHub Profile
@russll
russll / what-forces-layout.md
Created November 13, 2023 22:44 — 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
Generate a Tarot reading with three cards from Major and Minor Arcana. Use the following steps:
1. Pick a random number between 1 and 78, and write it on the first line in the following format: Card 1: #[insert random number] - [insert name of the name of the tarot card that corresponds to that number, as listed in the Tarot card number reference]. On a new line, provide a brief explanation of the card's meaning.
2. Pick a random number between 1 and 78, and write it on the first line in the following format: Card 2: #[insert random number] - [insert name of the name of the tarot card that corresponds to that number, as listed in the Tarot card number reference]. On a new line, provide a brief explanation of the card's meaning.
3. Pick a random number between 1 and 78, and write it on the first line in the following format: Card 3: #[insert random number] - [insert name of the name of the tarot card that corresponds to that number, as listed in the Tarot card number reference]. On a new line, provide a bri
@russll
russll / chatgpt-prompt-gen.txt
Created March 14, 2023 11:05 — forked from solrevdev/chatgpt-prompt-gen.txt
A chat gpt prompt generator
I want you to become my Prompt Creator.
Your goal is to help me craft the best possible prompt for my needs.
The prompt will be used by you, ChatGPT.
You will follow the following process:
1.
/**
* So here's the redux wrapper I used to solve the problem, or at least, that is
* what I think. I'm, not all to sure but maybe this will give you some insight.
*/
import React, { Component } from 'react';
import thunkMiddleware from 'redux-thunk';
import { Provider } from 'react-redux';
import { createLogger } from 'redux-logger';
import firebase from 'firebase';
import {
/// <reference path="bookshelf.d.ts" />
/// <reference path="../knex/knex.d.ts" />
/// <reference path="../node/node.d.ts" />
/// <reference path="../express/express.d.ts" />
import * as Knex from 'knex';
import * as Bookshelf from 'bookshelf';
import * as assert from 'assert';
import * as express from 'express';
@russll
russll / install.sh
Created June 15, 2017 15:14 — forked from ziadoz/install.sh
Install ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Remove existing downloads and binaries so we can start from scratch.
rm ~/google-chrome-stable_current_amd64.deb