This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################ | |
# # | |
# ------- Useful Docker Aliases -------- # | |
# # | |
# # Installation : # | |
# copy/paste these lines into your .bashrc or .zshrc file or just # | |
# type the following in your current shell to try it out: # | |
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash | |
# # | |
# # Usage: # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 利用ES6 Set去重 (ES6中最常用) | |
function unique (arr) { | |
return [...new Set(arr)] | |
return Array.from(new Set(arr)) | |
} | |
# 利用for嵌套for,然后splice去重(ES5中最常用) | |
function unique(arr){ | |
for(var i=0; i<arr.length; i++){ | |
for(var j=i+1; j<arr.length; j++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tap "homebrew/bundle" | |
tap "homebrew/cask" | |
tap "homebrew/cask-drivers" | |
tap "homebrew/cask-fonts" | |
tap "homebrew/core" | |
tap "homebrew/services" | |
tap "romkatv/powerlevel10k" | |
# Shell extension to jump to frequently used directories | |
brew "autojump" | |
# Utilities for the ext2, ext3, and ext4 file systems |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo xattr -d com.apple.quarantine /Applications/xxxx.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 受控组件 | |
function ControlledInput({ | |
callback, | |
type = 'text', | |
disabled = false, | |
readOnly = false, | |
defaultValue, | |
placeholder = '' | |
}) { | |
const [value, setValue] = React.useState(defaultValue); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.tiles { | |
width: 900px; | |
font-size: 0; | |
} | |
.tile { | |
width: calc(900px / 3); | |
display: inline-block; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
export default class FormText extends Component { | |
render() { | |
const { value, formatMethod = a => a, className, ...resetProps } = this.props; | |
return <span className={typeof className === 'function' ? className(value) : className}{...resetProps}>{formatMethod(value) || '-'}</span>; | |
} | |
} |