- https://saml.github.io
This file contains 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/python | |
'parses `svn log` and outputs as one line per commit' | |
import sys | |
import re | |
import datetime | |
user_filter = None |
This file contains 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/python | |
import urllib2 | |
import urllib | |
import base64 | |
import json | |
import pprint | |
def curl(url, username=None, password=None, method='GET', data=None): | |
'''simple HTTP util. similar to curl |
This file contains 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
#!/bin/bash | |
if (( $# < 1 )) | |
then | |
echo "Usage: $0 json url [cred, default=admin:admin]" | |
echo "example: $0 /tmp/content.tidy.-1.json http://localhost:4502/content/copy" | |
exit 1 | |
fi | |
j="$1" |
This file contains 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
#!/bin/bash | |
if (( $# < 1 )) | |
then | |
echo "Usage: $0 bundleId [host default=localhost:4502] [cred default=admin:admin]" | |
echo "restarts osgi bundle using felix web console." | |
echo "ex, $0 org.apache.sling.scripting.jsp" | |
exit 1 | |
fi |
This file contains 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
#!/bin/bash | |
if (( $# < 3 )) | |
then | |
echo "usage: $0 src-host src-path dest-host [dest-path] [vlt rcp options]" | |
exit 1 | |
fi | |
read -s -p "src-cred [default=admin:admin]: " cred1 | |
if [[ -z "$cred1" ]] |
This file contains 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 | |
public synchronized void run() { | |
LOG.debug("start..."); | |
ResourceResolver resolver = null; | |
Session session = null; | |
try { | |
resolver = resolverFactory.getAdministrativeResourceResolver(null); | |
session = resolver.adaptTo(Session.class); | |
//do stuff... |
This file contains 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
Day job: Day CQ Enterprise Java Content Management System Expert and Adobe Technology Evangelist | |
Favorite Python project: pypy | |
Favorite Conference: icfp | |
Python Experience Level: web scaling in the cloud |
This file contains 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
#!/bin/bash | |
f="include/event2/event-config.h" | |
echo '/* event2/event-config.h' > $f | |
echo ' *' >> $f | |
echo ' * This file was generated by autoconf when libevent was built, and post-' >> $f | |
echo ' * processed by Libevent so that its macros would have a uniform prefix.' >> $f | |
echo ' *' >> $f | |
echo ' * DO NOT EDIT THIS FILE.' >> $f | |
echo ' *' >> $f | |
echo ' * Do not rely on macros in this file existing in later versions.'>> $f |
This file contains 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
#!/bin/bash | |
if (( $# < 1)) | |
then | |
echo "Usage: $0 host:port" | |
echo "example" | |
echo " $0 localhost:4502 < admin-password.txt" | |
exit 1 | |
fi |
This file contains 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
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Network (listenOn, PortID(PortNumber)) | |
import Network.Socket (accept, withSocketsDo, sClose) | |
import Network.Socket.ByteString (sendAll) | |
import Control.Concurrent (forkIO) | |
import qualified Data.ByteString.Lazy.Char8 as LazyByte (toChunks) | |
import qualified Data.ByteString as WordByte (concat) |