看来 jQuery 你已经用得很爽了,想学习如何自己编写插件。非常好,这篇文档正适合你。用插件和方法来扩展 jQuery 非常强大,把最聪明的功能封装到插件中可以为你及团队节省大量开发时间。
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
https://press.one/p/address/v?s=301f9556f15e9163c14c4f14ff795c299235d56b9d8bcab1980dae9426ceac4bcb08d11db7f0a8b67062414bfa09d4e7118c6775dd7fbf99c10615d99325b8d71&h=4de445fe2b6a67f0c0f714e6c3c6ed6743eff06094d8f53f89f3bac59af40774&a=68165c79baabc969f65c36a1ba0f2485bf401f4a&f=P1&v=2 |
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
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
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
# 一个 tab 转为两个空格 | |
tabToTwoSpaces() { | |
find . -name '*.js' | grep -v 'node_modules\|build' | awk '{print $1}' | xargs sed -i '' $'s/\t/ /g' | |
} | |
# 四个空格转换为两个空格。 | |
FourSpacesToTwoSpaces() { | |
# sed -i '' -e $'s/ /\t/g' -e $'s/\t/ /g' filename.js | |
find . -name '*.js' | grep -v 'node_modules' | awk '{print $1}' | xargs sed -i '' -e $'s/ /\t/g' -e $'s/\t/ /g' | |
} |