Finished my studies in USTC

Last weekend, from May 15 to May 17, I took a train to Hefei along with more than thirty classmates,
to attend the desertation defence, the final phase of the postgraduate study.

Those were really busy days for all of us, there were so much forms and paper works for
documentations and files waiting for us to fill, to print, to get them signed, to be sealed,
not to mention most of us still need to prepare and modify our defence PPT.

Most of the paper works were supposed to be done before we went to Hefei, so, frankly, I think that
our class teacher in Shanghai, who’s responsible only for the documentations, did not do her job well,
but nothing was.

Well, now it’s over, let the bygones be bygones, here I want to say I’m really happy that I passed the defence.
and also really sorry for those who didn’t get through the defence. Those professors were really tough, about 25% ~ 30% of us didn’t survive the defence, :'(

Here are some pictures shoot in the USTC.

A simple guide of starting use EasyRTC

Working on a Loongson(www.loongson.cn) PC, goal is to make it a Meeting Terminal. Because its CPU is MIPS arch, there could be lots of unexpected problems, so the first thought hit us is WebRTC.

This post is the first step to research into this topic.

Continue reading “A simple guide of starting use EasyRTC”

A simple script to sync a forked repository with the source repository

The mechanism is simple like this:

1. Pull/Clone your own repository(which was forked from another repository) to a local PC.
2. Add remote source repository to a tag of the local copy.
3. Do local merge for the two repositories.
4. Resolve the conflications if exists.
5. Commit the local copy to your repository.
6. Done and do some check.

#Sync the forked repository with the original source

#1. First clone the repository of your own.
#Skip this step if you already have a local copy of your own fork repository
git clone https://github.com/jackyhwei/nginx-rtmp-module
cd nginx-rtmp-module

#2. Add remote repository

#Add a tag for your repository and point to the origin source repository
git remote add jackyhwei https://github.com/arut/nginx-rtmp-module

#3. Fetch the newly added tag source
git fetch jackyhwei

#4. Merge the newly fetched source to master
git merge jackyhwei/master

#Manually resolve the conflications if there exists
git commit -m "merged by jackyhwei"

#5. Push the codes to your repository. BTW: git push requires you input your username and password.
git push -u origin master

#6. Check local info
git remote -v  
git branch -a

If you’v made some modification for your own repository, there will be an error like below when you do the push:

Permission denied(publickey).
fetal: The remote end hung up unexpectedly.

It’s because you didn’t add a public key for your repository, use following script to add it:

cd ..
mv .ssh ssh_bak
ssh-keygen #this command will generate a public/private rsa key pair for you.
cd .ssh
ls #there would be two files: id_rsa and id_rsa.pub
vi id_rsa.pub

Copy the contents in id_rsa.pub to your clipboard, and go to the repository administration web page, select the Deploy Keys menu, and Add the deploy key(which is in your clipboard) to it.

Try push again.