Skip to content

Instantly share code, notes, and snippets.

@liangzai-cool
liangzai-cool / build.gradle
Created September 19, 2018 14:08 — forked from rponte/build.gradle
Excluding global dependency from all configurations (Gradle)
// ...
configurations {
all*.exclude group: 'xml-apis', module: 'xmlParserAPIs'
}
// Equivalent to:
configurations {
all.collect { configuration ->
configuration.exclude group: 'xml-apis', module: 'xmlParserAPIs'
}
@liangzai-cool
liangzai-cool / android-studio-disable-test-only-mode.md
Created January 17, 2018 12:27 — forked from xujiaao/android-studio-disable-test-only-mode.md
Disable 'testOnly' mode for Android Studio 3.0

Disable 'testOnly' mode for Android Studio 3.0

Android Studio 3.0 sets android:testOnly="true" automatically on APKs that are ran from the IDE.

However, for some devices (such as OPPO R11), the test-only APKs can never be installed ...

If you face the same problem, try add this line to your '/gradle.properties':

# gradle.properties

android.injected.testOnly=false

var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@liangzai-cool
liangzai-cool / build.xml
Created August 1, 2016 04:52 — forked from jasdeepkhalsa/build.xml
Sample Ant build.xml file for concat and minifying CSS & JS files by Addy Osmani
<?xml version="1.0" encoding="utf-8"?>
<project name="tutorialProject" default="prod" basedir="/Users/addy/buildTut/">
<description>Client-side ANT build file example</description>
<target name="-load.properties"
description="Set properties for this build">
<!--YUI Compressor location-->
<property name="yui.dir" value="${basedir}/yuicompressor/build/yuicompressor-2.4.2.jar"/>
<!--Source JS dir-->
@liangzai-cool
liangzai-cool / readme.txt
Created June 28, 2016 05:31 — forked from fqrouter/readme.txt
shadowsocks 公共代理的必要设置
good, 你已经有了一个自己的shadowsocks代理了,现在想要把这个代理公布出去给所有人分享。
但是没有两个小时,代理就没法使用了,为什么?因为你需要额外注意以下事项(以下步骤需要比较高的linux技能)
本文只关注于确保shadowsocks服务还“活着”,如果你希望让其跑得更快,请参考
https://github.com/clowwindy/shadowsocks/wiki/Optimizing-Shadowsocks
1、 shadowsocks的timeout设置
超时时间越长,连接被保持得也就越长,导致并发的tcp的连接数也就越多。对于公共代理,这个值应该调整得小一些。推荐60秒。
2、 检查操作系统的各种限制
对于openvz的vps,特别需要检查一下
@liangzai-cool
liangzai-cool / nginx.conf
Created June 14, 2016 01:57 — forked from baskaran-md/nginx.conf
NginX allow POST on static pages.
# ...
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}