Skip to content

Instantly share code, notes, and snippets.

View yangboz's full-sized avatar
:octocat:
lifelong learner

yangbo.zhou yangboz

:octocat:
lifelong learner
View GitHub Profile
@yangboz
yangboz / JAVA_findbugs.xml
Created October 23, 2012 06:52
Ant xml example for JAVA code find bugs.
<?xml version="1.0"?>
<project name="XXX Application Build with find bugs" default="run"
basedir="../">
<description>
Ant build sample for running
- findbugs,
</description>
<!-- Change the paths to your individual installation directories -->
@yangboz
yangboz / FLEX_unit_test.xml
Created October 23, 2012 07:40
Ant xml example for FLEX/AS3 code unit test.
<!--
This is intended to be a simple build file, created a suggestion for the necessary steps need to utilize the FlexUnit4 Ant task.
For the most detail when running this build, call "ant -v clean package". The build uses a simple lifecycle of:
clean->init->compile->test->package
The end goal is to produce a zip of a website you could deploy for your application. This build is not intended to be an example
for how to use Ant or the Flex SDK Ant tasks. This is just one possible way to utilize the FlexUnit4 Ant tasks.
-->
<project name="XXX_Flex_UnitTest" basedir="." default="test">
@yangboz
yangboz / FLEX_PMD.xml
Last active October 11, 2015 23:38
Ant xml example for FLEX/AS3 code PMD.
<project name="XXX_Flex_PMD"
default="flexPmdWithCustomRuleset">
<description>
Example Of Flex PMD
</description>
<property name="projecthome"
value="${basedir}"/>
<property name="flexpmd.version"
@yangboz
yangboz / FLEX_asdoc.xml
Last active October 11, 2015 23:38
Ant xml example for FLEX/AS3 code document.
<project name="GODPAPER_ASDOC"
basedir="."
default="docs">
<property name="FLEX_HOME"
value="C:\Software\FLEX\sdks\4.6.0"/>
<property name="OUTPUT_DIR"
value="${basedir}/target/asdoc"/>
<taskdef resource="flexTasks.tasks"
classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<property name="flexlib" location="${FLEX_HOME}/frameworks"/>
@yangboz
yangboz / FLEX_build.xml
Created October 23, 2012 07:36
Ant xml example for FLEX/AS3 code build.
<?xml version="1.0" encoding="utf-8"?>
<!-- myMXMLCBuild.xml -->
<project name="XXX_Flex_Compile"
basedir="."
default="main">
<property name="FLEX_HOME"
value="C:\Flex\sdks\flex_sdk_3.5.0_code_coverage"/>
<property name="TARGET_PLAYER"
value="11.3.0"/>
<property name="APP_ROOT"
@yangboz
yangboz / java_checkstytle.xml
Created October 18, 2012 06:00
Ant xml for JAVA check style.
<?xml version="1.0"?>
<project name="XXX Application Build with check style" default="run" basedir="../">
<description>
Ant build sample for running
- checkstyle,
</description>
<!-- Change the paths to your individual installation directories -->
<property name="checkstyle.home.dir" location="${basedir}/tools/checkstyle/"/>
@yangboz
yangboz / Flare3dP2pExample
Created July 17, 2012 05:34
Flare3dP2pExample
package
{
//--------------------------------------------------------------------------
//
// Imports
//
//--------------------------------------------------------------------------
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
@yangboz
yangboz / linux_find_folder_name_before_timestamp
Created September 30, 2015 09:11
Linux find folder name before timestamp(20150930)
CHBIN-M-Q0AA@[~/Projects]
$> find ./dingding_bonus -type d -print | sed -n -e '/[0-9]\{8,8\}$/p' | sed -n -e 's/\(.*\)\/\([0-9]\{8,8\}\)$/\1\/\2##\2/gp;' | awk -F '##' '{if(int($2) < cmpVl)print $1}' cmpVl="20150910"
./dingding_bonus/20150902
./dingding_bonus/20150903
./dingding_bonus/20150904
./dingding_bonus/20150905
./dingding_bonus/20150906
./dingding_bonus/20150907
./dingding_bonus/20150908
./dingding_bonus/20150909
@yangboz
yangboz / pylint.xml
Created June 29, 2015 09:52
Ant Pylint with Jenkins
<!--
@ref: http://chrigl.de/blogentries/integration-of-pylint-into-jenkins
@ref: http://redsolo.blogspot.com/2007/11/hudson-embraces-python.html
@more: http://bitten.edgewall.org/wiki/Documentation/commands.html
-->
<project default="all" basedir="../">
<!--
Define an environment variable pointing to PyLint folder or change this
-->
<property environment="env"/>
@yangboz
yangboz / iOS view life circle code snippet
Created May 17, 2014 01:54
iOS view life circle code example
@implementation
- (void)setup {
// Non-UI initialization goes here. It will only ever be called once.
}
- (id)initWithNibName:(NSString *)nibName bundle:(NSString *)bundle {
if ((self = [super initWithNibName:nibName bundle:bundle])) {
[self setup];
}