List history:
history
Execute prior command:
!n
where n is command listed from history.
Articles, notes and random thoughts on Software Development and Technology
List history:
history
Execute prior command:
!n
where n is command listed from history.
The env var $OPENSHIFT_MONGODB_DB_LOG_DIR points to the MongoDB log location.
Looking for a calendar widget to use with my AngularJS app, I found this one. This is also the first library I’ve come across where I’ve needed to use bower to install it for me. I’ve seen and used bower as part of the AngularJS tutorial, but this is my first experience using it out of necessity.
I already have node.js installed for the AngularJS tutorial, so installed bower globally using:
sudo npm install -g bower
and then installed the angular-ui date picker with:
bower install angular-ui-date --save
Following the rest of the steps to include the dependent js and css files, add the ui-date directive to an input field… and that was easy, now I have a jQuery UI date picker!
Continuing prior notes from here.
Drop a database:
use databasename db.dropDatabase()
List distinct property values across all docs:
db.collectionname.distict("propertyname")
Remove docs in a collection – param is a doc query. If empty doc, removes all docs:
db.collectionname.remove({})
Date range query using $gt and $lt for a range:
db.collectionname.find({ "timestamp" : { "$gte" : ISODate("2014-07-08T19:50"), "$lt" : ISODate("2014-07-08T19:52") } })
[in progress]