- Homebrew should be installed (Command line tools for Xcode are included).
- Install
nvmvia Homebrew
| 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 |
nvm via Homebrew#Oh My Zsh - Git Cheat Sheet
g – git
gst – git status
gl – git pull
gup – git pull --rebase
This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x
The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/
| #!/bin/bash | |
| if [ "$#" -ne "1" ]; then | |
| echo "Usage: $0 package_list" | |
| exit 1 | |
| fi | |
| cat $1 | xargs -I {} bash -c "echo {}; brew deps {}" | sort | uniq > /tmp/brew_keep | |
| comm -23 <(brew list -1 | sort) <(cat /tmp/brew_keep) > /tmp/brew_rm | |
| lines=$(cat /tmp/brew_rm | wc -l | sed -e 's/ //g') |
| //Map Collect function | |
| // Since the builtin map-merge function in Sass only take 2 arguments, it can only merge 2 maps at a time. | |
| // The map-collect function below allows you to combine multiple maps together in a cleaner way. | |
| @function map-collect($maps...) { | |
| $collection: (); | |
| @each $map in $maps { | |
| $collection: map-merge($collection, $map); | |
| } |
| #!/bin/sh | |
| # | |
| # list the given file's filesize next to each commit | |
| # usage: git-fs-history path/to/file | |
| # | |
| if [ $# -ne 1 ]; then | |
| echo "Error: invalid number of arguments." | |
| exit 1 |
| # Pass the env-vars to MYCOMMAND | |
| eval $(egrep -v '^#' .env | xargs) MYCOMMAND | |
| # … or ... | |
| # Export the vars in .env into your shell: | |
| export $(egrep -v '^#' .env | xargs) |