Skip to content

Instantly share code, notes, and snippets.

View kohsuke's full-sized avatar
🏠
WFH

Kohsuke Kawaguchi kohsuke

🏠
WFH
View GitHub Profile
info: Applying configuration version '1316802610'
err: /Stage[main]/User-jieryn/User[jieryn]/ensure: change from absent to present failed: Could not create user jieryn: Execution of '/usr/sbin/useradd -d /home/jieryn -s /bin/bash -G infraadmin -M jieryn' returned 9: useradd: group jieryn exists - if you want to add this user to that group, use -g.
notice: /File[/home/jieryn]: Dependency User[jieryn] has failures: true
warning: /File[/home/jieryn]: Skipping because of failed dependencies
notice: /File[/home/jieryn/.ssh]: Dependency User[jieryn] has failures: true
warning: /File[/home/jieryn/.ssh]: Skipping because of failed dependencies
notice: /Stage[main]/User-jieryn/Ssh_authorized_key[jieryn]: Dependency User[jieryn] has failures: true
warning: /Stage[main]/User-jieryn/Ssh_authorized_key[jieryn]: Skipping because of failed dependencies
notice: Finished catalog run in 4.09 seconds
Manifest-Version: 1.0
Group-Id: org.jenkins-ci.plugins
Short-Name: subversion
Long-Name: Jenkins Subversion Plug-in
Url: http://wiki.jenkins-ci.org/display/JENKINS/Subversion+Plugin
Plugin-Version: 1.30-SNAPSHOT (private-08/12/2011 09:45-kohsuke)
Hudson-Version: 1.420
Jenkins-Version: 1.420
Plugin-Dependencies: ui-samples-plugin:1.420,maven-plugin:1.420
Plugin-Developers: Many:kohsuke abayer dodok1 dty huybrechts mindless
@kohsuke
kohsuke / gist:1273288
Created October 9, 2011 04:18
Jenkins温泉 ~/.m2/settings.xml
<settings>
<pluginGroups>
<pluginGroup>org.jenkins-ci.tools</pluginGroup>
</pluginGroups>
<mirrors>
<mirror>
<id>mirror-central</id>
<name>Maven Repository Manager running on repo.mycompany.com</name>
<url>http://192.168.11.4:8081/artifactory/central-mirror</url>
<f:entry title="">
<div align="right">
<f:repeatableDeleteButton />
</div>
</f:entry>
@kohsuke
kohsuke / gist:1371596
Created November 16, 2011 22:01
m[k] is O(N) not O(1) if m is Java map
public class MapJavaProxy extends ConcreteJavaProxy {
private static class RubyHashMap extends RubyHash {
@Override
public IRubyObject internalGet(IRubyObject key) {
Set<Map.Entry> entries = ((Map) ((JavaProxy)receiver).getObject()).entrySet();
for (Map.Entry entry : entries) {
IRubyObject rubyfiedKey = JavaUtil.convertJavaToUsableRubyObject(getRuntime(), entry.getKey());
if (key.eql(rubyfiedKey)) {
% JAVA_HOME=/usr/lib/jvm/java-6-openjdk /usr/bin/idea
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b23~pre10-0ubuntu5)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
WARNING: You are launching IDE using OpenJDK Java runtime.
THIS IS STRICTLY UNSUPPORTED DUE TO KNOWN PERFORMANCE AND GRAPHICS PROBLEMS!
NOTE: If you have both Oracle (Sun) JDK and OpenJDK installed
please validate either IDEA_JDK, JDK_HOME, or JAVA_HOME environment variable points to valid Oracle (Sun) JDK installation.
@kohsuke
kohsuke / gist:1531019
Created December 29, 2011 01:35
iptables
root@eggplant:/srv/jira/current/conf# iptables -nL
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 /* 000 accept all icmp requests */
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport ports 22 /* 001 accept inbound ssh requests */
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport ports 8080 /* 002 accept local traffic */
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport ports 8081 /* 003 accept local traffic */
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport ports 80 /* 100 accept inbound HTTP requests */
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 multiport ports 443 /* 101 accept inbound HTTPs requests */
DROP tcp -- 0.0.0.0/0 0.0.0.0/0 /* 999 drop all other requests */
@kohsuke
kohsuke / gist:1599586
Created January 12, 2012 09:36
netstat output
This file has been truncated, but you can view the full file.
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 1770/smbd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2438/haproxy
tcp 0 0 63.246.20.93:80 210.94.41.89:59601 SYN_RECV -
tcp 0 0 63.246.20.93:80 109.193.60.22:2522 SYN_RECV -
tcp 0 0 63.246.20.93:80 193.12.210.241:24425 SYN_RECV -
tcp 0 0 63.246.20.93:80 80.86.190.59:56084 SYN_RECV -
tcp 0 0 63.246.20.93:80 194.31.15.3:52054 SYN_RECV -
tcp 0 0 63.246.20.93:80 84.49.231.147:56046 SYN_RECV -
kohsuke@spinach:/tmp/foo/usr/bin$ sudo ./gstack 8003
#0 0x00007ff647a53b70 in __read_nocancel () from /lib/libpthread.so.0
#1 0x00000000004c312f in ?? ()
#2 0x00000000004c31a9 in ?? ()
#3 0x0000000000494d5b in ?? ()
#4 0x0000000000494db5 in ?? ()
#5 0x000000000046fef1 in ?? ()
#6 0x00000000004b9122 in ?? ()
#7 0x00000000004b85b5 in ?? ()
#8 0x0000000000424744 in ?? ()
% svn commit -m "exposed the timestamp"
Sending src/main/java/hudson/scm/SubversionChangeLogSet.java
Transmitting file data .
Committed revision 40346.
Warning: post-commit hook failed (exit code 2) with output:
Can't locate SVN/Notify.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/local/bin/svnnotify line 9.
BEGIN failed--compilation aborted at /usr/local/bin/svnnotify line 9.