Skip to content

Instantly share code, notes, and snippets.

deb http://mirrors.163.com/ubuntu/ wily main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ wily-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ wily-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ wily-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ wily-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ wily-backports main restricted universe multiverse
@easternHong
easternHong / build脚本
Created June 24, 2015 06:25
ubuntu shell
#!/bin/bash
cd /home/hunt/AndroidStudioProjects/EFamily/EFamily
branch=''
printf "please input branch :"
read branch
git co ${branch}
#echo ${branch}
time=`date +"%02m%d%H"`
build=`date +"%m%d%H"`
@easternHong
easternHong / readme
Created June 23, 2015 15:06
install facebook infer failed
参照 https://github.com/facebook/infer/blob/master/INSTALL.md 安装步骤。
=-=- ocamlfind.1.5.5 troubleshooting =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=> Could not build ocamlfind. The most common reason for that is a missing 'm4' system package.
直接参考 https://ocaml.org/docs/install.html#Debian
syntax on " 打开语法高亮
if has('gui_running')
set background=light
else
set background=dark
endif
set guifont=CourierNew\ 14
set tabstop=4 " 设置tab键的宽度
@easternHong
easternHong / .bashrc
Last active August 29, 2015 14:23
ubuntu envinronment settings
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicate lines or lines starting with space in the history.
package com.example.android.renderscriptintrinsic;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.AsyncTask;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
@easternHong
easternHong / RecordThread.java
Created January 26, 2015 13:35
实时输出mic音量
package com.hunt.androidtext;
import android.media.AudioFormat;
import android.media.AudioRecord;
import android.media.MediaRecorder;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
/**
@easternHong
easternHong / MultiStateButton.java
Last active August 29, 2015 14:14
MultiStateButton(play,pause,with progressbar),一个播放器的播放按钮有多重状态,在按钮上面嵌入进度条。
package com.hunt.androidtext;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
@easternHong
easternHong / GenerateQR.java
Created January 22, 2015 15:02
生成二维码
//Edited by mythou
//http://www.cnblogs.com/mythou/
  //要转换的地址或字符串,可以是中文
public void createQRImage(String url)
{
try
{
//判断URL合法性
if (url == null || "".equals(url) || url.length() < 1)
{
@easternHong
easternHong / StringUtils.java
Last active March 2, 2018 09:41
ByteArrayToHexString HexStringToByteArray
/**
* Utility method to convert a byte array to a hexadecimal string.
*
* @param bytes Bytes to convert
* @return String, containing hexadecimal representation.
*/
public static String ByteArrayToHexString(byte[] bytes) {
final char[] hexArray = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
char[] hexChars = new char[bytes.length * 2]; // Each byte has two hex characters (nibbles)
int v;