Skip to content

Instantly share code, notes, and snippets.

@fuxialexander
fuxialexander / Org-Tyme.el
Last active January 27, 2017 03:09
Config for communication between Org mode and Tyme 2
(defun applescript-quote-string (argument)
"Quote a string for passing as a string to AppleScript."
(if (or (not argument) (string-equal argument ""))
"\"\""
;; Quote using double quotes, but escape any existing quotes or
;; backslashes in the argument with backslashes.
(let ((result "")
(start 0)
end)
(save-match-data
# This script will parse a json response from randomuser.me and convert it to the xml
# format required to import into Salesforce Demandware
#
# It fetches 500 random users from Canada. Just modify the URL parameters to modify these conditions.
import json
import os, sys
import codecs
from datetime import datetime
from xml.etree.ElementTree import ElementTree, Element, SubElement, Comment, tostring