Skip to content

Instantly share code, notes, and snippets.

View tedroden's full-sized avatar

Ted Roden tedroden

View GitHub Profile
FocusOut event, serial 41, synthetic NO, window 0x2e00001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 41, synthetic NO, window 0x2e00001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 41, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
@tedroden
tedroden / gist:4e99627b55ca45fe53b8
Created November 7, 2014 20:57
Example Conversation
CONVERSATION = {
"id": "sample_outgoing",
"name": "Sample Outgoing",
"version": 1.1,
"scripts": [
{
"id": "finish",
"steps": [
{
"name": "hello",
{
user_key: "ahBzfmZhbmN5aGFuZHMtaHJkcgwLEgZGSFVzZXIYAQw",
numeric_status: 1,
"custom_fields": [],
uniq: "2a90d",
title: "test",
content: "test",
date_updated: "2014-10-27T18:55:18.202600",
status: "In Progress",
api_bid: 5,
@tedroden
tedroden / gist:27c6560568956e3fa532
Created September 19, 2014 15:08
Transfer step
{
"name": "transfer",
"type": "logic_control",
"note": "",
"prompt": "OK, transferring you now.",
"options": [
{
"name": "Trasnsfer",
"result": "-- Transfer Call --"
}
{
"id": "sample_conversation",
"data": null,
"name": "Sample Conversation",
"version": 1.1,
"scripts": [
{
"id": "start",
"steps": [
{
Traceback (most recent call last):
File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 703, in __call__
handler.post(*groups)
File "/base/data/home/apps/fancyhands/67.357371791269985092/admin.py", line 69, in wrapper
return func(*arg)
File "/base/data/home/apps/fancyhands/67.357371791269985092/admin.py", line 569, in post
request.suggested_status)
File "/base/data/home/apps/fancyhands/67.357371791269985092/models.py", line 2636, in do_solve
self.add_time_segment(CLOSED_STATE, self.user)
File "/base/data/home/apps/fancyhands/67.357371791269985092/models.py", line 3255, in add_time_segment
error in process filter: Quit [2 times]
Saving file /Users/troden/.emacs.d/url/cookies...
Wrote /Users/troden/.emacs.d/url/cookies
Contacting host: gist.github.com:443
*beep*
Mark set
Mark saved where search started
*beep*
Processing Internship Applications 10 Feb - http://joelonsoftware.com/backIssues-2006-02.html
Aardvark'd Screening in New York 02 May - http://joelonsoftware.com/backIssues-2006-05.html
Wanted: System / Network Administrator 20 Jul - http://joelonsoftware.com/backIssues-2006-07.html
Travelers Insurance: Drop Dead. 29 Jul - http://joelonsoftware.com/backIssues-2006-07.html
Private Offices Redux 30 Jul - http://joelonsoftware.com/backIssues-2006-07.html
The Identity Management Method 10 Aug - http://joelonsoftware.com/backIssues-2006-08.html
Amazing X-Ray Glasses from Sprint! 19 Sep - http://joelonsoftware.com/backIssues-2006-09.html
From the "you call this agile?" department 15 Nov - http://joelonsoftware.com/backIssues-2006-11.html
Explaining Steve Gillmor 23 Dec - http://joelonsoftware.com/backIssues-2006-12.html
Office Space Calculations 02 Mar - http://joelonsoftware.com/backIssues-2007-03.html
# === blah.py ====
import pymongo
print "Version", pymongo.version
servers = "mongodb://localhost:27017,localhost:27018,localhost:27019/?slaveok=true"
DBNAME = "my-db"
COLLECTION = "User"
con = pymongo.Connection(servers)
db = con[DBNAME]
collection = db[COLLECTION]