This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns cachej.core | |
(:require [clj-http.client :as client] | |
[clojure.string :as string] | |
[url-normalizer.core :as urlnorm] | |
[ring.util.time :as t])) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
craps.core=> (def my-list '(1 2 3 4)) | |
#'craps.core/my-list | |
craps.core=> (map println my-list) | |
(1 | |
2 | |
nil 3 | |
nil 4 | |
nil nil) | |
craps.core=> (map print my-list) | |
(12nil 3nil 4nil nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-procfile-name-from-line (line) | |
(car (split-string line ":"))) | |
(defun my-procfile-names (procfile) | |
(with-temp-buffer | |
(insert-file-contents procfile) | |
(-map 'my-procfile-name-from-line (split-string (buffer-string) "\n" t)))) | |
(defun my-procfile-cmd (procfile name) | |
(with-temp-buffer |