-
Upgrade applications to use the latest Mongo Driver and then test applications to make sure they work using the latest version of driver with old database version.
-
Shutdown Mongod:
> db.shutdownServer()
-
Verify that the service actually stopped using:
$ sudo service mongodb status
-
Create a backup copy of all databases
$ sudo cp –vrp /media/data/mongodb /media/data/mongodb-backup
This file contains 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
@states = { | |
AL: "Alabama", | |
AK: "Alaska", | |
AZ: "Arizona", | |
AR: "Arkansas", | |
CA: "California", | |
CO: "Colorado", | |
CT: "Connecticut", | |
DE: "Delaware", | |
FL: "Florida", |
This file contains 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
[DebuggerStepThrough] | |
public static string FormatWith(this string target, params object[] args) | |
{ | |
if (string.IsNullOrEmpty(target)) | |
{ | |
return string.Empty; | |
} | |
return string.Format(CultureInfo.CurrentCulture, target, args); | |
} |
This file contains 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
public class JsonNetResult : JsonResult | |
{ | |
private readonly static JsonSerializerSettings Settings; | |
private readonly static IsoDateTimeConverter _dateTimeConverter; | |
static JsonNetResult() | |
{ | |
_dateTimeConverter = new IsoDateTimeConverter(); | |
// Default for IsoDateTimeConverter is yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK | |
_dateTimeConverter.DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFK"; |
This file contains 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
public static List<SelectListItem> ToSelectList(this Dictionary<string, string> items, string defaultItem, bool insertBlankItem = false) | |
{ | |
string[] defaultItems = new[] { defaultItem }; | |
if (!string.IsNullOrWhiteSpace(defaultItem)) | |
{ | |
defaultItems = defaultItem.Split(','); | |
} | |
var i = items.Select(pair => new SelectListItem | |
{ |
This file contains 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
Resources | |
http://onabai.wordpress.com/2012/05/10/installing-couchdb-1-2-in-ubuntu-12-04/ | |
http://depth-first.com/articles/2010/01/28/pubcouch-install-couchdb-on-ubuntu-karmic-from-source/ | |
http://wiki.apache.org/couchdb/Installing_on_Ubuntu | |
http://guide.couchdb.org/draft/source.html | |
http://grokbase.com/t/couchdb/user/114m97mzd0/installations-problem-with-couchdb | |
http://cvee.github.com/blog/2011/11/28/configuring-couchdb-on-ubuntu/ | |
This file contains 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
// Forked from: http://blog.ashmind.com/2007/09/05/evaluating-javascript-in-watin/ | |
// This helper class adds Eval so that you can obtain the result of a JavaScript | |
// function. This functionality is not native to WatiN. | |
/* | |
* Usage: | |
* var browser = new IE(); | |
* var foo = browser.NativeDocument.Eval<bool>("isFoo()"); | |
*/ |
This file contains 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 a string that starts with bind-address= and replace anything after the = with 0.0.0.0 | |
# For example, in the my.cnf file, this would replace: | |
# bind-address = 127.0.0.1 | |
# with | |
# bind-address = 0.0.0.0 | |
sed -i 's/^\(bind\-address\s*=\s*\).*$/\10\.0\.0\.0/' /etc/mysql/my.cnf |
This file contains 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
<select id="state" name="state"> | |
<option value="AL">Alabama</option> | |
<option value="AK">Alaska</option> | |
<option value="AZ">Arizona</option> | |
<option value="AR">Arkansas</option> | |
<option value="CA">California</option> | |
<option value="CO">Colorado</option> | |
<option value="CT">Connecticut</option> | |
<option value="DE">Delaware</option> | |
<option value="DC">District of Columbia</option> |
OlderNewer