Skip to content

Instantly share code, notes, and snippets.

/*
* Copyright (C) 2011 Patrik Åkerfeldt
*
* 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
package com.example.touch;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.webkit.ConsoleMessage;
import android.webkit.WebChromeClient;
{
"pages": [
{
"totals": 80,
"perpagenum": 10,
"allpage": 8,
"cpage": 1
}
],
"typeApps": [

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Sat, 28 Apr 2012 15:50:19 GMT till Sun, 28 Apr 2013 15:50:19 GMT.

Only first 1000 GitHub users according to the count of followers are taken. Sorting algo in pseudocode:

githubUsers
  .filter((user) -> user.followers > 172)
 .sortBy('contributions')
@dzwillpower
dzwillpower / FileGBK2UTF8.java
Created May 13, 2013 08:04
transform GBK file to TUF8 将编码为GBK的文件转换为UTF-8
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
@dzwillpower
dzwillpower / ViewFrameIndicator.java
Created May 16, 2013 07:18
Used to draw a custom overly over a target view
package cn.ipanel.android.widget;
import cn.ipanel.android.Logger;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.app.Activity;
import android.graphics.Rect;
import android.os.Build;
import android.view.View;
@dzwillpower
dzwillpower / gist:5612497
Last active December 17, 2015 12:49
Android 常用代码片段 Android common in use code snippet #常用代码片段
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#53c1bd" android:state_selected="true"/>
<item android:color="#53c1bd" android:state_focused="true"/>
<item android:color="#53c1bd" android:state_pressed="true"/>
<item android:color="#777777"/>
</selector>
/**
文字根据状态更改颜色 放在res/color/目录下 android:textColor*/
{
"code": 0,
"msg": "OK",
"info": {
"list": [
{
"appid": "141",
"appname": "云存储",
"apkname": "mobi.w3studio.android.apps.eyuntv",
"Img1": "http://amsfile.tv189.cn:8082/autofs/amsupload/amsupload/images/20130327/13643632896669.png",
/*
* Copyright (C) 2008 The Android Open Source Project
*
* 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
require "open-uri"
require "rubygems"
require "json"
USERNAME = "henrik"
query = ARGV.first.downcase
gists = JSON.parse(open("http://gist.github.com/api/v1/json/gists/#{USERNAME}").read)['gists']