Skip to content

Instantly share code, notes, and snippets.

View zhengzhou's full-sized avatar
😇
996

zhou zhengzhou

😇
996
View GitHub Profile
@zhengzhou
zhengzhou / checkStyle.xml
Last active February 5, 2021 17:44
基于华为Java编程规范的Eclipse checkStyle.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<!-- Generated by RHY @will_awoke -->
<module name="Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="warning"/>
/// demo模板
func stMeRecharge(_ where : String, what: String) {
event("stMeRecharge", ["where": where, "what": what])
}
/// 主要方法,
func event(name: String, args: [String: String?]) {
// 此处适配sdk
if args.isEmpty {
MobClick.event(name)
@zhengzhou
zhengzhou / myCheckStyle.xml
Created May 28, 2014 03:43
自定义java规范CheckStyle
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
Checkstyle-Configuration: My_check
Description:
java代码检查规则,使用eclipse插件检查.(插件官方地址 http://eclipse-cs.sourceforge.net/update/)
package com.xinghui.notificationlistenerservicedemo;
import android.app.ActivityManager;
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.IBinder;
import android.os.Process;
@zhengzhou
zhengzhou / 0_reuse_code.js
Created August 16, 2016 14:33
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@zhengzhou
zhengzhou / linksources.groovy
Last active August 29, 2015 14:26
gradle plugin. link source with aar file.
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.ModuleVersionIdentifier
import org.gradle.api.artifacts.ResolvedArtifact
import org.gradle.internal.component.external.model.DefaultModuleComponentIdentifier
import org.gradle.jvm.JvmLibrary
import org.gradle.language.base.artifact.SourcesArtifact
import org.gradle.language.java.artifact.JavadocArtifact
@zhengzhou
zhengzhou / PublishPlugin.groovy
Last active August 29, 2015 14:26
custom gradle plugin.
class PublishPlugin implements Plugin<Project>{
def mavenName = 'my maven'
@Override
void apply(Project target) {
PublishExtension extension = project.extensions.create('publish', PublishExtension)
project.apply([plugin: 'maven'])
@zhengzhou
zhengzhou / build.gradle
Created July 31, 2015 07:05
upload to maven
ext {
buildToolsVersion = '22.0.1'
supportVersion = '22.2.1'
userName = 'xuzhengzhou'
password = '123'
}
buildscript{
repositories{
jcenter()
@zhengzhou
zhengzhou / adb_wireless.txt
Created September 27, 2014 15:13
adb wifi调试
su//获取root权限
setprop service.adb.tcp.port 5555//设置监听的端口,端口可以自定义,如5554,5555是默认的
stop adbd//关闭adbd
start adbd//重新启动adbd
@zhengzhou
zhengzhou / rename.gradle
Last active August 29, 2015 14:06
androidStudio 运行时重命名apk
def outPut = "$buildDir/outputs/apk/"
def channel_id = -1000
def buildVariant = '-debug.'
task getChannelId << {
def manifest = new XmlParser().parse("2.1.1/AndroidManifest.xml")
def androidSchemas = new groovy.xml.Namespace("http://schemas.android.com/apk/res/android", 'android')
manifest.application.('meta-data').each{
def nodeName = it.attribute(androidSchemas.name)
if(nodeName.equals('xinyi_id'))