Rover12421's Blog

The End.

openssl-1.0.1i for Android

想研究下NDK上使用RSA加密,最方便的应该是openssl了吧.

在github上下了一个openssl 1.0.1c的版本,编译通过.但个人比较追求最新,而且1.01.0f都有Heartbleed漏洞.虽然我只是使用其中的加密算法,这个并不受影响,强迫症,没办法,哈哈. 开始下的1.0.1g,编译完完来才发现不算最新的,于是又编译来最新的1.0.1i(强迫症)

不过简单的对比了1.0.1i1.0.1g,还是做来很多容错处理的.下面记录两个注意的地方.


编译ARM还需要生成汇编文件

1
2
3
4
5
perl crypto/aes/asm/aes-armv4.pl        > crypto/aes/asm/aes-armv4.S
perl crypto/bn/asm/armv4-mont.pl        > crypto/bn/asm/armv4-mont.S
perl crypto/sha/asm/sha1-armv4-large.pl > crypto/sha/asm/sha1-armv4-large.S
perl crypto/sha/asm/sha256-armv4.pl     > crypto/sha/asm/sha256-armv4.S
perl crypto/sha/asm/sha512-armv4.pl     > crypto/sha/asm/sha512-armv4.S

其中一个错误是:

1
2
3
functions:openssl.c(.data.rel+0x200): error: undefined reference to 'ts_main'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/openssl] Error 1

需要修改apps/progs.h

1
2
3
#if 0 /* ANDROID */
  {FUNC_TYPE_GENERAL,"ts",ts_main},
#endif

实际就算删除这行


代码均下自openssl官方站:

1
http://www.openssl.org/source/openssl-1.0.1i.tar.gz

可以正常编译的代码已经同步到GitHub上了

openssl 1.0.1g : https://github.com/rover12421/openssl-1.0.1g4android

openssl 1.0.1i : https://github.com/rover12421/openssl-1.0.1i4android

Source Insight 3.5 Crack

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <time.h>

unsigned int digit(unsigned int v, unsigned int i)
{
    v = v%(int)pow(10, i);
    return v/(int)pow(10, i-1);
}
/*big random number*/
long lrand()
{
    if (RAND_MAX == 0x7FFF)
        return (long)((rand() << 16)| rand());
    else
        return rand();
}

int main()
{
    const unsigned int mask[32] = {
        0X3039, 0X1E240, 0X5464E, 0X6F855, 0X8AA52, 0XA5BF5, 0X980D0,
        0XBADD0, 0X980D0, 0X30448, 0X30379, 0X8AF93, 0X30379, 0X7B9,
        0XF2F90, 0X9FF66, 0X8AA52, 0XF3A0, 0X30379, 0X8AA52, 0X62AF,
        0X2AD, 0X71FDC, 0X5A124, 0XFFB2, 0XB96D8, 0X2B18E, 0X4CDE4,
        0X71FDC, 0X1068C, 0X765C3A63, 0X745C3533
    };
    const int i_dat[10] = {0x96, 0x95, 0x10, 0x23, 7, 0x15, 8, 3, 16, 17};
    srand((unsigned int)time(NULL));

    while (1) {
        unsigned int d = 0;
        unsigned int mid_number = 0;
        char resp[128];
        int i = 0;
        while(1) {
            d = lrand()%1000000;
            if (d < 100000 || d%111111 == 0)
                continue;
            for (i = 0; i < 32; ++i) {
                if (mask[i] == d)
                    break;
            }
            if (i==32)
                break;
        }
        mid_number = d;

        for (i=0; i<6; ++i) {
            d = (i_dat[i]^(digit(mid_number, 6-i)+48)) + 4*d;
        }
        d = d%100000;
        if (d < 10000)
            continue;

        printf("Serial number: SI3US-%d-%d\n", mid_number, d);

        // try again
        printf("Do you want to have a try, again(y|n)? ");

        memset(resp, 0, 128);
        scanf("%s", resp);
        fflush(stdin);
        if (resp[0]=='y' || resp[0]=='Y') {
            continue;
        } else {
            printf("Good Bye!\n");
            break;
        }
    }

    return 0;
}

linux下,gcc编译执行

1
2
3
gcc SourceInsight3.5Crack.c -lm -o SourceInsight3.5Crack
chmod +x SourceInsight3.5Crack
./SourceInsight3.5Crack

wine下测试成功激活

Astah Pro v6.8.0 Crack Again

距上一次破解有一段时间了,看到有人留言说运行错误.但是我也没在意,因为放出了脚本,再次执行应该没问题的.这次因为重做了系统,发现用原来的jar替换也有错误,于是再整理了一次.这次优化了下脚本.破解的aspectj文件不变.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/bash

cd ..

for libfile in `ls lib/*.jar -a $1`
do
    if [ x"$libfile" != x"." -a x"$libfile" != x".." ];then
        if [ -f "$libfile" ];then
            export CLASSPATH=$CLASSPATH:$libfile
        fi
    fi
done

for libfile in `ls crack/*.jar -a $1`
do
    if [ x"$libfile" != x"." -a x"$libfile" != x".." ];then
        if [ -f "$libfile" ];then
            export CLASSPATH=$CLASSPATH:$libfile
        fi
    fi
done

export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/jre/lib/jfxrt.jar

echo $CLASSPATH
ajc -Xmx1024m -injars astah-pro.jar -injars $ASPECTJ_HOME/lib/aspectjrt.jar -sourceroots crack -outjar astah-pro_crack.jar

这次的破解文件,不再只有破解好的jar了.破解脚本也一并放在里面了. 只要把解压出来的crack目录放到astah_professional目录下,进入到crack中,执行crack.sh即可在astah_professional目录下生成astah-pro_crack.jar文件,可以先通过java命令直接执行该文件,如果不出错,再替换astah-pro.jar完成破解

当然脚本依然是linux下的,windows下的同学就自己翻译这个脚本成bat吧

Ubuntu 14.04.1下测试成功,并且wine下也正常运行.下面是图片.蓝色的是wine下执行的效果.

Alt text

Download : https://www.dropbox.com/s/yjizayl11olxiyb/astah_professional_6.8.0-d254c5_crack-20140803.zip

解压密码 : www.rover12421.com


2014-12-23

Windwos 下的同学有福了,Bat脚本由 @非虫 大大给写好了.感谢 @非虫 提供的脚本.
脚本中的环境路径需要换成自己的哦~~

@非虫 测试,该破解脚本也是适用 astah 6.9 版本的.需要6.9版本的同学请自己熟悉下 AJC 然后编译吧!

上菜了~~~

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@echo off
echo astah-professional v6.8-v6.9 crack

set ASTAH_HOME=C:\Program Files\astah-professional
set ASPECTJ_HOME=C:\aspectj1.8
set JDK_HOME=C:\Program Files\Java\jdk1.7.0_71

set CLASSPATH=.
FOR /R "%ASTAH_HOME%\lib" %%F IN (*.jar) DO call :addcp %%~sF
FOR /R "%ASTAH_HOME%\crack" %%F IN (*.jar) DO call :addcp %%~sF
FOR /R "%JDK_HOME%\jre\lib" %%F IN (*.jar) DO call :addcp %%~sF

goto extcp

:addcp
set CLASSPATH=%CLASSPATH%;%1
goto :eof

:extcp

echo %CLASSPATH%

cd %ASTAH_HOME%
%ASPECTJ_HOME%\bin\ajc -Xmx1024m -injars astah-pro.jar -injars %ASPECTJ_HOME%\lib\aspectjrt.jar -sourceroots crack -outjar astah-pro_crack.jar

echo done.

Ubuntu 14.04 Install Atom

1.安装依赖包

1
2
3
4
5
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install build-essential git libgnome-keyring-dev
sudo apt-get install nodejs
sudo apt-get install python-software-properties
  • 升级npm 通过apt-get安装的npm1.3.10的, atom需要1.4.x才行
1
sudo npm install -g npm

2.下载源码

1
2
git clone https://github.com/atom/atom
cd atom

3.编译源码

一共有三种方式,选择适合自己的一种即可.

3.1 - 编译atom到临时目录,/tmp/atom-build/Atom - 可以通过/tmp/atom-build/Atom/atom运行测试

1
script/build

3.2 - 也可以直接编译到系统中 - 编译后的运行路径是:/usr/local/bin/atom - 可以直接执行atom打开. - 可以添加到菜单中,图标路径是/usr/local/share/atom/resources/app/resources/atom.png

1
sudo script/grunt install

3.3 - 可以编译成deb安装包,然后用dpkg安装 - 生成的deb/tmp/atom-build

1
script/grunt mkdeb

4.有图有真相 Alt text Alt text


高亮效果不错.目前来看打开文件速度比Sublime Text慢一些.其他特征有待发现.


ibusatom下无法工作.已经有人提交了这个问题.issues在这:https://github.com/atom/atom/issues/2242


  • 2014/09/22 补充 可以添加webupd8team/atom源安装,并且支持fcitx输入法框架
1
2
3
sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install atom

Windows下支持git协议配置

其实Windowos下使用Git可以和在Linux下一样方便.简单的说下Windows下支持git协议的配置.

Windows下要支持Git常用的有两个软件,一个是Git Bash,另一个就是小乌龟TortoiseGit了.

git协议实际是基于ssh的免登录协议.那首先就是要生成key文件.

先安装好Git Bash,进入Git Bash,使用ssh-keygen生成key文件.路径是你的当前用户目录下的.ssh目录下(%HOMEPATH%\.ssh).生成的一共两个文件,分别是id_rsa(私钥)和id_rsa.pub(公钥).把公钥id_rsa.pub放到Git服务器上(这个就不说了),就可以在Git Bash里使用git协议了.例如git clone git@192.168.1.222.

如果不想进入Git Bash,直接在CMDPowerShell下使用呢?也很简单,先把Git Bashbin目录添加到PATH环境变量里.再使用ssh登录Git服务器测试:ssh git@192.168.1.222,然后会有一个访问提示:

The authenticity of host ‘192.168.1.99 (192.168.1.99)’ can’t be established. RSA key fingerprint is bc:5a:2f:50:b7:39:aa:94:72:4b:6d:d3:95:1d:c4:81. Are you sure you want to continue connecting (yes/no)?

yes同意.然后会提示你,已经把这个服务器的指纹添加到known hosts,也就是known_hosts文件里.

Warning: Permanently added ‘192.168.1.99’ (RSA) to the list of known hosts.

之后会提示你输入密码.如果没提示输入密码就不看下面的了,说明已经不需要额外配置了.

然后全盘搜索这个文件吧(%HOMEPATH%\.ssh下也会有一个).

这个文件可能在C:\Users\Rover12421\AppData\Local\VirtualStore\Program Files (x86)\Git\.ssh,也可能在你的Git Bash安装目录下的bin\.ssh下面.

找到之后,把之前生成在%HOMEPATH%\.ssh下的id_rsaid_rsa.pub两个文件拷贝过来.然后再次登录测试,如果没提示输入密码就说明可以正常使用git协议了.

最后说下小乌龟TortoiseGit的配置.安装TortoiseGit有一个步骤是选择SSH客户端,这个要注意了,一定要选择OpenSSH, Git default SSH Client.默认是Putty模式.

Alt text

只要CMD里的配置好了之后,这里只要选对模式就没什么问题了.有问题的话,也和CMD的方式一样,就不说了.

Vim 配置记录

  • 安装vim 7.4ctags
1
2
3
sudo add-apt-repository ppa:fcwu-tw/ppa
sudo apt-get update
sudo apt-get install vim vim-gtk ctags
  • 安装vundle插件
1
2
rm -rf ~/.vim
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
  • 配置vim 把下面的配置写入配置文件~/.vimrc 再进入'vim'执行:BundleInstall安装插件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
"""""""""""""""""""""""""
" Rover12421 2014/03/03 " 
"""""""""""""""""""""""""
" 关闭vi的一致性模式 避免以前版本的一些Bug和局限
set nocompatible
" 配置backspace键工作方式
set backspace=indent,eol,start
" 显示行号
set number
nnoremap <F6> :set nonumber!<CR>:set foldcolumn=0<CR>
" 设置在编辑过程中右下角显示光标的行列信息
set ruler
" 当一行文字很长时取消换行
set nowrap
" 在状态栏显示正在输入的命令
set showcmd
" 设置历史记录条数
set history=100
" 设置取消备份 禁止临时文件生成
set nobackup
set noswapfile
" 突出现实当前行列、高亮当前行列
set cursorline
set cursorcolumn
" 设置匹配模式 类似当输入一个左括号时会匹配相应的那个右括号
set showmatch
" 设置C/C++方式自动对齐
set autoindent
set cindent
" 开启语法高亮功能
syntax enable syntax on
" 指定配色方案为256色
set t_Co=256
" 设置搜索时忽略大小写
set ignorecase
" 设置在Vim中可以使用鼠标 防止在Linux终端下无法拷贝
set mouse=a
" 设置Tab宽度
set tabstop=4
" 设置自动对齐空格数
set shiftwidth=4
" 设置按退格键时可以一次删除4个空格
set softtabstop=4
" 设置按退格键时可以一次删除4个空格
set smarttab
" 将Tab键自动转换成空格 真正需要Tab键时使用[Ctrl + V + Tab]
set expandtab
" 设置编码方式
set encoding=utf-8
" 自动判断编码时 依次尝试一下编码
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
" 检测文件类型
filetype on
" 针对不同的文件采用不同的缩进方式
filetype indent on
" 允许插件
filetype plugin on
" 启动智能补全
filetype plugin indent on

"===================================================================
"===================================================================
"
"   自定义vim操作
"
"====================================================================
"====================================================================
map <F5> :call Do_OneFileMake()<CR>
map <F2> :call Do_FileSave()<CR>
map <F3> :call Do_FileSaveAndQuit()<CR>

" === 当前文件保存 ===
function Do_FileSave()
    let source_file_name=expand("%:t")
    if source_file_name==""
        echoh1 WarningMsg | echo "The file name is empty." | echoh1 None
        return
    endif

    execute "w"
endfunction

" === 当前文件保存退出 ===
function Do_FileSaveAndQuit()
    let source_file_name=expand("%:t")
    if source_file_name==""
        echoh1 WarningMsg | echo "The file name is empty." | echoh1 None
        return
    endif

    execute "wq"
endfunction

" === 单文件编译 仅支持c、cc、cpp、go文件 ===
function Do_OneFileMake()
    if expand("%:p:h")!=getcwd()
        echoh1 WarningMsg | echo "Failed to make. This's file is not in the current dir." | echoh1 None
        return
    endif

    let source_file_name=expand("%:t")

    if source_file_name==""
        echoh1 WarningMsg | echo "The file name is empty." | echoh1 None
        return
    endif

    if ( (&filetype!="c")&&(&filetype!="cc")&&(&filetype!="cpp")&&(&filetype!="go") )
    echoh1 WarningMsg | echo "Please just make c、cc、cpp and go file." | echoh1 None
        return
    endif

    if &filetype=="c"
        set makeprg=gcc\ %\ -o\ %<
    endif

    execute "w"
    execute "silent make"
    execute "q"
endfunction


"==============================================================
"==============================================================
"
"   Vundle插件管理和配置项
"
"==============================================================
"==============================================================

" 开始使用Vundle的必须配置
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" === 使用Vundle来管理Vundle ===
Bundle 'gmarik/vundle'
" === PowerLine插件 状态栏增强展示 ===
Bundle 'Lokaltog/vim-powerline'
" vim有一个状态栏 加上powline则有两个状态栏
set laststatus=2
let g:Powline_symbols='fancy'
" === The-NERD-tree 目录导航插件 ===
Bundle 'vim-scripts/The-NERD-tree'
" 开启目录导航快捷键映射成n键
nnoremap <C-t> :NERDTreeToggle<CR>
" 高亮鼠标所在的当前行
let NERDTreeHighlightCursorline=1
" === Tagbar 标签导航 ===
Bundle 'majutsushi/tagbar'
" 标签导航快捷键
nmap <F9> :TagbarToggle<CR>
let g:tagbar_autofocus = 1
" === A 头文件和实现文件自动切换插件 === 
Bundle 'vim-scripts/a.vim'
" 将切换的快捷键映射成<F4>
nnoremap <silent> <F4> :A<CR>
"=== ctrlp 文件搜索插件 不需要外部依赖包 ===
Bundle 'kien/ctrlp.vim'
" 设置开始文件搜索的快捷键
let g:ctrlp_map = '<leader>p'
" 设置默认忽略搜索的文件格式
let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$\|.rvm$'
" 设置搜索时显示的搜索结果最大条数
let g:ctrlp_max_height=15
" === YouCompleteMe 自动补全插件===
Bundle 'Valloric/YouCompleteMe'

" 自动补全配置插件路径
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/cpp/ycm/.ycm_extra_conf.py'
let g:EclimCompletionMethod = 'omnifunc'
let g:ycm_collect_identifiers_from_tags_files = 1
let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_confirm_extra_conf = 0
let g:ycm_min_num_of_chars_for_completion = 1
"youcompleteme 默认tab s-tab 和自动补全冲突
"let g:ycm_key_list_select_completion=['<c-n>']
"let g:ycm_key_list_select_completion = ['<Down>']
"let g:ycm_key_list_previous_completion=['<c-p>']
"let g:ycm_key_list_previous_completion = ['<Up>']
"nnoremap <F5> :YcmForceCompileAndDiagnostics<CR>
"let g:UltiSnipsExpandTrigger="<c-j>"
" 当选择了一项后自动关闭自动补全提示窗口
"let g:ycm_autoclose_preview_window_after_completion=1

" === 自动补全单引号、双引号、括号等 ===
Bundle 'Raimondi/delimitMate'
" === 主题solarized ===
Bundle 'altercation/vim-colors-solarized'
let g:solarized_termtrans=1
let g:solarized_contrast="normal"
let g:solarized_visibility="normal"
" === 主题 molokai ===
Bundle 'tomasr/molokai'
" 设置主题 colorscheme molokai
set background=dark
set t_Co=256
" === indentLine代码排版缩进标识 ===
Bundle 'Yggdroot/indentLine'
let g:indentLine_noConcealCursor = 1
let g:indentLine_color_term = 0
" 缩进的显示标识|
let g:indentLine_char = '¦'
" === vim-trailing-whitespace将代码行最后无效的空格标红 ===
Bundle 'bronson/vim-trailing-whitespace'
" === markdown编辑插件 ===
Bundle 'plasticboy/vim-markdown'
let g:vim_markdown_folding_disabled=1
" === golang编辑插件 ===
Bundle 'jnwhiteh/vim-golang'
" ==========================
" 其他推荐插件
" vim scripts
Bundle 'taglist.vim'
Bundle 'c.vim'
Bundle 'minibufexpl.vim'
Bundle 'grep.vim'
Bundle 'mru.vim'
Bundle 'comments.vim'
" 神级插件,ZenCoding可以让你以一种神奇而无比爽快的感觉写HTML、CSS
Bundle 'ZenCoding.vim'
" 自动补全xml/html代码
Bundle 'xml.vim'
" json代码补全
Bundle 'JSON.vim'
" Python代码检查
Bundle 'pyflakes.vim'
" 提供命令模式下的补全
Bundle 'CmdlineComplete'
" 提供日历的功能,可以写日记
Bundle 'calendar.vim'
" 自动检测文件编码
Bundle 'FencView.vim'
" git repo
Bundle 'scrooloose/nerdtree'
Bundle 'vim-scripts/AutoClose'
Bundle 'scrooloose/syntastic'
Bundle 'kien/rainbow_parentheses.vim'
Bundle 'vim-scripts/UltiSnips'
" 据说是革命性的移动方案,不知道有多革命性
Bundle 'Lokaltog/vim-easymotion'
" smali 语法高亮
Bundle 'alderz/smali-vim'
"Bundle 'kelwin/vim-smali'
" ==========================
" Vundle配置必须 开启插件
filetype plugin indent on
" syntastic
" ==========================
let g:syntastic_check_on_open = 1
let g:syntastic_cpp_include_dirs = ['/usr/include/']
let g:syntastic_cpp_remove_include_errors = 1
let g:syntastic_cpp_check_header = 1
let g:syntastic_cpp_compiler = 'clang++'
let g:syntastic_cpp_compiler_options = '-std=c++11 -stdlib=libstdc++'
"set error or warning signs
let g:syntastic_error_symbol = '✗'
let g:syntastic_warning_symbol = '⚠'
"whether to show balloons
let g:syntastic_enable_balloons = 1
" ==========================
""""""""""""ctags settings"""""""""""""""""
set tags+=~/.vim/cpptags
set tags+=~/.vim/systags
"""""""""""color scheme""""""""""""""""""""
let g:molokai_original=1
""""""""" Settings of taglist""""""""""""""
" increase the width of the taglist window
let Tlist_WinWidth=10
" automatically open the taglist window
let Tlist_Auto_Open=0
" exit wim when only the taglist window exist
let Tlist_Exit_OnlyWindow=1
" open tags with single click
let Tlist_Use_SingleClick=1
" close tag folds for inactive buffers
let Tlist_File_Fold_Auto_Close=1
" show the fold indicator column in the taglist window
let Tlist_Enable_Fold_Column=1
" Automatically update the taglist to include newly edited files
let Tlist_Auto_Update=1
"""""""""" NERDtree settings"""""""""""""""
" let NERDTreeWinPos='right'
"""""""""" mini buffer navigator"""""""""""
let g:miniBUfExplMapWindowNavVim=1
let g:miniBufExplMapWindowNavArrows=1
let g:miniBufExplMapCTabSwitchBufs=1
let g:miniBufExplModSelTarget=1
let g:miniBufExplUseSingleClick=1
"map <C-c> "+y
map <C-v> "+p

  • 编译安装YouCompleteMe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
mkdir ~/llvmsrc
cd llvmsrc
#Checkout LLVM
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
#Checkout Clang
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd ~/llvmsrc
cd llvm/projects
#Checkout Compiler-RT
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt
#Get the Test Suite Source Code [Optional]
svn co http://llvm.org/svn/llvm-project/test-suite/trunk test-suite
#Configure and build LLVM and Clang
cd ~/llvmsrc
#for building without polluting the source dir
mkdir build
cd build
../llvm/configure --enable-optimized
make -j4

mkdir ~/ycm_build
cd ~/ycm_build
cmake -G "Unix Makefiles"  ~/.vim/bundle/YouCompleteMe/cpp -DEXTERNAL_LIBCLANG_PATH=~/llvmsrc/build/Release+Asserts/lib/libclang.so
make ycm_core
make ycm_support_libs

完成.

Gitolite服务器恢复记录

系统挂了,重做了系统,原来的gitolite自然是没了.只能从本地库或者镜像库中恢复了. 记录下整个过程,以便下次换到13.04上快速来过.

记录前先注明几个标识:

1
2
3
L-r:表示本地登录的`Rover12421`帐号
L-g:表示本地登录`git`帐号
R-g:表示远程(镜像)登录`git`帐号,远端`git`是不能直接使用`ssh`登录的,需要先登录服务器,再使用`su git`切换

  • 添加本地用户到gitolite镜像服务器
1
2
3
4
5
6
L-r:scp ~/.ssh/id_rsa.pub git@git.rover12421.com:/Rs/GitServer/rover12421.pub
R-g:cd /Rs/GitServer/
R-g:gitolite setup -pk rover12421.pub
L-r:mkdir ~/gitolite
L-r:cd ~/gitolite
L-r:git clone git@git.rover12421.com:gitolite-admin git.rover12421.com
  • 安装本地gitolite服务
1
2
3
4
5
6
7
8
9
10
11
12
13
14
L-r:sudo adduser --system --home /home/git --shell /bin/bash git
L-r:sudo passwd git
L-r:su git
L-g:git clone git://github.com/sitaramc/gitolite.git
L-g:mkdir -p $HOME/bin
L-g:vi .bashrc
#Gitolite bin
export PATH=$PATH:$HOME/bin
exit
L-r:scp ~/.ssh/id_rsa.pub git@127.0.0.1:~/rover12421.pub
su git
L-g:cd ~
L-g:gitolite/install -to $HOME/bin
L-g:gitolite setup -pk rover12421.pub
  • 本地gitolite管理
1
2
cd ~/gitolite
git clone git@127.0.0.1:gitolite-admin local
  • 镜像服务器设置 一共三处修改.这里的版本是3.5.x的,修改和我以前记录的3.x版本有点不一样.
1
2
L-g:cd ~
L-g:vi .gitolite.rc
1
2
# the Mirroring feature needs this
# HOSTNAME                  =>  "gitlocal",

==>

1
2
# the Mirroring feature needs this
HOSTNAME                  =>  "gitlocal",

1
2
# enable mirroring (don't forget to set the HOSTNAME too!)
# 'Mirroring',

==>

1
2
# enable mirroring (don't forget to set the HOSTNAME too!)
'Mirroring',

1
2
3
4
5
6
7
 # Uncomment or add new commands here.
            # 'create',
            # 'fork',
            # 'mirror',
            # 'readme',
            # 'sskm',
            # 'D',

==>

1
2
3
4
5
6
7
 # Uncomment or add new commands here.
            # 'create',
            # 'fork',
            'mirror',
            # 'readme',
            # 'sskm',
            # 'D',

  • 添加镜像hostssh配置
1
2
3
4
5
6
L-g:vi ~/.ssh/config
host gitmirror
  user        git
  hostname    git.rover12421.com
  port        22
  identityfile    ~/.ssh/id_rsa

  • key配置 本地也服务也需要添加serverkey,不然不会自动同步到镜像上,但是可以不配置镜像key,以前记录是两个key都添加了.
1
2
3
4
5
6
7
8
9
10
11
12
L-g:ssh-keygen -t rsa -C "gitlocal"
L-r:cd ~/gitolite/git.rover12421.com
L-r:sudo cp /home/git/.ssh/id_rsa.pub keydir/server-gitlocal.pub
L-r:sudo chown rover12421:rover12421 keydir/server-gitlocal.pub
L-r:git add keydir/server-gitlocal.pub
L-r:git commit -a -m "Update server key"
L-r:git push
L-r:cd ~/gitolite/local
cp ../git.rover12421.com/keydir/server-gitlocal.pub keydir
L-r:git add keydir/server-gitlocal.pub
L-r:git commit -a -m "Update server key"
L-r:git push

  • 恢复repo库配置
1
2
L-r:cd ~/gitolite/local
L-r:vi conf/gitolite.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
repo RsApktool
    RW+     =   @all
    option mirror.master        = gitlocal
    option mirror.slaves        = gitmirror
    option mirror.redirectOK    = all

repo RsPrivate
    RW+     =   @all
    option mirror.master        = gitlocal
    option mirror.slaves        = gitmirror
    option mirror.redirectOK    = all

repo RsSmali2Java
    RW+     =   @all
    option mirror.master        = gitlocal
    option mirror.slaves        = gitmirror
    option mirror.redirectOK    = all

repo SpAd
    RW+     =   @all
    option mirror.master        = gitlocal
    option mirror.slaves        = gitmirror
    option mirror.redirectOK    = all

repo sp2ad
    RW+     =   @all
    option mirror.master        = gitlocal
    option mirror.slaves        = gitmirror
    option mirror.redirectOK    = all

repo ShakaApktool
    RW+     =   @all
    option mirror.master        = gitlocal
    option mirror.slaves        = gitmirror
    option mirror.redirectOK    = all
1
2
L-r:git commit -a -m "fix repo setting"
L-r:git push

  • 最后恢复库到本地gitolite服务中 可以使用本地同步的代码库,也可以从镜像上同步下来再同步到本地gitolite
1
2
3
L-r:cd $Project
L-r:cd ShakaApktool
L-r:git push --all

修改 StackEdit 本地路径

对于Markdown,一直没找到一款比较满意的基于Ubuntu平台的编辑器.目前来说StackEdit是最满意的一款编辑器了,但他他基于google浏览器的,文件备份是比较麻烦,虽然他有在线同步到网盘的功能.但确实不想每次新加个文档,就设置一次网盘同步.经过两次的磁盘故障,意外丢失了Chromium的所有数据,StackEdit数据当然也丢失了.于是决定一定要找到StackEdit的本地存储位置,把他指向到磁盘其他地方去.

通过不懈的搜索,终于找到StackEdit文档存储的位置了,原来用的是一个SQLite数据库存储的.该文件位置是: ~/.config/chromium/Default/Local Storage 一共两个文件(一个数据,一个日志):

1
2
https_stackedit.io_0.localstorage
https_stackedit.io_0.localstorage-journal

找到文件位置就好办了,解决方法有两个

  • 1.只处理StackEdit的两个文件(现在用的该方法)
1
2
3
4
5
mkdir /Rs/stackedit.io
cd ~/.config/chromium/Default/Local\ Storage
mv https_stackedit.io_0.* /Rs/stackedit.io/
ln -s /Rs/stackedit.io/https_stackedit.io_0.localstorage https_stackedit.io_0.localstorage
ln -s /Rs/stackedit.io/https_stackedit.io_0.localstorage-journal https_stackedit.io_0.localstorage-journal
  • 2.把Chromium的整个资源目录移出来
1
2
3
4
mkdir /Rs/chromium
cd ~/.config/chromium/Default
mv Local\ Storage /Rs/
ln -s /Rs/Local\ Storage Local\ Storage

Astah Pro v6.8.0 Crack

astah pro v6.8的破解是我对比astah pro v6.7astah-pro.jar破解版得到的信息,然后使用AspectJ织入破解的.

织入代码很简单,我就贴下,不建工程放GitHub了.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.rover12421.crack.astahpro;

/**
 * Created by rover12421 on 2/26/14.
 */
public aspect AstahProCrack {

    /**
     * JP.co.esm.caddies.jomt.license.k.java
     * public boolean h()
     */
    pointcut license_k_h_Pointcut() : execution(boolean JP.co.esm.caddies.jomt.license.k.h());
    boolean around() : license_k_h_Pointcut()
            && !within(AstahProCrack +) {
        return true;
    }

    /**
     * JP.co.esm.caddies.jomt.license.k.java
     * public boolean a(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, boolean paramBoolean4)
     */
    pointcut license_k_a_Pointcut(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, boolean paramBoolean4)
            : execution(boolean JP.co.esm.caddies.jomt.license.k.a(boolean, boolean, boolean, boolean ))
            && args(paramBoolean1, paramBoolean2, paramBoolean3, paramBoolean4);
    boolean around(boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3, boolean paramBoolean4)
            : license_k_a_Pointcut (paramBoolean1, paramBoolean2, paramBoolean3, paramBoolean4)
            && !within(AstahProCrack +) {
        return false;
    }
}

然后是ajc织入脚本(linux下的,windows下修改也简单,就不贴了):

1
2
3
4
5
6
7
8
9
10
#astah_professional安装目录下.linux:/usr/lib/astah_professional
export CLASSPATH=$CLASSPATH:"lib/activation.jar:lib/log4j-over-slf4j-1.6.6.jar:lib/logback-loader-1.0.9b.jar:lib/axis-ant.jar:lib/mail.jar:lib/axis.jar:lib/org.apache.felix.framework.jar:lib/batik:lib/org.apache.xerces.jar:lib/commons-beanutils.jar:lib/platform-connectors.jar:lib/commons-cli.jar:lib/platform.jar:lib/commons-collections.jar:lib/poi-contrib.jar:lib/commons-digester.jar:lib/poi.jar:lib/commons-discovery.jar:lib/saaj.jar:lib/itext-1.3.3.jar:lib/slf4j-api-1.6.6.jar:lib/itext.txt:lib/tools.jar:lib/jaxrpc.jar:lib/wsdl4j.jar:lib/jcl-over-slf4j-1.6.6.jar:lib/xercesImpl.jar:lib/jna.jar:lib/xml-apis.jar"
#http://www.oracle.com/technetwork/java/javafx/downloads/index.html
export CLASSPATH=$CLASSPATH:"JavaFXSceneBuilder1.1/runtime/jre/lib/alt-rt.jar:JavaFXSceneBuilder1.1/runtime/jre/lib/charsets.jar:JavaFXSceneBuilder1.1/runtime/jre/lib/deploy.jar:JavaFXSceneBuilder1.1/runtime/jre/lib/javaws.jar:JavaFXSceneBuilder1.1/runtime/jre/lib/jce.jar:JavaFXSceneBuilder1.1/runtime/jre/lib/jfr.jar:JavaFXSceneBuilder1.1/runtime/jre/lib/jfxrt.jar:JavaFXSceneBuilder1.1/runtime/jre/lib/jsse.jar:JavaFXSceneBuilder1.1/runtime/jre/lib/management-agent.jar:JavaFXSceneBuilder1.1/runtime/jre/lib/plugin.jar:JavaFXSceneBuilder1.1/runtime/jre/lib/resources.jar:JavaFXSceneBuilder1.1/runtime/jre/lib/rt.jar"
#http://mvnrepository.com/artifact/com.apple/AppleJavaExtensions
export CLASSPATH=$CLASSPATH:"lib/AppleJavaExtensions-1.4.jar"

export JAVA_OPTS=-Xmx1024m

ajc -injars astah-pro.jar -sourceroots src -outjar astah-pro_crack.jar -injars aspectjrt-1.7.4.jar

这里有个奇怪的问题,CLASSPATH需要写出详细jar包才行,如果写目录是没用的.

破解版点击下载:
Download
解压密码:https://www.rover12421.com

把Blog转移到Github上了

githubpages也不算啥新鲜玩意了,只是最近迷上了markdown,不想再用WordPress了,折腾了下,总算是把Blog弄到github上了.还算满意.

Disqus的评论花了很长时间,开始是从WordPress导入到Disqus总是导入最早10来条,最后没办法在官方看到可以使用WordPress自带的post导出,再把导出的xml导入到Disqus,这样才成功导入.后来又因为测试域名,一直没改过来,导致评论总显示不出来.找了很才时间,查看原来才发现disqus_identifier,disqus_url使用的域名是测试域名,修正就OK了.