Skip to content

Instantly share code, notes, and snippets.

View maximegaillard's full-sized avatar

Maxime Gaillard maximegaillard

View GitHub Profile
@maximegaillard
maximegaillard / authz.sh
Created March 19, 2018 08:41
WIP Orthanc authz setup script
name=AUTHZ
conf=authorization
settings=(WEBSERVICE TOKEN_HTTP_HEADERS TOKEN_HTTP_COOKIES)
plugin=libOrthancAuthorization
default=true
function genconf {
cat <<-EOF >"$1"
{
"Authorization": {
"WebService": "$WEBSERVICE",

Keybase proof

I hereby claim:

  • I am maximegaillard on github.
  • I am maximegaillard (https://keybase.io/maximegaillard) on keybase.
  • I have a public key ASBGRKeP1egwgf2Jg6FkK6vMceki6A02ConPJl9sW4iKKgo

To claim this, I am signing this object:

@maximegaillard
maximegaillard / .travis.yml
Created January 21, 2014 16:49
Travis configuration to publish your Pelican site/blog to S3 from TravisCI
language: python
python:
- 2.7
virtualenv:
system_site_packages: true
env:
global:
- your_secure_BLOG_KEY_variable
@maximegaillard
maximegaillard / vosae_launcher
Last active December 27, 2015 13:29
Applescript to launch Vosae in iterm2 terminals/tabs You must have virtualenvwrapper properly configured with in your vosae-app postactivate script something like cd ~/my_folder/vosae-app/ and in your vosae-web postactivate script something like cd ~/my_folder/vosae-app/
#!/usr/bin/osascript
-- Applescript to launch Vosae in iterm2 terminals/tabs:
--
-- Run from terminal with `osascript` or just ./<<script>>
-- Dont unfocus with the mouse/keyboard while executing. the script.
-- Recomended to go full screen (CMD + Enter) if <zoomout> attributes used.
-- Change myTermWindow and myItem(s) as desired.
--
--
-- Source https://github.com/luismartingil/scripts/blob/master/iterm_launcher02.applescript
@maximegaillard
maximegaillard / install_pytho27.sh
Created November 7, 2012 09:23 — forked from ftao/install_pytho27.sh
install python 2.7 on debian 6
#!/bin/sh
mkdir ~/down/
cd ~/down/
sudo apt-get install build-essential
wget http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
tar -xzf Python-2.7.3.tgz
cd Python-2.7.3
sudo apt-get install libsqlite3-dev zlib1g-dev libncurses5-dev
sudo apt-get install libgdbm-dev libbz2-dev libreadline5-dev
sudo apt-get install libssl-dev libdb-dev
@maximegaillard
maximegaillard / gist:1216644
Created September 14, 2011 14:05
Django Middleware Compress HTML
import re
from django.utils.html import strip_spaces_between_tags
from django.conf import settings
RE_MULTISPACE = re.compile(r"\s{2,}")
RE_NEWLINE = re.compile(r"\n")
class MinifyHTMLMiddleware(object):
def process_response(self, request, response):
if 'text/html' in response['Content-Type'] and settings.COMPRESS_HTML: