Skip to content

Instantly share code, notes, and snippets.

View jestinepaul's full-sized avatar

Jestine Paul jestinepaul

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jestinepaul on github.
  • I am jestinepaul (https://keybase.io/jestinepaul) on keybase.
  • I have a public key whose fingerprint is A8F0 BC2E 49A7 96E6 6CDA 20B5 54A3 31D7 5B10 22BD

To claim this, I am signing this object:

A git workflow to use SVN server with Git from Windows through an intermediate Git in Linux

Initial Setup

[tom@my-linux-machine:~] $ git config --global receive.denycurrentbranch ignore

C:\>git config --global merge.commit no
(defn- lazy-queue-message-seq [^QueueReceiver receiver]
(lazy-seq
(let [message (.receive receiver)]
(cons message (lazy-queue-message-seq receiver)))))
(defn queue-message-seq
"Receive a lazy sequence of messages from the JMS Queue"
[queue]
(let [^QueueSession session (.createQueueSession *jms-queue-connection* false Session/AUTO_ACKNOWLEDGE)
^QueueReceiver receiver (.createReceiver session (.createQueue session queue))]
@jestinepaul
jestinepaul / intro_to_fp_3.scm
Created December 6, 2011 04:28
Introduction to Functional Programming - Part 3
;; Map
;; ---
(map car '((1 2) (3 4) (5 6) (7 8)))
(map cdr '((1 2) (3 4) (5 6) (7 8)))
(map reverse '((1 2 3 4 5) (6 7 8 9 10) (11 12 13 14 15)))
(map string? '(3.4 5 1/4 "stringy" '("not" "me") "strungy"))
@jestinepaul
jestinepaul / intro_to_fp_2.scm
Created November 27, 2011 14:37
Introduction to Functional Programming - Part 2
(if (zero? 0) 4
(+ "hello" 4.5 '(8 2)))
(define (flatten x)
(cond ((null? x) '())
((list? (car x)) (append (flatten (car x)) (flatten (cdr x))))
(else (cons (car x) (flatten (cdr x))))))
(flatten '(1 (2 "3") "4" ((5))))
@jestinepaul
jestinepaul / intro_to_fp_1.scm
Created November 10, 2011 09:26
Introduction to Functional Programming - Part 1
4
"Hello"
#t
#f
11.752