Wednesday, May 7, 2014

How to sync forked repos

Assume you are working on a forked repo and want to keep it synced with original one where you forked. But it is not limited to forked repos, it should be any two repos you want to merge together (Of cause you have to solve the conflict by yourself with your way).

  • Create a mirror repo for sync

git clone --mirror  [local_repo_name]
git remote add --mirror=fetch upstream

  •  Sync

git fetch --all -v --progress
git push --mirror -v --progress origin

  • Auto Sync
          You can add it to "cron" if you want it to be synced automatically. Not good at it. Maybe some would like to help me work out the syntax for it.

Job done. Hope simple python script would come soon.

Wednesday, April 16, 2014

Good BitBucket Python API and CLI Packages

Since start using GIT as version control system, I use put all my
repos on BitBucket. I love the unlimited private repos from them. But
no command line tools for it is really painful for Linux users. Then I
start looking for good Python API for it to write simple script to
create/clone/list repos. But my Python knowledge make it a hard task
for me to do a good script.

Today just before I try to add "Description" to create repo, I found
the API "python-bitbucket-api" with Python script already. Try it out,
it is really good. Just some small issues like install and argument
parsing. Now everything works fine for me. Hope new features will
coming from original author(s).

If anyone is using BitBucket and looking for a command line tool for
it, you can give it a try: hg clone

Wednesday, April 9, 2014

Start to Like Org Clock

Start the learn how to use "CLOCK" in org-mode. I love it. You can do
the clock in and clock out. Then you got your simple report on how
much time you spent on your little tasks or the whole project. That's
so easy and wonderful.

After 3 days, I figure out that I spend 2.05 hours on my current
project. Hope me boss would never read this post. The "CLOCK" will be
part of my self management tool from now.

Tuesday, March 11, 2014

Cygwin!!! Can you cause more problems?

I can't say I am a Linux guy because I am not expert but I do only
use Linux at home and office. Now I have a task to port a Perl
regression script to python and make it work on both Windows/Cygwin
and Linux.
Now let's talk about the Cygwin.
I am using Modelsim. I have no idea how to make work properly under
Cygwin. I can't pass Cygwin path to Modelsim commands. For example:
'vlib /home/enchanter/prja/work'. It failed. The solution I found
from Internet is using 'cygpath' to convert it to Windows like mix
style. (So ugly). I can't look back to my script again after add all
the 'ifeq xxx, cygpath' things.
Now it is g++ in Cygwin. Try to compile someone's C++ code. They
put –std=c++0x as compile flag. Cygwin g++ failed by can't find
definition of snprintf(). I found workaround from Cygwin mailist to
change it to –std=gnu++0x which is posted back to 2009. I don't know
why that problem still happened in 5 years later.
make also has problem. I can run 'make -h' to get the help
message. But when I try to really make something. I got error in the
middle like this "make: make : command not found"? What? If it is not
there how could you start make?
The next is x8664 Cygwin. I can't compile systemc-2.3.0 in it. I can
do it on Ubuntu x8664 machine, there's no problem. To debugging it
is beyond my knowledge, have to roll back to 32 bit version :-(.
Now I have to stop try Cygwin. Because it drives me crazy. Maybe I
should read the manual from the first page or find a tutorial to do
it line by line. But why can't it just make things as easy as Linux?
Isn't the Cygwin just try to let windows user use something like
Linux has? Nothing holds me back to Windows. My decision for know,
"Linux Only". I may update the verification environment someday later
when I'm able to work it work. Definitely not the near future.

Sunday, March 2, 2014

Pull Request has been Merged

I'm just too excited to post this because my pull request is
merged. Actually that is very simple change of a Python library and
what I have done is just changed then way to import the libraries to
make it support Python3. But it is the first time I try to contribute.
Really hope this could happened 20+ years ago when I was still
young. But even to late, right?

BTW, also remember a reply from a forum: "Change request? Why not just
change the code and send a PULL REQUEST?"

If you never do that, try it, simple change can be merged :-).

Wednesday, February 26, 2014

My First Blog Post from Emacs Org-mode

Have post anything for about 2 years. And now I am learning Emacs org-mode
That's really a wonderful tool I have ever seen before. Now try everything
with org-mode.

Here is the first post from it. Hope I can restart to post something useful

My blog will focus on what I am learning and plan to learn:

  • Emacs
  • Git
  • Linux
  • RTL Design
    • Verilog
    • VHDL
  • Verification
    • UVM
    • SystemC
  • Python
  • C++

Hope will become notes and progress tracking.

Wednesday, June 27, 2012


JEW FISH(Mulloway)算是钓鱼中一类大明星了,JEW FISH是石首鱼中的一类,就是和大黄鱼,黄姑鱼一科的,肉质上佳,细嫩,脂香明显,而且,有个特点,越大的JEW越好吃,肉质不会老,反而更紧致,一米以上的JEW,切开来,除了中间的脊骨和肋骨,找不到一根小刺,而且有个非常厚大的鱼膘,做成香甜的鱼肚汤,JEW FISH也是我最爱的一种鱼类。

JEW FISH喜欢做固定的洄游,河道,沙滩,它们的轨迹往往是固定的,而且基本都是通过水道较深的地方,象河道的中间的CHANNEL,沙滩的GUTTER,这类深水区,找BEACH WORM,小鱼之类的食物,捕食时间也是大都在晚上,所以,这些地方,都是守JEW的固定地点,最佳的鱼饵,其实是一种活的BEACH WORM,但很少能保存,SQUID就是另一种非常好的BAIT了,特别是新鲜的SQUID,没有碰过淡水,这是必需的。




SQUID,鱿鱼是很多人喜欢的美食,生食,熟制,都非常的美味,国内还分透抽,软丝,软丝(大尾鱿)味道更好,新鲜的SQUID刺生是TOP的刺生,到嘴里还一动一动的触角,是极品的美味,不在海边的人很难尝到,因为SQUID出水很快就死了,高蛋白很快变质。SQUID也是非常好的钓饵,特别是JEW的GUN BAIT.

SQUID不善于游泳,都是随潮流漂动,大量集中在外海静水区,内湾,码头,因为怕光,白天都在深水或隐秘处,到了晚上,特别是晚上有灯光的码头,就吸引了很多的SQUID猎食,用假饵是钓SQUID的首选,高技术性,挑战性,特别是对动作要求高,发展出了专门的抽鱿门派,EGGING 。EGGING 有专门的杆,有几百种不同的色彩,型号,大小的LURE选择,针对不同天气,水色的要求,也算是比较复杂的一门钓鱼门派了。有很多人专门喜爱钓鱿 鱼。

bag limit 20 in total * nsw


BONITO属于TUNA一类的鱼,我们吃的很多TUNA罐头,其实就用BONITO制作成的,真正的TUNA都已经冰冻后出口去了日本,这类鱼,在熟制后味道差不太多,柴,如果是新鲜的 BONITO可以制成刺生,因为肉质带点酸味,有些人不喜欢,或是用喷火枪熏烧一下表面,或是用红烧等方式,都看个人口味了。

BONITO是夏天很多鱼的饵鱼,它本身又吃更小的饵鱼,高速行动,在内湾也可以看得到,大群的还是在外海深水处,用金属LURE,表面跳动的就可以,用Minnow 等轻型LURE效果也很好,是非常适合GAME FISHING的鱼类。





Tailor在Fraser Island 繁殖,七八月开始开始向下部洄游,在晚上,一大群的Tailor,集中在外海的静水处,沙滩上,或是内湾捕食,晚上是钓Tailor的最好时候,Tailor往往会每天晚上集中在一些特定的地点,象内湾很多地方,如果晚上有一大群人经常在那用夜光漂钓鱼的话,那说明那就是鱼群集中的地方。

Tailor吃食很凶锰,牙利,钢丝线是必须要的,加上GANG HOOK,挂上整条的沙丁鱼,用夜光大漂,如果鱼群来的话,达到BAG LIMIT是非常容易的事。

Tailor         30 cm         bag limit:20  NSW