Skip to content

Instantly share code, notes, and snippets.

View devmrin's full-sized avatar
🎴
Incognito

Mrinmay Mukherjee devmrin

🎴
Incognito
View GitHub Profile
@devmrin
devmrin / styles.css
Last active June 16, 2021 17:30
Basic box shadow of choice
.class {
box-shadow: 1px 4px 8px 1px #1e1e1e6e;
}
@devmrin
devmrin / input.css
Created September 25, 2020 17:26
Basic Input Styles
border-radius: 4px;
height: 30px;
width: 300px;
outline: none;
padding: 0 10px;
box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
border: none;
import * as React from "react";
import { useMousePosition } from "~/hooks/useMousePosition";
/** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */
export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) {
const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {};
const [mouseX, mouseY] = useMousePosition();
const positions = { x, y, h, w, mouseX, mouseY };
return (
<div
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install iterm2
# update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts
brew install bash # latest version of bash
# set brew bash as default shell
brew install fortune
brew install cowsay
brew install git
@devmrin
devmrin / TouchableDebounce.js
Last active June 4, 2019 20:22
Touchable Debounce - Medium Article
import React, { PureComponent } from "react";
import { PropTypes, ViewPropTypes, TouchableOpacity } from "react-native";
import { debounce } from "underscore";
//PureComponent handles shouldComponentUpdate for you.
class TouchableDebounce extends React.PureComponent {
constructor(props) {
super(props);
}