Skip to content

Instantly share code, notes, and snippets.

View koox00's full-sized avatar
🔥
┻━┻ ︵└(՞▽՞ └)

Kyriakos Z. koox00

🔥
┻━┻ ︵└(՞▽՞ └)
View GitHub Profile
@sebmarkbage
sebmarkbage / The Rules.md
Last active May 7, 2024 15:01
The Rules of React

The Rules of React

All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.

What Functions Are "Pure"?

A number of methods in React are assumed to be "pure".

On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.

@ldong
ldong / download_egghead_videos.md
Last active December 7, 2023 16:16
download egghead videos

Download videos from egghead

Go to the egghead website, i.e. Building a React.js App

run

$.each($('h4 a'), function(index, video){
  console.log(video.href);
});
@gaearon
gaearon / sroll_on_drag.js
Created October 24, 2014 16:47
Scroll on drag with react-dnd
configureDragDrop(registerType) {
var imageThreshold = Math.max(120, window.innerHeight / 4),
sectionThreshold = Math.max(140, window.innerHeight / 4),
currentDY = 0,
frame;
function makeScrollingHandler(threshold) {
function getScrollDY(clientY) {
var speed;
if (clientY < threshold) {
@aczietlow
aczietlow / selenium-php-webdriver-cheatsheet.md
Last active March 6, 2024 22:48 — forked from huangzhichong/selenium-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

@pascalpoitras
pascalpoitras / config.md
Last active May 9, 2024 10:08
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@mislav
mislav / _readme.md
Last active March 28, 2024 00:47
tmux-vim integration to transparently switch between tmux panes and vim split windows

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work: