Skip to content

Instantly share code, notes, and snippets.

@justinedelson
justinedelson / gist:1119360
Created August 2, 2011 00:46
diff between env in terminal and iterm2
2c2
< TERM_PROGRAM=Apple_Terminal
---
> TERM_PROGRAM=iTerm.app
4c4
< TERM=xterm-256color
---
> TERM=xterm
9d8
< TERM_PROGRAM_VERSION=297
<div class="bq_mainnav">
<ul>
<li class="bq_showNav">
<a href="/shows.html">Shows</a>
<ul class="bq_mainnavList">
<li>
<ul>
<li class="bq_title">
<img alt="" src="/etc/designs/betcom/img/logo_bet_nav_dropdown_shows.png">
</li>
@justinedelson
justinedelson / gist:851333
Created March 2, 2011 17:36
httpclient -> exodus
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.methods.StringRequestEntity;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class HttpPostBody {
private static Log log = LogFactory.getLog(HttpPostBody.class);
$ git clone git://github.com/justinedelson/jruby-osgi-testing.git
$ cd jruby-osgi-testing/tests
$ mvn -Djruby.version=1.6.0.RC1 clean install
blah blah blah... the service implementation tests fail due to JRUBY-5414
apply patch to JRUBY-5414 and rebuild...
$ cd $JRUBY_SRC
$ ant jar-complete
Then rerun tests
$ git clone git://github.com/justinedelson/jruby-osgi-testing.git
$ cd jruby-osgi-testing/tests
$ mvn -Djruby.version=1.6.0.RC1 clean test
blah blah blah... all tests pass
$ mvn -Djruby.version=1.5.6 clean test
blah blah blah... all tests fail
$ git clone git://github.com/justinedelson/jruby-osgi-testing.git
$ cd jruby-osgi-testing/tests
$ mvn -Djruby.version=1.6.0.RC1 clean test
blah blah blah... all tests pass
$ mvn -Djruby.version=1.5.6 clean test
blah blah blah... all tests fail
@Component(immediate = true)
public class Configurer {
@Reference
private ConfigurationAdmin cfgAdmin;
protected void activate(ComponentContext ctx) throws Exception {
Configuration cfg = cfgAdmin.getConfiguration(
"org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl", null);
Dictionary props = new Hashtable();
private void clearAcl(AccessControlList acl) {
acl.accessControlEntries.each {
acl.removeAccessControlEntry it
}
}
private AccessControlList findAcl(String path) {
def acl = null
getSession().getAccessControlManager().getPolicies(path).each { AccessControlPolicy policy ->
@justinedelson
justinedelson / sample launchpad war pom
Created April 12, 2010 14:55
This is a Maven pom using the Sling Launchpad plugin. It creates a WAR file which includes Sling and the Felix Shell bundle.
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
diff --git a/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/bundlelist/BaseBundleList.java b/maven/mave
index cd838c8..43b78fc 100644
--- a/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/bundlelist/BaseBundleList.java
+++ b/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/bundlelist/BaseBundleList.java
@@ -85,6 +85,7 @@ public abstract class BaseBundleList {
}
StartLevel sl = new StartLevel();
+ getStartLevels().add(sl);
sl.setLevel(startLevel);