Skip to content

Instantly share code, notes, and snippets.

View larrycai's full-sized avatar
💭
I may be slow to respond.

Larry Cai larrycai

💭
I may be slow to respond.
View GitHub Profile
@larrycai
larrycai / sample1.tex
Created February 1, 2012 14:25
regex in ruby to convert from sample1.tex to sample2.tex ?
\begin{enumerate}\setlength{\itemsep}{1pt}\setlength{\parskip}{0pt}\setlength{\parsep}{0pt}
\item
item1
\item
item2
\end{enumerate}
\begin{enumerate}\setlength{\itemsep}{1pt}\setlength{\parskip}{0pt}\setlength{\parsep}{0pt}
\item
@larrycai
larrycai / env.rb
Created March 12, 2012 14:37
make aruba work for unix and windows under cucumber
require 'aruba/cucumber'
module ArubaOverrides
def detect_ruby(cmd)
processor, platform, *rest = RUBY_PLATFORM.split("-")
#puts platform
if platform =~ /w32$/ && cmd =~ /^mkbok / #mkbok is the real command in features
"ruby -I../../lib -S ../../bin/#{cmd}"
else
"#{cmd}"
end
@larrycai
larrycai / hello2.py
Created December 16, 2012 15:56 — forked from anonymous/hello2.py
update the bug for passing parameter
#!/usr/bin/env python
"""
hello2.py hello world sample
Usage: hello2.py [options]
Options:
-m messages message list, separare by ','
-h this help
Mail bug reports and suggestion to : Larry Cai <larry.caiyu AT gmail.com>
@larrycai
larrycai / log.md
Created July 25, 2013 07:56
can't upgrade python package in ubuntu 12.10 using pip 1.3.1 and pip 1.4 has error in list

Try to use pip to install python packages like vcrpy in standard ubuntu 12.10

it seems there is problem to upgrade using pip 1.3.1

see log below

# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.10

DISTRIB_CODENAME=quantal

@larrycai
larrycai / all-testcase.txt
Created August 20, 2013 00:47
sample files for parallel test executor plugin demo
testcase_0
testcase_1
testcase_2
testcase_3
testcase_4
testcase_5
testcase_6
testcase_7
testcase_8
testcase_9
@larrycai
larrycai / ci.coffee
Created January 16, 2014 05:20
it is jenkins coffeescript used for hubot, it use jenkins-api nodejs module.
# Description:
# Interact with your Jenkins CI server
#
# Dependencies:
# None
#
# Configuration:
# HUBOT_JENKINS_HOST
# HUBOT_JENKINS_AUTH
#
#!/usr/bin/env python
import sys
import urllib2
import ssl
import lxml
import lxml.html
CTX = ssl.create_default_context()
CTX.check_hostname = False
CTX.verify_mode = ssl.CERT_NONE
@larrycai
larrycai / README.md
Created April 2, 2015 00:25
RabbitMQ + Python in docker
@larrycai
larrycai / complete.groovy
Last active June 24, 2017 00:09
CodingWithMe Learn JobDSL for Jenkins in 90 minutes
freeStyleJob("Hello3") {
logRotator(2, 30)
scm {
git('https://github.com/larrycai/docker-images.git')
}
triggers {
scm('H/15 * * * *')
}
wrappers {
preBuildCleanup()
@larrycai
larrycai / Jenkinsfile
Created September 6, 2017 19:43 — forked from abayer/Jenkinsfile
An example Declarative Pipeline Jenkinsfile for Feb 15 2017 demo
// A Declarative Pipeline is defined within a 'pipeline' block.
pipeline {
// agent defines where the pipeline will run.
agent {
// This also could have been 'agent any' - that has the same meaning.
label ""
// Other possible built-in agent types are 'agent none', for not running the
// top-level on any agent (which results in you needing to specify agents on
// each stage and do explicit checkouts of scm in those stages), 'docker',