Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
coding

leon vcfvct

👨‍💻
coding
View GitHub Profile
@armw4
armw4 / redux-is-smarter-than-you-think.md
Last active Jun 19, 2021
Optimizing your react components via redux....shouldComponentUpdate for free and more...
View redux-is-smarter-than-you-think.md

The Beginning

Yes...it's true...redux is smart....smarter than you even know. It really does want to help you. It strives to be sane and easy to reason about. With that being said, redux gives you optimizations for free that you probably were completely unaware of.

connect()

connect is the most important thing in redux land IMO. This is where you tie the knot between redux and your underlying components. You usually take state and propogate it down your component hiearchy in the form of props. From there, presentational

View surfingkeys_settings_with_vivaldi_keyboard_shortcut_precedence.js
//▔▔▔▔▔▔▔▔▔▔
// ➤ NOTES
//▁▁▁
//
//
// Vivaldi keyboard shortcuts are preferred when they need to:
// ● work on browser chrome windows :- always available
// ● happen in an independent process, not blocked by page events :- faster, snappier
//
// Surfingkeys keyboard shortcuts are preferred otherwise as they:
View base.component.ts
import { OnDestroy } from '@angular/core';
import { Subject } from 'rxjs/Subject';
export abstract class BaseComponent implements OnDestroy {
protected destroyed$: Subject<boolean> = new Subject();
protected constructor() {}
ngOnDestroy(): void {
@emraher
emraher / SurfingkeysDraculaThemeAttempt.txt
Last active Aug 22, 2021
Surfingkeys Dracula Theme Attempt
View SurfingkeysDraculaThemeAttempt.txt
// -----------------------------------------------------------------------------------------------------------------------
// // Surfingkeys: https://github.com/brookhong/Surfingkeys#properties-list
// // Dracula Theme: https://github.com/dracula/dracula-theme#color-palette
// -----------------------------------------------------------------------------------------------------------------------
// Map Keys
// -----------------------------------------------------------------------------------------------------------------------
unmap('ox');
unmap('oh');
unmap('om');
unmap('on');
@y9c
y9c / surfingkeys_config.js
Last active Dec 30, 2021
surfingkeys_config.js
View surfingkeys_config.js
/*************************************************************
* File Name : surfingkeys_config.js
* Created By : Ye Chang
* Creation Date : [2017-12-22 21:55]
* Last Modified : [2021-03-24 13:35]
* Description :
**************************************************************/
// -----------------------------------------------------------------------------------------------------------------------
// - Surfingkeys: https://github.com/brookhong/Surfingkeys#properties-list
View Jenkinsfile VIM syntax highlighting
Jenkinsfile VIM syntax highlighting
echo 'au BufNewFile,BufRead Jenkinsfile setf groovy' >> ~/.vimrc
@SalahHamza
SalahHamza / install_ngrok.md
Last active Jun 12, 2022
How to install ngrok on linux subsystem for windows
View install_ngrok.md
@necojackarc
necojackarc / Set up Vim with clipboard on Ubuntu on WSL2.md
Last active Jul 1, 2022
Set up Vim on Ubuntu on Windows Subsystem for Linux 2 (WSL2) to share clipboard
View Set up Vim with clipboard on Ubuntu on WSL2.md

This explains how to set up Vim on Ubuntu 18.04 on Windows Subsystem for Linux 2 (WSL2) in order to share the clipboard between Windows and Ubuntu.

Environments

  • Windows 10 Home
  • Ubuntu 18.04 on Windows Subsystem for Linux 2 (WSL2)

Steps

  1. Build Vim with the clipboard option enabled
  2. Set up VcXsrv Windows X Server