Skip to content

Instantly share code, notes, and snippets.

# defaults for jenkins continuous integration server
JENKINS_ARGS="-jnlpUrl http://test.lnc.jp:8080/computer/wock/slave-agent.jnlp"
# jenkins home location
JENKINS_HOME=/opt/jenkins-slave
# location of the jenkins war file
JENKINS_WAR=$JENKINS_HOME/slave.jar
# pulled in from the init script; makes things easier.
NAME=jenkins
@crazycode
crazycode / RULE.md
Last active November 14, 2023 08:25
安装Gerrit2以及使用说明

代码提交要求

  • 一个Commit对应一个修改点(除非是在项目初始阶段或是升级BSP时)。
  • 不要随便修改文件的属性。Windows 修改过的文件属性会变成755,上传代码时请注意修改成文件的原属性,可以用git whatchanged 来查看自己commit修改的文件。 缩进格式跟原文件保持一致。
  • 不要修改跟提交内容无关的代码。

Git commit 注释要求

  • 设置GIT使用vim来编辑commit,请不要使用-m参数 (git config –global core.editor vim)。
# Start the old vagrant
$ vagrant init centos-6.4
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@crazycode
crazycode / gist:53bd7a5b8ea8bad7ec56
Last active September 20, 2019 04:25
ORACLE 11G R2静默安装配置 - UTF-8
@crazycode
crazycode / gist:92a1f91dfb60ca231f2d
Last active August 29, 2015 14:04
Linuxx64-Oracle静默安装-zhs16gbk (安装在vagrant上,供开发使用,密码统一为OraPwd11)
---
layout: post
title: Linux.x64 Oracle安装
date: 2013-09-21 23:51:11
comments: true
categories: [error,java,bash,bi,oracle,database,centos,linux]
---
## 安装JDK
+ 1.直接执行
@crazycode
crazycode / gist:7669950
Last active December 29, 2015 12:19 — forked from AstonJ/gist:2896818
#get root access
$su -
$ cd /tmp
#Remove old Ruby
$ yum remove ruby
# Install dependencies
$ yum groupinstall "Development Tools"
$ yum install zlib zlib-devel
@crazycode
crazycode / 1.CacheCallBack.java
Last active December 24, 2015 14:09
Play Framework缓存封装,提供回调方式使用缓存;并提供批量更新缓存的实现。
package cache;
/**
* cache回调接口.
*/
public interface CacheCallBack<T> {
T loadData();
}
# play status --secret=aC3NL1k6Zn9XEZbvMO6
~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~
~ play! 1.2.4, http://www.playframework.org
~
~ Status from http://localhost:9402/@status,
@crazycode
crazycode / gist:4970741
Last active August 3, 2018 08:33
用于出现乐观锁重试的代码
package util.transaction;
import play.Logger;
import play.db.jpa.JPA;
public class TransactionRetryUtil {
private static final int MAX_TRIED_TIMES = 15;
public static <T> T run(TransactionCallback<T> callback) {
for (int i = 0; i < MAX_TRIED_TIMES; i++) {
try {
@crazycode
crazycode / gist:4133390
Created November 23, 2012 00:03
playframework 1.x await
public static void syncAmazon(final String sid) {
// play status 检查平均耗时 2.5s , 开放线程时间 3s 后回掉
await(new Job<Selling>() {
@Override
public Selling doJobWithResult() throws Exception {
Selling selling = Selling.findById(sid);
selling.syncFromAmazon();
return selling;
}