Skip to content

Instantly share code, notes, and snippets.

View nibocn's full-sized avatar

RichardNee nibocn

View GitHub Profile
@nibocn
nibocn / trial.key
Created December 26, 2017 01:45 — forked from huqi/trial.key
Beyond Compare 4 license for Mac
Beyond Compare 4
Licensed to: ASIO Allsoftinone
Quantity: 1 user
Serial number: 1822-9597
License type: Pro Edition for Windows
--- BEGIN LICENSE KEY ---
H1bJTd2SauPv5Garuaq0Ig43uqq5NJOEw94wxdZTpU-pFB9GmyPk677gJ
vC1Ro6sbAvKR4pVwtxdCfuoZDb6hJ5bVQKqlfihJfSYZt-xVrVU27+0Ja
hFbqTmYskatMTgPyjvv99CF2Te8ec+Ys2SPxyZAF0YwOCNOWmsyqN5y9t
@nibocn
nibocn / idea
Created October 25, 2017 03:20 — forked from chrisdarroch/idea
Open a project in IntelliJ IDEA from your command line!
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
@nibocn
nibocn / example.puml
Created September 7, 2017 02:44 — forked from QuantumGhost/example.puml
A simple template for PlantUML to draw ER diagram. The basic idea comes from http://plantuml.sourceforge.net/qa/?qa=331/database-modeling
@startuml
' uncomment the line below if you're using computer with a retina display
' skinparam dpi 300
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >>
' we use bold for primary key
' green color for unique
' and underscore for not_null
!define primary_key(x) <b>x</b>
!define unique(x) <color:green>x</color>
!define not_null(x) <u>x</u>
@nibocn
nibocn / mirrorlist.mingw32
Created June 10, 2016 10:46 — forked from elvisw/mirrorlist.mingw32
MSYS2国内源
##
## 32-bit Mingw-w64 repository mirrorlist
## Changed on 2014-11-15
##
##中国科学技术大学开源软件镜像
Server = http://mirrors.ustc.edu.cn/msys2/REPOS/MINGW/i686
##北京理工大学镜像
Server = http://mirror.bit.edu.cn/msys2/REPOS/MINGW/i686
##日本北陆先端科学技术大学院大学 sourceforge 镜像
Server = http://jaist.dl.sourceforge.net/project/msys2/REPOS/MINGW/i686
@nibocn
nibocn / reportMyIp.py
Created March 29, 2016 09:30 — forked from mike-zhang/reportMyIp.py
检测动态域名并上报IP
#!/usr/bin/python
import smtplib,re,urllib2,time
import socket
from subprocess import Popen, PIPE
smtpServer='smtp.163.com'
smtpPort='25'
sender = '[email protected]'
senderPasswd = "XXXXX"

方法1:

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

**注:**有点慢

方法2:

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

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

alias_name:证书别名;

-validity:有效天数;

您的名字与姓氏是什么?

[Unknown]:BoNi

android {

    ...
    
    signingConfigs {
        releaseConfig {
            storeFile file(System.getenv("KEYSTORE_PATH"))
            keyAlias System.getenv("KEY_ALIAS")
 storePassword System.getenv("KEYSTORE_PASSWORD")
private long mPressedTime = 0;
@Override
public void onBackPressed() {
//获取第一次按键时间
  long mNowTime = System.currentTimeMillis();
  
  //比较两次按键时间差
  if((mNowTime - mPressedTime) > 2000){
    Toast.makeText(this, "再按一次退出程序", Toast.LENGTH_SHORT).show();
android {

    ......
    
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
 }