Skip to content

Instantly share code, notes, and snippets.

@dmartz86
Last active August 29, 2015 13:58
Show Gist options
  • Save dmartz86/10409771 to your computer and use it in GitHub Desktop.
Save dmartz86/10409771 to your computer and use it in GitHub Desktop.

Revisions

  1. dmartz86 renamed this gist Apr 10, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. dmartz86 created this gist Apr 10, 2014.
    10 changes: 10 additions & 0 deletions incAndRegister
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    db.posts.update({
    _id : ObjectId("5346e2072ac437a08f93b74c")
    }, {
    $inc : {
    likes : 1
    },
    $push : {
    users : 'singleUser'
    }
    });