Skip to content

Instantly share code, notes, and snippets.

(defn col-map {"Email" "email"
"First Name" "firstname"
"Last Name" "lastname"
"Birthdate" "birthdate"
"Acquisition Date" "notes"
"Billing Address 1" "address"
"Billing Address 2" "address2"
"Billing City" "city"
"Billing State/Province" "state"
"Billing Country" "country"
(require 's)
(defun nm/run (cmd)
"Run CMD and return the output as a chomp'd string."
(s-chomp (shell-command-to-string cmd)))
(defconst nm-buffer-name "*nm*"
"Name of NetworkManager mode buffer.")
(ns cachej.core
(:require [clj-http.client :as client]
[clojure.string :as string]
[url-normalizer.core :as urlnorm]
[ring.util.time :as t]))
~/Projects/has_bson $ virtualenv venv
New python executable in venv/bin/python
Installing setuptools, pip...done.
~/Projects/has_bson $ venv/bin/pip install pymongo
Downloading/unpacking pymongo
Using download cache from /home/eric/.pip/download_cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fp%2Fpymongo%2Fpymongo-2.7.2.tar.gz
Running setup.py (path:/home/eric/Projects/has_bson/venv/build/pymongo/setup.py) egg_info for package pymongo
Installing collected packages: pymongo
Running setup.py install for pymongo
# Need to find the IP address so we'll wrap socket.connect to print
# the addr info
def logging_connect(self, addr, *args, **kw):
log('%s:%s', *addr)
return socket.socket._original_connect(self, addr, *args, **kw)
socket.socket._original_connect = socket.socket.connect
socket.socket.connect = logging_connect
def test_read_version_three(self, url):
original_resp = requests.get(url)
data = original_resp.content
req = original_resp.request
resp = self.serializer.loads(
req, self.serializer.dumps(
req,
original_resp.raw
),
def test_read_version_three(self, url):
original_resp = requests.get(url)
# data = original_resp.content
req = original_resp.request
resp = self.serializer.loads(
req, self.serializer.dumps(
req,
original_resp.raw
),
---
timestamp: 2015-04-27 17:05:34 UTC
kitchen_version: 1.3.1
loader:
process_erb: true
process_local: true
process_global: true
global_config:
project_config:
filename: "/Users/eric8549/Work/cookbook-designate-panama/.kitchen.yml"
(defun source-to-elisp (fname)
(with-temp-buffer
(insert-file fname)
(while (re-search-forward "^export \\(.*\\)=\\(.*\\)")
(let ((key (match-string 1))
(value (replace-regexp-in-string "\'\"" "" (match-string 2))))
(if (and key value)
(progn
(setenv key value)))))))
with_items: "{% for host in groups['app'] %}"
- "{{ host }}"
"{% endfor %}"