How To Create a Symbolic Link on Ubuntu

作者:Rui 发布时间:October 29, 2015 分类:Linux,CLOUD 浏览:613

The syntax of ln command is:

ln [options] <target file> [link name]

So, this command should work:

ln -sv /media/fileserver/anotherfile.ods /home/user/anotherfile.ods

The s option creates a symbolic link, if omitted a hard link will be created. v means "be verbose", i.e. ln will show what it's doing.

You could also cd to target's directory first:

cd /media/fileserver
ln -sv anotherfile.ods /home/user/anotherfile.ods

Or cd to destination directory:

cd /home/user/
ln -sv /media/fileserver/anotherfile.ods

If you omit the link name, target's name is used. The above command creates a link to /media/fileserver/anotherfile.ods in /home/user/anotherfile.ods.

Gerrit Code Review 服务搭建

作者:Rui 发布时间:October 23, 2015 分类:JAVA,ANDROID 浏览:1,526

简介

Gerrit一种免费、开放源代码的代码审查和项目管理软件,同一个团队的软件程序员,可以相互审阅彼此修改后的程序代码,决定是否能够提交,退回或者继续修改,原先是为了管理Android计划而产生的,现在已成为很多开源项目的Code Review工具

下载

源码地址:https://gerrit.googlesource.com, gerrit的源码和相关插件的源码地址
https://gerrit.googlesource.com/gerrit 这个是gerrit的源码

我们可以直接下载已经打包的好的可执行安装包
http://gerrit-releases.storage.googleapis.com/index.html
选择一个合适的版本下载即可

安装

环境要求

  • JDK runtime 1.7 +
  • MySQL or PostgreSQL

配置 Java Strong Cryptography

为了支持超强密码加密:AES128CTR, AES256CTR, ARCFOUR256和ARCFOUR128,需要从Oracle 官网下载安装Java Cryptography Extension (JCE)

注意:安装JCE并不是必须的

  1. 下载JCE lib
    JDK7 JCE policy files
    JDK8 JCE policy files
  2. 解压缩JCE
    下载的文件里包含一下文件
    README.txt Information about JCE and installation guide
    local_policy.jar Unlimited strength local policy file
    US_export_policy.jar Unlimited strength US export policy file
  3. 依照README 安装JCE

数据库配置

MySQL

CREATE USER 'gerrit2'@'localhost' IDENTIFIED BY 'secret';
CREATE DATABASE reviewdb;
GRANT ALL ON reviewdb.* TO 'gerrit2'@'localhost';
FLUSH PRIVILEGES;

阅读剩余部分...

Android: Jumbo Mode vs Multidex

作者:Rui 发布时间:October 21, 2015 分类:ANDROID 浏览:1,760

Jumbo Mode, when reading https://source.android.com/devices/tech/dalvik/dalvik-bytecode.html, the const-string/jumbo is the jumbo mode for string. It is about the opcode such that "op vAA, string@BBBBBBBB" versus "op vAA, string@BBBB", 32 bits versus 16 bit.

Multi Dex is to allow to load classes from more than one dex file. The primary classes.dex must contain the classes necessary for calling this class methods. Secondary dex files found in the application apk will be added to the classloader after first call to MultiDex.install(Context) see https://developer.android.com/reference/android/support/multidex/MultiDex.html


Tips:
https://source.android.com/devices/tech/
https://groups.google.com/forum/
https://developer.android.com/reference/android/support

Jack (Java Android Compiler Kit)

作者:Rui 发布时间:October 20, 2015 分类:ANDROID 浏览:5,738

Overview

Jack (Java Android Compiler Kit)是新的Android 编译工具,从Android 6.0 开始加入,替换原有的编译工具,例如javac, ProGuard, jarjar和 dx。它主要负责将java代码编译成dex包,并支持代码压缩,混淆等

Jack工具的主要优势

  • 完全开放源码
    源码均在AOSP中,合作伙伴可贡献源码
  • 加快编译源码
    Jack 提供特殊的配置,减少编译时间:pre-dexing, 增量编译和Jack编译服务器.
  • 支持代码压缩,混淆,重打包和multidex
    不在使用额外单独的包,例如ProGuard。
    jack-overview.png

阅读剩余部分...

How To Install Mysql on Ubuntu with Apt-Get

作者:Rui 发布时间:October 19, 2015 分类:Linux,CLOUD 浏览:510

Ubuntu 14.04 defaults to MySQL 5.5, but also has MySQL 5.6 available for installation from the universe archive. Installing 5.6 is as easy as specifying the version

Install Mysql

root@ubuntu1404:~# apt-get install mysql-server-5.6

Config Mysql

root@ubuntu1404:~# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 45
Server version: 5.6.16-1~exp1 (Ubuntu)Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> select version();
+---------------+
| version() |
+---------------+
| 5.6.16-1~exp1 |
+---------------+
1 row in set (0.00 sec)

Update: A slightly more detailed tutorial for this is available here.