Skip to content

Instantly share code, notes, and snippets.

Avatar

Domantas Jackūnas JackLeo

View GitHub Profile
@JackLeo
JackLeo / activecollab2openproject.py
Last active Oct 20, 2019
Active Collab migration to Open Project
View activecollab2openproject.py
import json
import urllib
import urllib2
import xml.dom.minidom
# AC: OP
project_slugs = {
'tu-munich': 'new-project',
}
@JackLeo
JackLeo / git_combine
Created Mar 18, 2014
simple and crude script to combine few repos to one on master branch
View git_combine
#!/bin/bash
if [ ! $# -gt 2 ]; then
echo "Usage: ./git_combine.sh new_repo_folder repo_folder repo_folder ..."
exit
fi
if [ ! -d $1 ]; then
mkdir $1
fi
@JackLeo
JackLeo / config2object.py
Last active Dec 11, 2015
Converts configparser config to object with attributes relative to config For example config: [test] foo=bar will become: settings.TEST_FOO = 'bar'
View config2object.py
import os
import ConfigParser
class Settings(object):
pass
def boolify(item):
return {'True': True, 'False': False}[item]
@JackLeo
JackLeo / iframe_middleware.py
Created Dec 22, 2011 — forked from krikulis/iframe_middleware.py
Django IFrame session Safari FIX
View iframe_middleware.py
from django.http import HttpResponse
from django.conf import settings
SESSION_COOKIE_NAME = getattr(settings, 'SESSION_COOKIE_NAME')
class SafariIFrameFixMiddleware(object):
"""
Middleware fixes sessions with Safari browser in iframes