Skip to content

Instantly share code, notes, and snippets.

@holmeszyx
holmeszyx / baserc
Last active December 6, 2017 10:30
cow 配置
source /home/holmes/My/bash/http_proxy
@holmeszyx
holmeszyx / mask.go
Created May 13, 2016 08:51
生成一下java的mask或者index常量
package main
import (
"fmt"
"strings"
)
type item struct {
Name string
Comment string
@holmeszyx
holmeszyx / Popobox-debian
Last active April 24, 2016 13:36 — forked from yanwen/Popobox-debian
29元 泡泡云 安装 debian
Debian with Popobox v1.0
原文链接:http://pear.xiaojiublog.net/2013/11/debian-with-popobox-v1-0/
## 部分内容由 felix021 修正、简化 ##
1: 制作Debian系统
mkdir chroot && cd chroot
sudo debootstrap --foreign --arch=armel wheezy debian http://mirrors.ustc.edu.cn/debian/
打包:
@holmeszyx
holmeszyx / GoDef
Created July 8, 2015 10:06
GoSublime Settings
{
// Copy this file to Settings - User
// Set your real GOPATH in user's Godef.sublime-settings
// For example:
"gopath": "/home/holmes/My/go"
}
@holmeszyx
holmeszyx / go_libs.go
Created July 7, 2015 16:15
Create a rebuild all libs sh script
package main
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
)
@holmeszyx
holmeszyx / gist:938df8472223c7bd77a1
Created November 24, 2014 11:04
PullToRefreshStaggeredGridView 瀑布流的下载刷新
/*******************************************************************************
* Copyright 2011, 2012 Chris Banes.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@holmeszyx
holmeszyx / gist:721d11769c2a7bb4523b
Created September 10, 2014 15:28
一个刻度盘的demo
package z.hol.viewtest.view;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
@holmeszyx
holmeszyx / FileDonwload.md
Last active August 29, 2015 14:01
FileDonwload的说明

FileDownload使用

主要类在 z.hol.net.download.file 包下.

  • FileDownloadManager
  • FileDownloadTask
  • SimpleFile
  • DownloadUIHandler
@holmeszyx
holmeszyx / gist:11260577
Created April 24, 2014 16:23
自动重试的Runnable, 用于等待UI完成一定程度后触发
package com.buy.apps.view;
import android.os.Handler;
import android.view.View;
/**
* 自动重试的Runnable, 用于等待UI完成一定程度后触发
* @author holmes
*
*/
@holmeszyx
holmeszyx / gist:11077012
Created April 19, 2014 07:36
FixImageView 自动调整等比高宽
package com.example.imagetext.view;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.ImageView;
public class FixImageView extends ImageView{
private int mFixWidth = -1;