Skip to content

Instantly share code, notes, and snippets.

View nibocn's full-sized avatar

RichardNee nibocn

View GitHub Profile
@nibocn
nibocn / git使用多个私钥文件.md
Created February 6, 2015 09:43
git使用多个私钥文件
  • ~/.ssh目录下创建config文件,添加如下内容:
Host coding-nibome
        HostName coding.net
        User git
        IdentityFile ~/.ssh/nibome

Host:别名可随意定义,后面会使用到;

android {

    ......
    
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
 }
private long mPressedTime = 0;
@Override
public void onBackPressed() {
//获取第一次按键时间
  long mNowTime = System.currentTimeMillis();
  
  //比较两次按键时间差
  if((mNowTime - mPressedTime) > 2000){
    Toast.makeText(this, "再按一次退出程序", Toast.LENGTH_SHORT).show();
android {

    ...
    
    signingConfigs {
        releaseConfig {
            storeFile file(System.getenv("KEYSTORE_PATH"))
            keyAlias System.getenv("KEY_ALIAS")
 storePassword System.getenv("KEYSTORE_PASSWORD")

创建命令:keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

alias_name:证书别名;

-validity:有效天数;

您的名字与姓氏是什么?

[Unknown]:BoNi

方法1:

执行命令mvn archetype:generate列出已存在的maven项目模板,根据具体提示进行操作即可。

**注:**有点慢

方法2:

执行命令:mvn archetype:generate -DgroupId=com.demo -DartifactId=simple -DpackageName=com.demo.simple -DarchetypeArtifactId=maven-archetype-webapp

# built application files
*.ap_

# files for the dex VM
*.dex
*.iml

# Java class files
*.class
adb shell

root@android:/ # cd /proc
cd /proc
root@android:/proc # cat cpuinfo
[core]
        quotepath = false
        editor = vim
        fileMode = false
[color]
        ui = always
[user]
        
@nibocn
nibocn / maven install jar.md
Last active August 29, 2015 14:15
maven 安装本地jar包到本地仓库或远程仓库
  • 安装到本地仓库

mvn install:install-file -DgroupId=com.baidu.push -DartifactId=push -Dversion=1.1.2 -Dpackaging=jar -Dfile=push-1.1.2.jar

  • 安装到远程仓库

mvn deploy:deploy-file -DgroupId=com.baidu.push -DartifactId=push -Dversion=1.1.2 -Dpackaging=jar -Dfile=push-1.1.2.jar -Durl=[url] -DrepositoryId=[id]