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 / nexus.md
Created March 8, 2017 15:47 — forked from diegopacheco/nexus.md
How to Install Nexus on Ubuntu?

Download and Install Nexus

sudo wget http://www.sonatype.org/downloads/nexus-latest-bundle.zip
sudo chmod 777 nexus-2.11.4-01-bundle.zip
sudo unzip nexus-2.11.4-01-bundle.zip
cd nexus-2.11.4-01/bin
sudo RUN_AS_USER=root ./nexus start
@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 / AngularJS+WebSocket
Created December 15, 2014 02:59
AngularJS+WebSocket
//WebSocket
.factory('WebsocketService', ['$rootScope', '$timeout', function ($rootScope, $timeout) {
var _ws;
var _username = '';
var messages = [];
var users = [];
function onMessage(e) {
var data = JSON.parse(decodeURIComponent(e.data));
@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];
}
[ [ 21.596119999999999,
112.0187,
"YUEJIANGCHENG90609",
2,
78,
26,
"CN",
412477316,
15,
23,
@yangboz
yangboz / free-transform-manager.as
Created March 25, 2014 07:44
free-transform-manager sample code
package
{
import com.ryan.geom.FreeTransformManager;
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.events.Event;
public class Main extends Sprite
{
@yangboz
yangboz / Obj-C_Singleton.m
Created March 25, 2014 01:42
Obj-C_Singleton.m example code
//
// Common Objective-C Singleton Class.m
// iOS
//
// Created by yangboz on 03-25-14.
// Copyright (c) 2013年 GODPAPER. All rights reserved.
//
#import "App42_API_Utils.h"
@yangboz
yangboz / FLEX4.6.0_Air3.8_build_swc.xml
Last active August 29, 2015 13:57
FLEX ant file with as3 library project feature
<?xml version="1.0" encoding="utf-8"?>
<!-- This build file provdes a close approximation of the build process
and build settings inside Flash Builder, but it is not an exact copy.
Please customize this file as necessary. -->
<!-- Generated from project settings as of 3/18/14 6:45 PM -->
<project name="XXXXLib1.0" default="build" basedir=".">
<property name="FLEX_HOME" value="C:\Software\FLEX\sdks\4.6.0_Air3.8"/>
<property name="SDK_VERSION" value="4.6.0"/>
@yangboz
yangboz / Jenkins-static-analysis.jelly
Created February 25, 2014 08:12
static-analysis.jelly with Status/AllChanges/Artifacts/PMD/JUnitTest/Cobertura reporting.
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define">
<STYLE>
BODY, TABLE, TD, TH, P {
font-family:Verdana,Helvetica,sans serif;
font-size:11px;
color:black;
}
h1 { color:black; }
h2 { color:black; }