Author: Edwin
-
Resize QEMU image for Openwrt
While using ext4 combine image from Openwrt website directly, you will find the openwrt system only about 100MB disk. The disk has to be resized before resize the partition and filesystem. Here is the steps you can follow. First, resize the qemu image. Reference. After Openwrt system booted up. Reference. Resize ext4 filesystem after partition…
-
SSH connection keepalive
Add these lines into you ~/.ssh/config file. It can help you send keepalive message 6 times every 30 seconds.
-
Enable backspace in VIOS command line
Log in as padmin $ oem_setup_env # echo “export ENV=/home/padmin/.kshrc” >> /home/padmin/.profile # echo “export HOST=\”\$(/usr/bin/uname -n)\”\nif [ \”\`whoami\`\” = \”root\” ]; then\n PS1=\”\`whoami\`@\$HOST:\\\$PWD # \”\nelse\n PS1=\”\`whoami\`@\$HOST:\\\$PWD $ \”\nfi\n\nset -o emacs;alias -x __A=\”\$(echo ‘\\\\020’)\”; alias -x __B=\”\$(echo ‘\\\\016’)\”; alias -x __C=\”\$(echo ‘\\\\006’)\”; alias -x __D=\”\$(echo ‘\\\\002’)\”; alias -x __H=\”\$(echo ‘\\\\001’)\”; alias -x __Y=\”\$(echo ‘\\\\005’)\”\n” >>…
-
OS X Terminal: -bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory
Uncheck the box “Set locale variables automatically” in iTerm2 under Preferences -> Profiles -> Terminal
-
Build docker for OpenPOWER (ppc64le)
It’s a nightmare if you have a unsupported arch while building tools. I have tried to build docker for RHEL/CentOS, Ubuntu for ppc64le. It took me lots of time. Fortunately, from 1.10, docker will support arch ppc64le officially. ppc64le will be the default arch for OpenPOWER system. As of now, docker code is still in…
-
Linux 下安装识别 Marvell 88SE91xx 硬盘
88SE91xx 可以使用 AHCI 驱动,但是默认 Linux 无法识别 88SE91xx 需要手动添加到 AHCI 列表中。方法如下。 首先获得到 88SE91xx 的 Vendor ID 和 Device ID $ lspci -nnk | grep Marvell 04:00.0 RAID bus controller [0104]: Marvell Technology Group Ltd. 88SE9172 SATA III 6Gb/s RAID Controller [1b4b:9192] (rev 11) 使 AHCI 识别 $ /bin/echo 1b4b 9192 > /sys/bus/pci/drivers/ahci/new_id 这样就能识别到在 88SE91xx 上的硬盘了。
-
强制 VMware vSphere Client 语言以英文运行
步骤: 右击 vSphere Client 图标 选择 “快捷方式” 选项卡,在目标后加上 “-locale en_US” 确定退出 使用更改后的快捷方式打开 vSphere Client
-
fatal error: Python.h: No such file or directory
root@raspberrypi ~/tools/RPi.GPIO-0.5.2a # python setup.py install running install Checking .pth file support in /usr/local/lib/python2.7/dist-packages/ /usr/bin/python -E -c pass TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files running bdist_egg running egg_info writing RPi.GPIO.egg-info/PKG-INFO writing top-level names to RPi.GPIO.egg-info/top_level.txt writing dependency_links to RPi.GPIO.egg-info/dependency_links.txt reading manifest file ‘RPi.GPIO.egg-info/SOURCES.txt’ reading manifest template ‘MANIFEST.in’ writing manifest file ‘RPi.GPIO.egg-info/SOURCES.txt’ installing library…
-
判断 Python 模块是否安装
在不加载 module 的情况下判断 module 是否已安装 import imp class checkModule: def check_psutil(self): try: imp.find_module(‘psutil’) found = True except ImportError: found = False if not found: raise AssertionError(‘Module psutil is not installed.’) else: print(‘Module psutil is installed.’)