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
;; Copyright (c) James Reeves. All rights reserved. | |
;; The use and distribution terms for this software are covered by the Eclipse | |
;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which | |
;; can be found in the file epl-v10.html at the root of this distribution. By | |
;; using this software in any fashion, you are agreeing to be bound by the | |
;; terms of this license. You must not remove this notice, or any other, from | |
;; this software. | |
(ns compojure.server.jetty | |
"Clojure interface to start an embedded Jetty server." |
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
Traceback (most recent call last): | |
File "/home/chris/devel/envs/tg2env/bin/bpython", line 8, in <module> | |
load_entry_point('bpython==0.9.6.2', 'console_scripts', 'bpython')() | |
File "/home/chris/devel/envs/tg2env/lib/python2.6/site-packages/bpython-0.9.6.2-py2.6.egg/bpython/cli.py", line 1594, in main | |
banner=banner) | |
File "/home/chris/devel/envs/tg2env/lib/python2.6/site-packages/bpython-0.9.6.2-py2.6.egg/bpython/cli.py", line 1496, in curses_wrapper | |
return func(stdscr, *args, **kwargs) | |
File "/home/chris/devel/envs/tg2env/lib/python2.6/site-packages/bpython-0.9.6.2-py2.6.egg/bpython/cli.py", line 1562, in main_curses | |
repl.repl() | |
File "/home/chris/devel/envs/tg2env/lib/python2.6/site-packages/bpython-0.9.6.2-py2.6.egg/bpython/cli.py", line 937, in repl |
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
Emacs notes | |
selecting: | |
C-space start/stop mark mode | |
C-return select rectangle | |
esc C-\ indent region | |
ido mode: | |
C-f stops autocompletion so you can create a new file |
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
;; emacs customisations after using emacs starter kit. | |
;; font | |
(custom-set-faces | |
'(default ((t (:height 115 :width normal :foundry "outline" :family "Lucida Console"))))) | |
(setq-default tab-width 4) | |
(setq column-number-mode t) | |
;; themes | |
(add-to-list 'load-path "color-theme.el") |
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
(ns site.websocket | |
(:use [site.messaging]) | |
(:use [compojure]) | |
(:use [com.github.icylisper.rabbitmq]) | |
(:use [clojure.contrib.json read write]) | |
(:import java.io.IOException | |
javax.servlet.RequestDispatcher | |
(javax.servlet.http | |
HttpServletRequest | |
HttpServletResponse) |
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
var viewer = function() { | |
ws = null; | |
ws_host = "ws://192.168.1.17:8090/"; | |
//ws_host = "ws://10.137.16.6:8090/"; | |
var current_queue = null; | |
function smartPoller(wait, poller) { | |
//var do_reset = false | |
if ($.isFunction(wait)) { | |
poller = wait | |
wait = 1000; |
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 run-rpc | |
(fn* | |
([arg03319 arg13320] | |
(let* | |
[args | |
nil | |
socket | |
nil | |
failuren3322 | |
(fn* |
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
// calculate n reports per week | |
m = function() { | |
var getWeek = function(d) { | |
dowOffset = typeof(dowOffset) == 'int' ? dowOffset : 1; | |
var newYear = new Date(d.getFullYear(),0,1); | |
var day = newYear.getDay() - dowOffset; | |
day = (day >= 0 ? day : day + 7); | |
var daynum = Math.floor((d.getTime() - newYear.getTime() - (d.getTimezoneOffset()-newYear.getTimezoneOffset())*60000)/86400000) + 1; | |
var weeknum; |
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
/* Calc number of reports per service per week */ | |
m = function() { | |
var getWeek = function(d) { | |
dowOffset = typeof(dowOffset) == 'int' ? dowOffset : 1; | |
var newYear = new Date(d.getFullYear(),0,1); | |
var day = newYear.getDay() - dowOffset; | |
day = (day >= 0 ? day : day + 7); | |
var daynum = Math.floor((d.getTime() - newYear.getTime() - (d.getTimezoneOffset()-newYear.getTimezoneOffset())*60000)/86400000) + 1; | |
var weeknum; |
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
/* JSON-Websocket-AMQP bridge */ | |
var amqp_ws = function() { | |
ws = null; | |
function recieve_amqp(args) { | |
console.log(args.msg); | |
}; | |