写在前面

最近给自己的本子换了新的ssd,也趁此机会重装了系统。本次选的的系统是xubuntu 14.04。

嗯,目前来看,这货比ubuntu快的多,用着很爽~

下面将新系统配置当中遇到的一些问题和技巧做个记录,也方便以后查询~

1.将程序添加到开始菜单

由于需要配置android开发环境,很自然的就装了Eclispe-adt,装完后,没有开始菜单启动项,感觉不太方便。

Google之后,发现将程序添加到开始菜单中其实非常简单。

编辑文件:

sudo vim /usr/share/applications/Eclipse-adt.desktopktop

配置如下:

[Desktop Entry]
Version=1.0
Type=Application
Name=Eclipse-adt
Comment=Eclipse ADT Bundle
Icon=/home/brant/Development/Android/adt-bundle/eclipse/icon.xpm
Exec=/home/brant/Development/Android/adt-bundle/eclipse/eclipse
Path=
Terminal=false
StartupNotify=true
Categories=Development;IDE

2.github ssh提交

参考https://help.github.com/articles/generating-ssh-keys/

git remote set-url origin git@github.com:username/repo.git

3.S权限介绍

引用如下:

'S' = The directory's setgid bit is set, but the execute bit isn't set.

's' = The directory's setgid bit is set, and the execute bit is set.

SetGID = When another user creates a file or directory under such a setgid directory, the new file or directory will have its group set as the group of the directory's owner, instead of the group of the user who creates it.

To remove the setGID bit:

chmod g-s eclipse/
Taken from man chmod:

You can set or clear the bits with symbolic modes like u+s and g-s, and you can set (but not clear) the bits with a numeric mode.

link to a similar question: http://unix.stackexchange.com/questions/27250/uppercase-s-in-permissions-of-a-folder

4.其他技巧

修改eclispe tab-bar字体

修改文件:

/home/brant/Development/Android/adt-bundle/eclipse/plugins/org.eclipse.platform_4.2.2.v201302041200/css

Raid 1+0 操作步骤记录

2014-03-11 by Brant Xiong

操作结果

所有机器磁盘挂载情况如下:

[root@HOST work]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             8.2G  3.8G  4.4G  47% /
/dev/sda3             1.8T  1.7G  1.8T   1% /home
/dev/md10             8.9T  168M  8.4T   1% /home/data1

1. unmount正在使用的盘

for x in `seq 1 ...
read more

ubuntu下搭建web svn

2014-03-04 by Brant Xiong

前言

嗯,为了方便开发,需在VPS(环境为ubuntu 12.04)搭建svn服务。本文主要记录下搭建的整体步骤~

步骤

安装svn

过程主要参考:https://help.ubuntu.com/community/Subversion

首先安装subversion

sudo apt-get install subversion subversion-tools

安装完成后,需建立subversion用户组来拥有资源目录,然后将nginx的用户添加到该用户组(假设nginx的配置为user www-data;),具体操作如下:

sudo groupadd subversion
sudo usermod -a -G subversion www-data
#验证
sudo groups www-data

下面建立svn资源库,以myproject为例 ...

read more

django下celery的使用

2014-02-23 by Brant Xiong

前言

今天在使用django做后台的时候,遇到了这样的问题:django在处理用户请求的时候,需要进行一个耗时较长的异步抓取操作,同时希望能立即给用户返回数据,使用常规的daemon进程的方式没有解决该问题,用力Google了一下发现如下解答

In fact Django have a syncronous model. If you want to do real async processing, you need a message queue. The most used with django is celery, it may look a bit "overkill" but it's a good answer.

Why do ...

read more

利用bitbucket进行teamwork

2014-02-22 by Brant Xiong

前言

嗯,先简单介绍下bitbucket吧~下面引自wikipedia:

Bitbucket是一家为使用Mercurial和Git版本控制系统的项目提供网络托管服务的网站。Bitbucket既提供免费帐号,也提供商业付费方案。免费帐号可以使用无限数量的私有版本库(免费帐号至多支持5名用户)截至2010年9月,而如果用户能邀请3位朋友注册Bitbucket,则至多可以为8名用户提供服务。[1]私有版本库不会在个人页面上展示;如果用户只拥有私有版本库,网站则会显示还没有创建任何版本库,直到这名用户创建了公开版本库为止。Bitbucket使用Python下的DjangoWeb应用框架编写。

具体步骤

利用bitbucket完成teamwork和持续集成的流程如下:

                   +----------+
                   | Develop  |
                   +----+-----+
                        |
                        | push with sourcetree
                        |
                   +----v-----+
                   | Bitbucket|
                   +----+-----+
                        |
                        | fetch and release on Server
                        |
                   +----v-----+
                   | Server   |
                   +----------+

即开发在本机完成,利用sourcetree将代码push至bitbucket服务器,最后在服务器端同步代码并发布。

服务端配置

生成public key并添加至bitbucket

首先登陆https://bitbucket.org,依次选择Username > Account > SSH keys ...

read more
Follow me on GitHub