Skip to content

Instantly share code, notes, and snippets.

https://press.one/p/address/v?s=301f9556f15e9163c14c4f14ff795c299235d56b9d8bcab1980dae9426ceac4bcb08d11db7f0a8b67062414bfa09d4e7118c6775dd7fbf99c10615d99325b8d71&h=4de445fe2b6a67f0c0f714e6c3c6ed6743eff06094d8f53f89f3bac59af40774&a=68165c79baabc969f65c36a1ba0f2485bf401f4a&f=P1&v=2
@lincolnge
lincolnge / restart_bluetooth.sh
Created November 13, 2016 07:39 — forked from nicolasembleton/restart_bluetooth.sh
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@lincolnge
lincolnge / tabToSpace.sh
Last active November 10, 2016 14:04
把 tab 改成 space 的脚本
# 一个 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'
}
@lincolnge
lincolnge / jQuery-plugin-authoring.md
Created October 21, 2016 08:13 — forked from quexer/jQuery-plugin-authoring.md
如何编写 jQuery 插件

创建插件


看来 jQuery 你已经用得很爽了,想学习如何自己编写插件。非常好,这篇文档正适合你。用插件和方法来扩展 jQuery 非常强大,把最聪明的功能封装到插件中可以为你及团队节省大量开发时间。

开始