I hereby claim:
- I am ofirski on github.
- I am ofirski (https://keybase.io/ofirski) on keybase.
- I have a public key ASAIOkXWguEjJZfL7c3orqtd4xUs8kZ5STmH9dxGIIxcnQo
To claim this, I am signing this object:
package ofirski; | |
import com.datastax.oss.driver.api.core.ProtocolVersion; | |
import com.datastax.oss.driver.api.core.type.DataType; | |
import com.datastax.oss.driver.api.core.type.DataTypes; | |
import com.datastax.oss.driver.api.core.type.codec.TypeCodec; | |
import com.datastax.oss.driver.api.core.type.reflect.GenericType; | |
import edu.umd.cs.findbugs.annotations.NonNull; | |
import edu.umd.cs.findbugs.annotations.Nullable; | |
import com.datastax.oss.driver.api.core.uuid.Uuids; |
I hereby claim:
To claim this, I am signing this object:
sudo useradd --create-home -s /bin/bash deploy | |
sudo adduser deploy sudo | |
sudo passwd deploy |
/******************************************************************************* | |
* Merges matching documents from source collection into desination collection | |
* Usage: | |
* mergeCollections("srcCollName", "destCollName", null, ["f1","f3"]) | |
* mergeCollections("srcCollName", "destCollName", {xy:"z"}, ["f1","f4"]) | |
********************************************************************************/ | |
function mergeCollections(sourceCollection, destCollection, sourceQuery, setFields) { | |
var nMatched = 0; | |
var nModified = 0; | |
sourceQuery = sourceQuery || {} |
/**************************************************************************** | |
* Add this snippet to ~/.mongorc in order to load it to any shell initiated | |
* Usage: | |
* db.myCollection.findOneById("5149cdbb62d5cbb22c000024") | |
* db.myCollection.findOneById("5149cdbb62d5cbb22c000024",{"field":1}) | |
*****************************************************************************/ | |
DBCollection.prototype.findOneById = function(objId ,fields, options ){ | |
return this.findOne({"_id":ObjectId(objId)}, fields, options); | |
} |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog $remote_fs | |
# Required-Stop: $syslog $remote_fs | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |