- version 3.6
Check those constraints:
$this->anything()
# Python/Twisted/Redis backed DNS server - resolves from NAME to IP addrs | |
# fallback to google or any other DNS server to resolv domains not present on Redis | |
# to set a new domain on redis, just issue a SET domain.tld ip_addr | |
# run with twistd -ny txredns.tac | |
# gleicon 2011 | |
from twisted.names import dns, server, client, cache | |
from twisted.application import service, internet | |
from twisted.internet import defer | |
from twisted.python import log |
# http://notmysock.org/blog/hacks/a-twisted-dns-story.html | |
# http://blog.inneoin.org/2009/11/i-used-twisted-to-create-dns-server.html | |
# twistd -y dns.py | |
import socket | |
from twisted.internet.protocol import Factory, Protocol | |
from twisted.internet import reactor | |
from twisted.names import dns | |
from twisted.names import client, server |
diff --git a/ngx_http_gridfs_module.c b/ngx_http_gridfs_module.c | |
index 77ef430..859dff1 100644 | |
--- a/ngx_http_gridfs_module.c | |
+++ b/ngx_http_gridfs_module.c | |
@@ -490,7 +490,7 @@ static ngx_int_t ngx_http_mongo_add_connection(ngx_cycle_t* cycle, ngx_http_grid | |
if ( gridfs_loc_conf->mongods->nelts == 1 ) { | |
ngx_cpystrn( host, mongods[0].host.data, mongods[0].host.len + 1 ); | |
- status = mongo_connect( &mongo_conn->conn, (const char*)host, mongods[0].port ); | |
+ status = mongo_connect( &mongo_conn->conn, (const char*)host, mongods[0].port, MONGO_SECONDARY_OK ); |
diff --git a/src/gridfs.c b/src/gridfs.c | |
index f51b397..66f8d88 100644 | |
--- a/src/gridfs.c | |
+++ b/src/gridfs.c | |
@@ -43,7 +43,7 @@ int gridfs_init( mongo *client, const char *dbname, const char *prefix, | |
int options; | |
bson b; | |
- bson_bool_t success; | |
+ bson_bool_t success = 1; |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
def unserialize_session(val): | |
if not val: | |
return | |
session = {} | |
groups = re.split("([a-zA-Z0-9_]+)\|", val) | |
if len(groups) > 2: | |
groups = groups[1:] | |
groups = map(None, *([iter(groups)] * 2)) | |
for i in range(len(groups)): |
#!/usr/bin/env php | |
<?php | |
/* | |
Copyright 2013 Stuart Carnie and other contributors | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist | |
# launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist | |
from twisted.internet import reactor, stdio, defer | |
from twisted.internet.protocol import Protocol, Factory | |
from twisted.protocols.basic import LineReceiver | |
import time, re, math, json |
// Mocked Service | |
angular.module('mock.users', []). | |
factory('UserService', function($q) { | |
var userService = {}; | |
userService.get = function() { | |
return { | |
id: 8888, | |
name: "test user" | |
} |