This file contains hidden or 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- boot-spring | |
"Initialize a Jetty server for Spring and also Spring Security" | |
([server handler context-config-location] | |
(let [filter (doto (org.mortbay.jetty.servlet.FilterHolder. org.springframework.web.filter.DelegatingFilterProxy) | |
(.setName "springSecurityFilterChain")) | |
servlet (doto (org.mortbay.jetty.servlet.ServletHolder. (ring.util.servlet/servlet handler)) | |
(.setName "default")) | |
context (doto (org.mortbay.jetty.servlet.Context. server "/" | |
(bit-or org.mortbay.jetty.servlet.Context/SESSIONS | |
org.mortbay.jetty.servlet.Context/SECURITY)) |
This file contains hidden or 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 boot [] | |
(jetty/run-jetty #'app | |
{:port 9090 | |
:join? false | |
:configurator (fn [server] (boot-spring server #'app "classpath:security.xml")) | |
:default-handler? false})) |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans" | |
xmlns="http://www.springframework.org/schema/security" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd"> | |
<authentication-manager> | |
<authentication-provider> | |
<user-service> | |
<user name="user" password="1234" authorities="ROLE_USER"/> |
This file contains hidden or 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 main-routes | |
(GET "/" req (index-html req)) | |
(GET "/admin" req (example-html req)) | |
(GET "/user" req (example-html req)) | |
(GET "/other" req (example-html req)) | |
(route/resources "/") | |
(route/not-found "Page not found")) |
This file contains hidden or 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- boot-spring | |
"Initialize a Jetty server for Spring and also Spring Security" | |
([server handler context-config-location] | |
(let [filter (doto (org.mortbay.jetty.servlet.FilterHolder. org.springframework.web.filter.DelegatingFilterProxy) | |
(.setName "springSecurityFilterChain")) | |
servlet (doto (org.mortbay.jetty.servlet.ServletHolder. (ring.util.servlet/servlet handler)) | |
(.setName "default")) | |
context (doto (org.mortbay.jetty.servlet.Context. server "/" | |
(bit-or org.mortbay.jetty.servlet.Context/SESSIONS | |
org.mortbay.jetty.servlet.Context/SECURITY)) |
This file contains hidden or 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
(defproject mytest "1.0.0-SNAPSHOT" | |
:dependencies [[org.clojure/clojure "1.4.0"] | |
;; [org.clojure/google-closure-library "0.0-1376"] | |
;; [org.clojure/google-closure-library-third-party "0.0-1376"] | |
] | |
:plugins [[lein-cljsbuild "0.2.1"]] | |
:cljsbuild {:builds [{:source-path "src-cljs" | |
:compiler {:output-to "extension/mytest.js" | |
:optimizations :advanced}}]}) |
This file contains hidden or 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
standalone.xml: | |
... | |
<jms-destinations> | |
<jms-queue name="queue/test"> | |
<entry name="java:/queue/test"/> | |
<durable>true</durable> | |
</jms-queue> | |
</jms-destinations> | |
</hornetq-server> |
This file contains hidden or 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
standalone.xml: | |
... | |
<jms-destinations> | |
<jms-queue name="queue/example"> | |
<entry name="queue/example"/> | |
<!-- <entry name="java:jboss/exported/jms/queue/test"/> --> | |
</jms-queue> | |
</jms-destinations> | |
</hornetq-server> |
This file contains hidden or 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
# | |
# Makefile - blinkasm.elf | |
# | |
# Author: Rick Kimball | |
# email: [email protected] | |
# Version: 1.03 Initial version 10/21/2011 | |
APP=blinkasm | |
MCU=msp430g2553 |
This file contains hidden or 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
(if window-system | |
(tool-bar-mode -1) | |
(menu-bar-mode -1)) | |
(when (eq window-system 'ns) | |
(add-to-list 'default-frame-alist '(height . 80)) | |
(add-to-list 'default-frame-alist '(width . 132))) | |
(require 'package) | |
(setq package-enable-at-startup nil) | |
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) |
OlderNewer