An Open Sourced Community

September 30, 2013

Recently I shared my experiences and thoughts about open sourced community.  Here is the slide in Chinese:

http://shruby.github.io/slides/opensourcedcommunity.html

People can change their interests from time to time, also people moving. As a technical community, we should have a decentralized one, which does not heavily rely on a couple people, but a huge member bases. Motivate them to run the community.

The community is a open source one, but also open sourced. All information are available, you can get and use as you want to. We follow the open source principals and share all information we have.

I expect to have a long live community even I don’t be part of community any longer.

Advertisements

Cloned Instacne of VirtualBox can’t connect eth0

February 4, 2013

After I clone one of my instance in virtualbox, I found I can’t connect it any longer. Eventually I found a solution from internet. Here it is:

Open /lib/udev/rules.d/75-persistent-net-generator.rules
Find the line with keyword “KVM”.
Add following lines before it:

# ignore VirtualBox virtual interfaces
ATTR{address}=="08:00:27:*", GOTO="persistent_net_generator_end"

Remove /etc/udev/rules.d/70-persistent-net.rulesRestart box.

You’d better to make this change in “master” box, so each time, you get a properly cloned one.

Reference:

https://www.virtualbox.org/ticket/660

如何让Mac Book只使用外接显示器

June 2, 2011

最近有几个同事都在咨询我这个问题,他们的MacBook连接外部显示器没有问题,但是无法单独使用外部显示器。我稍做了一下Research找到了一个比较合适的办法。

1,插上外置显示器。

2,显示器模式选为镜像(mirror)[貌似可以不选]

3,合上笔记本的上盖(进入休眠状态)

4,插入键盘鼠标,笔记本将被唤醒。或者按一下鼠标或者键盘。

外部显示器的分辨度将得到刷新,只有一个显示器了,而且屏幕是合上的,不过貌似这样对我MB240的散热不算太好,因为风口在转轴处。

DIY : How to fix Olympus E-510 power switch

March 5, 2011

It’s a personal English translation from my previous Chinese blog, I just keep it short and dedicated for DIY hacker.

Olympus E-510 was one of best DSLR with great ROI. Small size and full features for different purposes.

Tools

  • Phillips Screwdriver PH #0 ( I have two)
  • Taps to keep tiny screws in order
  • Pen to organize screws with marks

For Olympus E-510, it was really common, you met power switch issue after 1 to 2 years, my is on 1.5 years. You will find the machine will auto power off and on in some cases, but after one or two months. You will hardly use it since it will turn off once you open it. The root cause is power switch, some dust or oxide will cover the PCB to make power switch out of work. You can ask Olympus services to fix it, it usually cost you more than hundred bucks(no more than 200 I guess).

You need to open the E-510 by yourself. There are two major parts from E-510 body, Back part and Top part.

1. Open Back part

20110305_001_thumb

2 Open Top part

There are two screws under the back cover, there one on the left (in black)

20110305_008_thumb

And one on the right (in silver, had been removed before I took the picture).

20110305_003_thumb

Then you have your top off.

20110305_005_thumb

There are 5 others in silver need to be removed. Notice there are two special one, one on the left to connect with inner body I mentioned before. The other on the right side which has a small copper part. For these two, don’t miss then!

20110305_006_thumb

For E-510, you can’t turn over the PCB as expected. So I have to take a peek at the other side. You can use alcohol to clean up the contact parts.

20110305_007_thumb

Then put everything back, and put back the battery. Switch on your E-510, it will return to work smoothly.

Here are the pictures of my tools and some screws on taps with mark.

20110305_009_thumb

20110305_004_thumb

I wish you will meet your E-510 again after this hack!.

修复Olympus E-510的开关失灵问题

March 5, 2011

我的E-510在购入1年半之后出现了一些奇怪的突然断电现象,再过了一段时间,发现开机就会重启,不清楚是什么原因。经过仔细研究,发现是电源开关的问题,于是我做了几个塑料垫片插在开关下面,凑合了很久。最近我在网上看到有人说这是开关下面电路板的氧化问题,于是找了今天中午有时间,开拆。

按照网上说法可以单独拆开上盖,于是我把上盖附近的螺丝都下下来了,分别是左肩三颗,两长一短。目镜4颗,卡盖内侧向上一颗,前护手胶皮内一颗,闪光灯打开后有两颗,镜头旁边两颗。

结果发现还是无法打开,有的地方已经可以打开2-3毫米,但是还是有东西牵引着,不敢乱动,上网继续搜索,发现有人提到E-510和E-300不同,可能要开后盖,于是开始拆后盖。底部四颗靠近后面的就可以了。打开卡槽,还有两颗很长的。这就能轻松取下后盖。开盖的时候当心柔性排线。

20110305_001

发现有两颗小螺丝一左一右固定住了上盖。

20110305_008

左侧(黑色)

20110305_003

右侧(白色)已拆除

这下就可以彻底松动整个上盖了

20110305_005

为了能够比较方便拆卸,我把上面两条柔性连线都拆开了,然后把周边五颗白色螺丝拆掉。需要注意的是左侧和右侧的两个细小组件,我圈出来了。

20110305_006

左边的那个就是上面我提到右侧螺丝固定的一部分,是一个金属薄片,拆下来的时候还是要当心。右侧的是一个铜柱,所以要当心滚开。五颗螺丝,有一根特长的用于固定铜柱,有根很短的,在下方中间使用。

松动后其实无法全部翻开整个电路板,这个和E-300差异很大,原因就是那些彩色的电线。可以看到在三个拨轮的上面都有白色的粉末或者黑色的氧化物,我也没有无水酒精,就拿纸巾裹在细柄螺丝刀头部伸进去擦拭,感觉效果不错,上面恢复了铜色的本色。

20110305_007

于是安装回去原有所有部件,感谢上苍,没有多出也没有少掉一颗螺丝,在目镜安装的时候要擦干净内部的玻璃,否则就有很大的指纹了。

装好电池,插上卡,轻推开关,毫不迟疑的机器就开机了,也没有以前的反复开关的问题,扭动滚轮,都一切正常,我又可以继续使用我的DSLR了!

最后附上工具和部分螺丝的合影:

20110305_009

20110305_004

用纸片加胶带的方法是很好管理小螺丝的方法,我一直在拆卸电脑的时候使用这一方法。

大炳的螺丝刀很有用,部分螺丝比较紧,要压紧了用力拧,否则容易把十字拧花,长柄的主要用在存储卡上部那颗,必须得用长的拧开,一字长柄用于,敲开前面护手胶皮和擦拭电路板,笔用于记录和内部铜柱的定位Smile

如何在Virtual Box上安装Mac OSX 10.6

January 18, 2011

预先声明:本文纯属个人爱好Hack而做的验证概念实验,由于MacOSX的最终用户条款中包含,MacOSX必须运行在Apple的私有硬件产品上,否则视为违反授权。读者以此文安装的系统,所有权益和后果由读者个人承担,本人并非鼓励长时间违反版权使用MacOSX。

本人第一次见到MacOS跑在虚拟机里是看到用VMWare Workstation上,但我一直是免费和开源软件的拥护者,作为一个在01年就开始使用VMWare Workstation做兼容测试的开发人员,历经使用免费版本VMWare Player,辅以大量vdisk和手工编辑配置文件。到后来找到免费开源的Virtual Box,便始终保持在VB这个平台上了。

在Virtual Box 3的版本上首次出现了MacOS X Server的选项,这给很多想尝试MacOS的人带来了一定的希望。我虽然有MB240但是也想尝试一下虚拟机里面跑Mac OSX。

首先一点,你需要一张MacOSX的安装光盘,这个安装光盘必须是商业发行版的MacOSX 10.6,比如MacOSX Boxset里面或者是单独销售的MacOSX 10.6光盘。一般随Mac电脑随机的光盘是无法安装的。

其次,你的处理器要支持硬件虚拟化,现在主要是AMD-V或者VT-x。部分电脑需要在Bios里面打开VT的支持,否则进入VirtualBox里面是无法勾选Virtualization选项的。

最后,你需要有相应的计算机知识和相当的动手能力,本文并非Step by Step,只是解释和记录本人在安装过程中碰到的一些问题和解决问题的方法。

粗略步骤:

1,在VB中创建虚拟机,记住类型要选择MacOSX,注意事项:

– 打开3D加速,可以关闭2D,显存16M应该够了

– 取消EFI选项,因为你会用第三方的EFI引导

– 建议使用双核

– 建议内存 > 1G

– 创建>20G的虚拟硬盘,建议50G以上

2,下载EFI boot cdrom。EFI是个很神秘的东西,虽然Intel推广了很久,但是实际使用EFI的个人电脑是少之又少,Mac恰巧是其中。可以从http://prasys.info/osx86hackint0sh/里面下载到必要的ISO。

3,选择用下载好的ISO(挂载好)来启动虚拟机,一般启动以后一般只有一个选项,按照下面的帮助,插入OSX安装光盘(这个可以直接加载物理光盘上,但我建议你先dump出来再用,安装速度会快不少)。然后,按F5刷新,EFI会感知到MacOSX安装盘,按回车。

4,当你看到安装界面的时候,你已经在路上了,如果现在出现错误不允许安装,有可能你使用的光盘是随机的那种,这种是无法使用继续安装的,赶紧去买光盘吧Smile

5,你首先需要做的是去磁盘工具创建一个HFS+的分区,因为对于Mac出厂的时候默认会分区,所以作为你自己装的系统,一定要手动分区。否则你无法选择安装的目的硬盘。

6,之后就是一个漫长的等待,开始安装系统了。你可以去吃顿饭,洗个澡回来继续。

7,铁定,最后你会碰到安装失败的错误,但这个是正常的,不要紧张,你只需要重新启动虚拟机,并用EFI的ISO引导就一切OK。

当然这个是很简单的一个介绍,也缺乏大量的图片,所以这只适合中高玩家来使用。

我是如何使用SONY eReader (1)

January 9, 2011

总结一下我个人的一些经验。

我很喜欢SONY的reader,并不是说我不喜欢Kindle

简而言之,Kindle

– 屏幕更清晰
– 更轻
– 更省电
– 系统的支持更好
– 速度也略快
– 也更开放(二次开发)

SONY呢?
– 容量(内部3xxMB + MS Duo + SD)理论上32G以上了
– PDF,SONY的PDF效果好太多,而且软件导入的时候可以做优化
– Touch screen可以标记并融合
– 充电相对方便
– 外部存储器SD + MS,可以直接用第三方的机器往里加读物
– 在牺牲电池寿命的前提下,音乐播放能力不错

待续:)

How to enable edit picture in Shutter?

September 29, 2010

Shutter is just excellent tool to make screen shoot. I do like the feature of making marks on pictures.

I used to install software from CLI in ubuntu. So I install it for my favorite Awesome in case I need screen shoot. The command is simple:

sudo apt-get install shutter

But after I run it, I found the edit button is in gray, and say “goo-canvas” required. I did a small research on that, shutter had a couple of optional dependencies, which libgoo-canvas-perl among.

You have to run

sudo apt-get install libgoo-canvas-perl

After restart shutter, the edit button is back to normal!

my birthday present — playstation 3

September 26, 2010

In Sept I got my birthday prensent, sony playstation 3 slim. I have a playstation 2 slim, which brought me tons of fun in last a couple of years. Now it’s time to have fun on the last generation console.

i was trying to keep playing ps2 games on my HDTV, i really enjoy the games except the images. The pictures are unaccept at all.

At the begining of this month, I eventually found some one had hacked ps3, which seems to be last unbeatable one. You can find that method from internet. Also, someone said the method is used by SONY as a sevice method to fix PS3. The only thing I can say is, those are from genius. I rush into a saler and directly order a 320 GB version. To hack my PS3, I also use my favorite N900. The major purpose to hack it, is not playing jailbreak game, but POC and be cool the most powerful console so far!

Can’t resolve hostname by VPNC in Ubuntu

September 7, 2010

I have two ubuntu boxes, one with 10.04, the other with 9.10. I noticed that the 10.04 can’t resolve hostname without parent domain name. But everything works fine on 9.10.

For example, I try to nslookup jira, 10.04 return ** server can’t find jira: SERVFAIL. But 9.10 can find it properly.

I analyzed the /etc/resolv.conf files on different machines
10.04 one

#@VPNC_GENERATED@ — this file is generated by vpnc
# and will be overwritten by vpnc
# as long as the above mark is intact
# Generated by NetworkManager
domain xxxx.com
search Melbourme
nameserver 10.50.0.4
nameserver 10.50.0.6

9.10 one

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND — YOUR CHANGES WILL BE OVERWRITTEN
#nameserver 8.8.8.8
#nameserver 8.8.4.4
nameserver 10.50.0.4
nameserver 10.50.0.6
nameserver 192.168.102.1
search xxxx.com Melbourme

Eventually I found 10.04 doesn’t install resolveconf which might be used by vpnc. After installing it, the issue was resolved.

I guess VPNC doesn’t have a hard dependency on resolvconf package, but in some cases, it much better to use resolvconf to update resolv.conf instead of VPNC itself.

Don’t forget reconnect vpnc!