Skip to content

Instantly share code, notes, and snippets.

@shirbr510
shirbr510 / webpack.common.js
Created July 15, 2021 08:19
source-map inaccuracy reproduction (Outplayed)
const HtmlWebpackPlugin = require("html-webpack-plugin");
const packageJson = require("./package.json");
const backgroundScripts = [
// list of scripts, all origin @ ./src
];
const indexScripts = [
// list of scripts, all origin @ ./src
];
@shirbr510
shirbr510 / withComputedProps.js
Created September 9, 2020 09:27
A HOC that allows generic props mutations (just like ReactRedux.connect, but without being connected to anything)
import React from "react"
/**
* A HOC that allows generic props mutations (just like ReactRedux.connect, but without being connected to anything)
* @param WrappedComponent A React component to wrap
* @param mapPropsToProps a logic that computes new props out of existing props
* @returns A wrapped Component that has new computed props OOTB
*/
const withComputedProps = (WrappedComponent, mapPropsToProps) => props => {
let computedProps = {};
@shirbr510
shirbr510 / .gitconfig
Last active April 11, 2020 15:13
My Personal Collection of git aliases
[user]
name = Shir Brass
email = <My Email>
[credential]
helper = cache --timeout=30000
[core]
editor = vim
[alias]
@shirbr510
shirbr510 / profiles.json
Last active March 8, 2020 13:16
microsoft/terminal configuration that defaults to wsl.
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[