Skip to content

Instantly share code, notes, and snippets.

View maciejmalycha's full-sized avatar

Maciej Małycha maciejmalycha

  • @Cognifide
  • Bydgoszcz
View GitHub Profile
@maciejmalycha
maciejmalycha / mediawiki_to_confluence.py
Created August 17, 2017 08:05
Translate Mediawiki backup to Confluence source editor format
import re
class Wiki2Confluence(object):
def __init__(self, filename):
super(Wiki2Confluence, self).__init__()
f = open(filename)
self.lines = f.readlines()
@maciejmalycha
maciejmalycha / MutableHttpServletRequest.java
Last active August 28, 2017 17:07
Mutable HttpServletRequest
public class MutableHttpServletRequest extends HttpServletRequestWrapper {
private Map<String,String[]> parameters = new HashMap<String,String[]>();
public MutableHttpServletRequest(HttpServletRequest request) {
super(request);
}
public void setParameter(String name, String value) {
parameters.put(name, new String[] {value});