Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block robinchew

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mithril.cljs
(ns cloject.mithril)
(defn build [l]
(if (vector? l)
(apply js/m
(clj->js (for [i l]
(build i))))
(if (seq? l)
(clj->js (for [i l]
(build i)))
View example-using-mithril.cljs
(defn quote-form [{:keys [floor-plan-update-url floor-plan-create-url] :as urls} data-atom history-atom quote-id db-index search-index variant-search-index after-save]
(let [a (deref data-atom)
q (a :quote)
floor-plan-create-update-url (if quote-id floor-plan-update-url floor-plan-create-url)
field-errors (a :field-errors)
quoted-product-errors ((a :field-errors) "quoted_products")
quote-id ((a :quote) "id")
pdf-list ((a :quote) "pdfs")
client-list (a :clients)
staff-list (a :staffs)
View xmodmap
! Caps_Lock behaves as Control_L
remove Lock = Caps_Lock
keysym Caps_Lock = Control_L
add Control = Control_L
! Disable Control_L
keycode 37 = NoSymbol
! Left-handed mouse
pointer = 3 2 1
View browserify-one-liner
node_modules/browserify/bin/cmd.js --standalone bundle --debug main.js -t [ babelify --presets [ env ] --plugins [ mopt ] ] -o $BUNDLE_FILE_NAME
import re
import sys
from decimal import Decimal
def in_seconds(time_str):
hour, minute = map(int, time_str.split(':'))
return hour * 60 * 60 + minute * 60
def seconds_to_hours(seconds):
return seconds / 60 / 60

Setting up PC-EFTPOS to work with Virtual PinPad is a P-ITA, so do the following dance, and things might work.

  1. During setup, remember to select "PINPad will be attached..." PINPad will be attached....
  2. In EFT Client UI, change COM Port to TCPIP
  3. Press Stop and relaunch EFT Client UI again
  4. Setup Virtual PinPad
  5. Try changing to 2011 but 2012 should be the correct value. 2011 should be used for sending payment to EFT Client, and 2012 should be used for connecting Virtual PinPad to EFT Client.
    • Using port 2011 can seem to work and you may still be able to see PC_EFTPOS DEMO READY but don't be fooled because sending a transaction amount will be unsuccessful.
  6. You might have to close the virtual pinpad and open it again, until you see PC_EFTPOS DEMO READY.
You can’t perform that action at this time.