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
"use strict" | |
// module App.Models | |
exports.createUser = function(u){ | |
// you might want to put some real implementations here | |
return 3; | |
}; | |
exports.lookupUser = function(u){ |
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
db = MongoClient('localhost', 27017).some_db # some_db is the DB name | |
db.table_name.insert_one({ # table name | |
'key1': value1, | |
'key2': value2 | |
}) | |
db.table_name.update_many({'key1':'some_value'}, # update all elts with key1 == 'some_value', setting key2 to 'processed' | |
{'$set': {'key2': 'processed'}) |
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
/* | |
* photon.cpp | |
* photonSplit | |
* | |
* Created by Diane Nguyen on 4/25/13. | |
* Copyright 2013 __MyCompanyName__. All rights reserved. | |
* | |
*/ | |
#include "photon.h" | |
#include <cstdlib> |
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 | |
# Push a message on-screen every 60 seconds to remind you of what you're supposed to be doing | |
# requires lib-notify (most distros have it I think) | |
while [ 1 ]; do | |
notify-send Hey "Get back to work" | |
sleep 60; | |
done |
NewerOlder