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
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 ); |
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
#!/bin/bash | |
function print_usage () { | |
echo usage: $0 LAST_KNOWN_GOOD_REVISION '"TEST_COMMAND"' | |
echo LAST_KNOWN_GOOD_REVISION = you can specify this as sha1 hash | |
echo TEST_COMMAND = the script to run, it should return 0 if success | |
echo NOTE: Ensure that the current revision is the bad \(broken\) | |
exit 1; | |
} |
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
import hudson.FilePath; | |
import hudson.util.StreamTaskListener; | |
import hudson.plugins.git.GitAPI; | |
import hudson.EnvVars; | |
j = Jenkins.instance.getJob("codility"); | |
workspace_path = j.getRootDir().toString() + "/workspace"; | |
workspace = new FilePath(new File(workspace_path)); | |
listener = new StreamTaskListener(); | |
envvars = new EnvVars(); |
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
#!/bin/bash | |
# BIN_PATH should not require trailing slash | |
BIN_PATH=${1} | |
if [ -z "${BIN_PATH}" ]; then | |
echo Please state the path to the bin folder, e.g.: > /dev/stderr | |
echo ${0} PATH_TO_BIN_FOLDER > /dev/stderr | |
exit 1 | |
fi |
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
from stat import ST_DEV, ST_INO | |
import logging | |
import os | |
try: | |
import codecs | |
except ImportError: | |
codecs = None |
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
# refs: http://stackoverflow.com/questions/5041996/django-with-pluggable-mongodb-storage-troubles | |
from django.conf import settings | |
from django.core.files.storage import Storage | |
from gridfs import GridFS | |
from pymongo import Connection | |
import urlparse | |
class GridFSStorage(Storage): | |
def __init__(self, host=None, port=None, db_name=None, base_url=None): |
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
# find recently (1 day) added git commit objects | |
GUIDS=`find ../.git/objects/ -Btime -1d | head -n100 | sed 's/^.*objects.//' | sed 's/\///g'`; (for GUID in $GUIDS; do echo $GUID; git cat-file -t $GUID; done;)|grep commit -B1 |
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
GUIDS=`ls -lth ../.git/objects/*/* | head -n15 | sed 's/^.*objects.//' | sed 's/\///'`; for GUID in $GUIDS; do echo $GUID; git cat-file -t $GUID; done; |
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
// based on the work done by Corey at http://groups.google.com/group/ubiquity-firefox/browse_thread/thread/14fcb5653c33a673/a046a069f0236938#a046a069f0236938 | |
const IDENTICA_STATUS_MAXLEN = 140; | |
CmdUtils.CreateCommand({ | |
name: "mytwit", | |
icon: "http://identi.ca/favicon.ico", | |
takes: {status: noun_arb_text}, | |
modifiers: {}, | |
preview: function(previewBlock, statusText) { | |
var previewTemplate = "Updates your Identi.ca status to: <br /><b>${status}</b><br /><br />Characters remaining: <b>${chars}</b><br />Reply to: <b>${reply_to}</b><br />Reply to candidates: <b>${reply_to_candidates}</b>"; |
NewerOlder