Skip to content

Instantly share code, notes, and snippets.

View kohsuke's full-sized avatar
🏠
WFH

Kohsuke Kawaguchi kohsuke

🏠
WFH
View GitHub Profile
[~/ws/jenkins/git-userContent-plugin@griffon] (master)
% git clone ssh://localhost:22222/userContent.git ws
Cloning into 'ws'...
remote: Counting objects: 9, done
remote: Finding sources: 100% (9/9)
remote: Total 9 (delta 0), reused 9 (delta 0)
Receiving objects: 100% (9/9), 610 bytes, done.
[~/ws/jenkins/git-userContent-plugin@griffon] (master)
% cd ws
[~/ws/jenkins/git-userContent-plugin/ws@griffon] (master)
total 2.3G
drwxrwxr-x 2 kohsuke kohsuke 4.0K Aug 3 15:42 .
drwx------ 5 kohsuke kohsuke 4.0K Aug 3 15:24 ..
-rw-rw-r-- 1 kohsuke kohsuke 87M Aug 3 15:42 日本Jenkinsユーザ会_ch927(日本Jenkinsユーザ会セカンド)_lv101726033(Jenkinsユーザ・カンファレンス2012東京@406)_timeshift1.flv
-rw-rw-r-- 1 kohsuke kohsuke 16K Aug 3 15:42 日本Jenkinsユーザ会_ch927(日本Jenkinsユーザ会セカンド)_lv101726033(Jenkinsユーザ・カンファレンス2012東京@406)_timeshift1.xml
-rw-rw-r-- 1 kohsuke kohsuke 365M Aug 3 15:42 日本Jenkinsユーザ会_ch927(日本Jenkinsユーザ会セカンド)_lv101726033(Jenkinsユーザ・カンファレンス2012東京@406)_timeshift2.flv
-rw-rw-r-- 1 kohsuke kohsuke 2.0K Aug 3 15:42 日本Jenkinsユーザ会_ch927(日本Jenkinsユーザ会セカンド)_lv101726033(Jenkinsユーザ・カンファレンス2012東京@406)_timeshift2.xml
-rw-rw-r-- 1 kohsuke kohsuke 14M Aug 3 15:42 日本Jenkinsユーザ会_ch927(日本Jenkinsユーザ会セカンド)_lv101726033(Jenkinsユーザ・カンファレンス2012東京@406)_timeshift3.flv
-rw-rw-r-- 1 kohsuke kohsuke 2.6K Aug 3 15:42 日本Jenkinsユーザ会_ch927(日本Jenkinsユーザ会セカンド)_lv101726033(Jenkinsユーザ・カンファレンス2012東京@406)_timeshift3.xml
-rw-rw-r-- 1 kohsuke kohsuke 1.7M Aug 3 15:42
"scheduler_Worker-5" daemon prio=10 tid=0x0000000041cfc800 nid=0x2e6b runnable [0x00007f52a6ae5000]
java.lang.Thread.State: RUNNABLE
at net.sf.hibernate.impl.SessionImpl.updateReachableCollection(SessionImpl.java:2915)
at net.sf.hibernate.impl.FlushVisitor.processCollection(FlushVisitor.java:32)
at net.sf.hibernate.impl.AbstractVisitor.processValue(AbstractVisitor.java:69)
at net.sf.hibernate.impl.AbstractVisitor.processValues(AbstractVisitor.java:36)
at net.sf.hibernate.impl.SessionImpl.flushEntity(SessionImpl.java:2622)
at net.sf.hibernate.impl.SessionImpl.flushEntities(SessionImpl.java:2488)
at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2283)
at net.sf.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1817)
public static String getActionUrl(String itUrl,Action action) {
String urlName = action.getUrlName();
if(urlName==null) return null; // to avoid NPE and fail to render the whole page
if(SCHEME.matcher(urlName).find())
return urlName; // absolute URL
if(urlName.startsWith("/"))
return joinPath(Stapler.getCurrentRequest().getContextPath(),urlName);
else
// relative URL name
return urlName;
"pool-3-thread-1" Id=33 Group=main TIMED_WAITING
at java.lang.Thread.sleep(Native Method)
at com.cloudbees.hudson.service.BaseRequest.poll(BaseRequest.java:70)
at com.cloudbees.hudson.service.AcquireSlaveRequest.acquire(AcquireSlaveRequest.java:90)
at com.cloudbees.hudson.service.ProvidoreSwarm.acquire(ProvidoreSwarm.java:77)
at com.cloudbees.hudson.plugins.SwarmCloud$1.call(SwarmCloud.java:105)
at com.cloudbees.hudson.plugins.SwarmCloud$1.call(SwarmCloud.java:97)
@kohsuke
kohsuke / gist:2844371
Created May 31, 2012 15:56
Running cucumber embedded with pry-plugin
require 'cucumber/cli/main'
Cucumber::Cli::Main.new(['cucumber-test/features'],output,output).execute!
class Foo
def initialize
@x=10
end
end
f = Foo.new
i = 1
b = f.instance_eval do
# this binding can see all members of f (like @x) as well as variables in the outer sopce (like i)
% nmap -P0 -p 22 repo-internal.cloudbees.com
Starting Nmap 5.21 ( http://nmap.org ) at 2012-05-25 17:51 PDT
Nmap scan report for repo-internal.cloudbees.com (184.73.168.54)
Host is up.
rDNS record for 184.73.168.54: ec2-184-73-168-54.compute-1.amazonaws.com
PORT STATE SERVICE
22/tcp filtered ssh
Nmap done: 1 IP address (1 host up) scanned in 2.10 seconds
ClassLoader old = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
try {
... call into Velocity ...
} finally {
Thread.currentThread().setContextClassLoader(old);
}
% git remote -v
origin ssh://[email protected]/cloudbees/jenkins-validated-merge-plugin.git (fetch)
origin ssh://[email protected]/cloudbees/jenkins-validated-merge-plugin.git (push)
[~/ws/cloudbees/jenkins-validated-merge-plugin@atlas] (master)
% git push origin
usage: gitosis-serve [OPTS] USER
gitosis-serve: error: Missing argument USER.
fatal: The remote end hung up unexpectedly