• git-svn 使用

    如果正在使用svn,打算换到git,又暂时不想放弃已有的svn代码库,可以选择git-svn。

    初始化代码库

    git svn clone -s svn-repository-url
    git svn clone svn-repository-url local-projectname

    svn-repository-url 是svn代码库的url,如果要从trunk目录或者某个branch目录里check out ,要把
    -s 换成-T,-b等选项,请自行man git-svn。

    由于需要同步所有的提交历史,所有比较慢,同步完成后就可以工作了。

  • 离家出走

    昨天(2012-02-13)晚上我回家时,坐201在南头关下车后,看到一个10几岁的小孩在那个台阶上睡觉,走过去问他是否需要帮助,问是否没有钱回家了,或者出了什么问题。慢慢的问出了一些东西,得到的基本信息是:14岁,在罗湖读初一。其它的一概不知。

    最后一些用电动车载客的人来了,通过询问得到了小孩的一个亲戚的电话,但是我在给他亲戚打电话的时候,他跑了,找了很久也没有找到,感觉事没有办好,很惭愧。

  • ArchLinux Gvim 不能输入中文

    ArchLinux 系统中,使用fcitx输入法,在GVIM中不能输入中文的解决办法。

    使用gvim -N -u NONE 启动,查看是否可以使用中文输入。

    答案为真的话,基本可以确定是配置文件的错误。

    用正常启动,在命令模式中输入
    :verbose set imi?
    :verbose set imd?

    然后再次测试是否可以正常输入中文。

  • package-query require pacman<3.6 错误

    今天升级ArchLinux 的时候碰到下面的问题:

    error: failed to prepare transaction (could not satisfy dependencies)
    package-query: requires pacman<3.6

    Google 多次后,得到如下办法

  • Solaris Disk 安装

    先在oracle下载dvd包
    在windows的fat32下建立solaris 文件夹
    解压缩solaris dvd,将boot 文件夹中的multiboot,x86.miniroot 文件copy到solaris文件夹。
    最后得到的文件夹可能是这样:
    F:/solaris
    sol-10-u10-ga2-x86-dvd.iso
    multiboot
    x86.miniroot

    现在reboot系统;进入grub,按c进入grub command。

    find /solaris/multiboot

    得到输出可能是这样 (hd0,1)

    root (hd0,1)
    kernel /solaris/multiboot kernel/unxi -B install_media=dsk
    module /solaris/miniroot
    boot
  • ImageMagick 使用

    link: http://jianlee.ylinux.org/Computer/Software/imagemagick.html

    1. convert

    对图像进行转换,它主要用来对图像进行格式的转化,同时还可以做缩放、剪切、模糊、反转等操作。

    格式转换

    有时候在论坛发帖想带图,Linux里面抓的图通常是 png 格式的,很大。使用下面一条目录就可以把 png 格式转换为 jpg 格式了。
    convert foo.png foo.jpg
    还可以使用 mogrify :
    mogrify -format png *.jpg # 将当前目录下所有jpg文件转换为png格式。
    不过 convert 还可以把多种照片转换成 pdf 文件:
    convert *.png foo.pdf # 厉害吧!

    缩放

    convert -resize 100x100 foo.jpg thumbnail.jpg
    convert -resize 50%x50% foo.jpg thumbnail.jpg
    mogrify -sample 80x60 *.jpg   # 注意,这条命令会覆盖源文件

    加边框

    下面两条语句都可以加边框
    convert -mattecolor “#333333” -frame 60x60 源文件.png 转换后文件.png
    convert -bordercolor “#666666” -border 60x60 源文件.png 转换后.png

    图片上加文字

    convert -fill green -pointsize 40 \
    -draw 'text 10,50 "jianlee.cn"' clutter-春江花月夜.png  tmp.png
    使用 -font 可以指定字体。

    模糊

    高斯模糊
    convert -blur 80 clutter-春江花月夜.png tmp.png
    -blur参数还可以这样-blur 80x5。后面的那个5表示的是Sigma的值,它的值对模糊的效果起关键的作用。

  • yaourt -Syua error

    在archlinux 中使用yaourt -Syua 更新系统,出现下列错误:

    error: failed to commit transaction (conflicting files)
    initscripts: /etc/profile.d/locale.sh exists in filesystem
    Errors occurred, no packages were upgraded.

    可以使用
    sudo mv /etc/profile.d/locale.sh{,-backup}
    然后重新执行yaourt -Syua 更新系统。

  • 纪念辛亥革命百年

    100年前的1911年10月10日,武昌起义爆发,并最终结束了中国几千年的封建帝王统治,开启了民主共和的新纪元。可能很多人都对此了解不多,但是这是对中国整个从意识形态上加以改变的历史巨变,今天我们可能还没有走到民主自由的道路上,但是随着自我认知人群的增加,相信有总有那么一天的最终到来。

  • Installing Locale in Solaris 10

    Link: Gopi Desaboyina Solaris Blogs

    Installing Japanese fonts/Locale in Solaris 10.

    =======================================

    1. Check what all locales you’ve installed using locale -a
    2. localeadm -lt –> Check if you’ve Japanese there. If not you can directly install from DVD localeadm -a
    3. localeadm -v -a ja -d /<DVD Mount Path/Solaris_10/Product>
    4. localeadm -v -r ja –> This one removes the Japnese Packages ( Only Locale Related Packages).
    5. set the LANG & LC_ALL variables then open gedit or appropriate program to check fonts.

    Check if your installation supports Japanese Region ?

    =====================================================

    localeadm -lt

    You do not appear to have created a fresh config file since you began using this application.
    If you have a set of Solaris install images available to you, it is recommended that you do so before proceeding.

    Do you wish to create a new config file? [y/n]: y

    Please select the option that was used to install Solaris

    1. CD installation/net installed CD images
    2. DVD installation/net installed combined image

    Please enter your choice:
    ^C
    The following regions are supported by localeadm:

19101112