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
FROM ubuntu:12.04 |
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
FROM ubuntu:precise | |
MAINTAINER Christian Berg <[email protected]> | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise-security main" > /etc/apt/sources.list.d/security.list | |
RUN apt-get update | |
RUN apt-get upgrade -y && apt-get clean | |
RUN apt-get install -y openjdk-6-jre && apt-get clean |
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
set -g bell-action any | |
set -g default-terminal xterm | |
set -g display-panes-colour red | |
set -g message-bg cyan | |
set -g message-fg white | |
set -g mouse-select-pane on | |
set -g pane-border-bg default | |
set -g pane-border-fg cyan | |
set -g pane-active-border-bg default | |
set -g pane-active-border-fg white |
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
(defadvice magit-log-edit-commit (around magit-commit-babysitter) | |
"Make sure we have a nice commit message." | |
(let ((bad-commit-message nil) | |
(case-fold-search nil)) | |
(save-excursion | |
(beginning-of-buffer) | |
(unless (string-match "[A-Z]" (string (char-after (point-min)))) | |
(setq bad-commit-message "Commit message should begin with a capital letter.")) | |
(end-of-line) | |
(if (> (current-column) 50) |
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
escape `` | |
vbell off | |
startup_message off | |
hardstatus on | |
hardstatus alwayslastline | |
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a " |
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
(defn start-server [app] | |
"Initializes the App Engine services and (re-)starts a Jetty server | |
running the supplied ring app, wrapping it to enable App Engine API use | |
and serving of static files." | |
(set-app-engine-delegate "/tmp") | |
(swap! *server* (fn [instance] | |
(when instance | |
(.stop instance)) | |
(let [app (-> (routes login-routes app) | |
(wrap-local-app-engine) |
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
(defroutes login-routes | |
(GET "/_ah/login" [continue] (login-form continue)) | |
(POST "/_ah/login" [action email isAdmin continue] (do (if (= action "Log In") | |
(login email (boolean isAdmin)) | |
(logout)) | |
(redirect continue))) | |
(GET "/_ah/logout" [continue] (do (logout) | |
(redirect continue)))) |
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
(defn login | |
([email] (login email false)) | |
([email admin?] (swap! login-info merge {:email email | |
:logged-in? true | |
:admin? admin?}))) | |
(defn logout [] | |
(swap! login-info merge {:email "" | |
:logged-in? false | |
:admin? false})) |
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
(defn- set-app-engine-environment [] | |
"Sets up the App Engine environment for the current thread." | |
(let [att (HashMap. {"com.google.appengine.server_url_key" | |
(str "http://localhost:" *port*)}) | |
env-proxy (proxy [ApiProxy$Environment] [] | |
(isLoggedIn [] (:logged-in? @login-info)) | |
(getEmail [] (:email @login-info)) | |
(getAuthDomain [] (:auth-domain @login-info)) | |
(isAdmin [] (:admin? @login-info)) | |
(getRequestNamespace [] "") |
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
(def login-info (atom {:logged-in? false | |
:admin? false | |
:email "" | |
:auth-domain ""})) |