Skip to content

Instantly share code, notes, and snippets.

Avatar

Jestine Paul jestinepaul

View GitHub Profile
View keybase.md

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:

View Git-SVN-Workflow.md

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
View lazy-jms-queue-consumer.clj
(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 Dec 6, 2011
Introduction to Functional Programming - Part 3
View intro_to_fp_3.scm
;; 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 Nov 27, 2011
Introduction to Functional Programming - Part 2
View intro_to_fp_2.scm
(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 Nov 10, 2011
Introduction to Functional Programming - Part 1
View intro_to_fp_1.scm
4
"Hello"
#t
#f
11.752