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
find . -type f -name '*.txt' -exec sed -i '' s/this/that/ {} + | |
find . -name "*.java" -exec sed -i "" 's/com.xxx.R/android.R/g' {} \; | |
grep -nr "@+id" * | |
find . -name "*.java" | xargs sed -i 's/com.xxx.R/android.R/g' | |
find . -name "*.xml" | xargs grep -i -n "@id/" >> output.txt |
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
repo forall -c 'git reset --hard ; git clean -fdx' |
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
rsync -abP folder1/src/ folder2/src |
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
#查看系统信息 | |
cat /etc/issue cat /proc/verison | |
top – 进程活动 | |
vmstat -系统活动、硬件及系统信息 | |
w – 显示谁已登录,他们正在做什么? | |
uptime – 告诉系统已经运行了多久? |
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
netsh wlan set hostednetwork mode=allow ssid="wifi hotspot name" key="wifi password" | |
netsh wlan start hostednetwork |
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
adb logcat -b main -b radio -b events -v time>test.log |
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
mac 硬盘测速 | |
time dd if=/dev/zero bs=1024k of=tstfile count=1024 | |
time dd if=tstfile bs=1024k of=/dev/null count=1024 | |
显示:defaults write com.apple.finder AppleShowAllFiles -bool true | |
隐藏:defaults write com.apple.finder AppleShowAllFiles -bool false |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<resources> | |
<color name="white">#FFFFFF</color><!--白色 --> | |
<color name="ivory">#FFFFF0</color><!--象牙色 --> | |
<color name="lightyellow">#FFFFE0</color><!--亮黄色 --> | |
<color name="yellow">#FFFF00</color><!--黄色 --> | |
<color name="snow">#FFFAFA</color><!--雪白色 --> | |
<color name="floralwhite">#FFFAF0</color><!--花白色 --> | |
<color name="lemonchiffon">#FFFACD</color><!--柠檬绸色 --> | |
<color name="cornsilk">#FFF8DC</color><!--米绸色 --> |
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
# 批量装文件夹下apk | |
for f in *.apk ; do adb install -r $f; done; |
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 urllib.request | |
import asyncio | |
import json | |
r = urllib.request.urlopen('https://raw.githubusercontent.com/spacelan/wechat-emoticon/master/emoticons.json').read().decode('utf8') | |
json_obj = json.loads(r) | |
@asyncio.coroutine | |
def download(todo): | |
urllib.request.urlretrieve(todo.get('url'), todo.get('md5') + '.gif') |
OlderNewer