Skip to content

Instantly share code, notes, and snippets.

zzzmode 8enet

Block or report user

Report or block 8enet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Sublime Text 3 cheating.md

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
@8enet
8enet / mysave.gradle
Last active Sep 14, 2016
自动保存配置到properties文件中,比如对应版本号的递增,实现每次构建后版本不同
View mysave.gradle
apply plugin:MySavePlugin
class MySavePlugin implements Plugin<Project>{
@Override
void apply(Project project) {
def file=project.rootProject.file("myprop.properties")
project.extensions.create("myprop",InnerStorage,file)
}
View gist:c232552889822f91e0520e59f385ea9c

使用rxjava递归遍历目录和统计目录所有文件大小

public static Observable<File> getFile(File file){
        if(file.isFile()){
            return Observable.just(file);
        }
        return Observable.from(file.listFiles()).concatMap(new Func1<File, Observable<File>>() {
            @Override
            public Observable<File> call(File file) {
                return getFile(file);
@8enet
8enet / debian7-mongodb
Last active Apr 8, 2016
debian8 install virtualbox
View debian7-mongodb
https://jira.mongodb.org/browse/SERVER-14786
@8enet
8enet / homebrew.md
Created Oct 15, 2015
github contributor guide
View homebrew.md

更新homebrew中的软件版本

1、fork homebrew
2、git clone https://github.com/{yourname}/homebrew.git
3、如果用网页版编辑可以跳过。修改采用Sublime Text3作为编辑器,export HOMEBREW_EDITOR='/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'
4、以tomcat为例,brew edit tomcat,一般只需要修改前几行中的url,mirrorsha256urlmirror从发行软件的 页可以看到,其中mirror要是可以直接下载的链接,sha256是下载文件的sha256值,我们可以先下载mirror中的这个文件,然后用shasum -a 256 [/downfile]计算文件的sha256值。 5、

git commit -a -m 'update tomcat {version}' git push origin master

View apkinfo.sh
#!/bin/bash
mkdir `pwd`/.temp_for_certificate
cd `pwd`/.temp_for_certificate
count=0
while [ -n "$1" ]
do
cd ..
curPath=$1
View gist:ca92e87791cea498a708
apply plugin: 'com.android.application'
apply plugin: 'idea'
android {
compileSdkVersion 21
buildToolsVersion "22.0.0"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
You can’t perform that action at this time.