This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/geoserver/catalog.py b/src/geoserver/catalog.py | |
index 8f5331e..4f0a2e5 100644 | |
--- a/src/geoserver/catalog.py | |
+++ b/src/geoserver/catalog.py | |
@@ -56,6 +56,12 @@ class Catalog(object): | |
None, | |
self.http | |
)) | |
+ orig_req = self.http.request | |
+ def wrapped_request(*args, **kwargs): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val file = new java.io.FileInputStream(args(0)) | |
val inflater = new java.util.zip.InflaterInputStream(file) | |
val bytes = Iterator.continually(inflater.read) takeWhile(-1 !=) | |
bytes.foreach(System.out.write) | |
System.out.flush() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait MyString { | |
def theString: String | |
} | |
case class AString(theString: String) extends MyString | |
case class IntAsString(theInt: Int) extends MyString { | |
def theString = theInt.toString | |
} | |
object MyString { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override def repositories = super.repositories ++ Set( | |
"fusesource.m2" at "http://repo.fusesource.com/nexus/content/repositories/public/" | |
) | |
override def libraryDependencies = super.libraryDependencies ++ Set( | |
"org.fusesource.scalate" % "scalate-core" % "1.3.2" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def reverse[A](xs: List[A]): List[A] = { | |
def reverse0(xs: List[A], accum: List[A]): List[A] = | |
xs match { | |
case Nil => accum | |
case h :: t => reverse0(t, h :: accum) | |
} | |
reverse0(xs, Nil) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from geoserver.catalog import Catalog | |
cat = Catalog('http://demo.geonode.org/geoserver-geonode-dev/rest/') # + username, password)... | |
def check(x): | |
for name in dir(x): | |
if getattr(x, name) is None: | |
print x, name, "IS NONE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkup() { | |
REPO="$1" | |
WORKING_DIR="$2" | |
if [ -d "${WORKING_DIR}" ]; | |
then | |
echo "Updating ${WORKING_DIR} from upstream" | |
# (cd "${WORKING_DIR}" && git pull) | |
else | |
git clone "${REPO}" "${WORKING_DIR}" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apache-tomcat-6.0.32/bin/catalina.sh start | |
paster serve --reload riab_geonode/riab/deploy/project.paste.ini | |
apache-tomcat-6.0.32/bin/catalina.sh stop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from geoserver.catalog import Catalog | |
cat = Catalog('http://host/geoserver/rest', 'user', 'password') | |
def internal_name(s): | |
return s.startswith("__") and s.endswith("__") | |
def check(x): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override def managedStyle = ManagedStyle.Maven | |
lazy val publishTo = Resolver.file("local maven repo", (Path.userHome / ".m2" / "repository") asFile) |