Skip to content

Instantly share code, notes, and snippets.

View mcxiaoke's full-sized avatar

Hello World mcxiaoke

  • Earth
View GitHub Profile
@mcxiaoke
mcxiaoke / main_AndroidManifest.xml
Last active August 27, 2015 13:52 — forked from hzqtc/main_AndroidManifest.xml
Android FlowLayout demo.
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="hzqtc.flowlayout"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19"/>
package com.cyrilmottier.android.resourcesadditions;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
import android.os.Bundle;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/**
* @author Cyril Mottier
@mcxiaoke
mcxiaoke / monkey.sh
Created February 13, 2014 08:25
monkey test script
#!/bin/bash
# -*- encoding: utf8 -*-
###############################################################
##
## Name: Monkey Script
## Version: 1.0 2013.09.03
## Version: 1.1 2013.09.05
## Version: 1.2 2013.09.06
## Author: mcxiaoke
##
configurations {
apt
}
dependencies {
compile 'com.squareup.dagger:dagger:1.1.0'
apt 'com.squareup.dagger:dagger-compiler:1.1.0'
}
android.applicationVariants.all { variant ->
@mcxiaoke
mcxiaoke / blockedlist.txt
Created February 20, 2014 02:10
china blocked sites list
[AutoProxy 0.2.9]
! Checksum: EMPBc5d/DRhWbxr3XYZ1uw
! Expires: 6h
! Last Modified: Thu, 13 Feb 2014 19:30:36 -0500
! HomePage: https://autoproxy-gfwlist.googlecode.com/
!--------------------Restricted--------------------
||darpa.mil
!--||dmm.com
||fxnetworks.com
import android.graphics.PointF;
import android.view.animation.Animation;
import android.view.animation.Transformation;
// http://www.math.ubc.ca/~cass/gfx/bezier.html
public class ArcTranslateAnimation extends Animation {
private int mFromXType = ABSOLUTE;
private int mToXType = ABSOLUTE;
@mcxiaoke
mcxiaoke / SafeFileNameGenerator.java
Created April 29, 2014 02:09
SafeFileNameGenerator for UniversalImageLoader
import com.nostra13.universalimageloader.cache.disc.naming.FileNameGenerator;
/**
* User: mcxiaoke
* Date: 14-4-28
* Time: 11:29
*/
public class SafeFileNameGenerator implements FileNameGenerator {
@Override
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_style": "solid",
"color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme",
"draw_minimap_border": true,
"enable_telemetry": false,
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
#!/bin/bash
# NOTE: this is an OSX launchd wrapper shell script for Tomcat (to be placed in $CATALINA_HOME/bin)
CATALINA_HOME=/Users/username/tomcat
function shutdown() {
date
echo "Shutting down Tomcat"
$CATALINA_HOME/bin/catalina.sh stop
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<style>
#progress-holder{width:200px;height:200px;background:green}
#progress{width:100%;height:100%;background:gray;}