Jun 292012
 

Do some monitoring:

cat << EOF | mongo
db.stats();
db.serverStatus();
show dbs;
EOF

Show the last 10 entries in natural order:

cat << "EOF" | mongo
use your_db;
db.your_collection.find().sort({$natural:1}).limit(10);
EOF

Drop the database cube_development:

cat << EOF | mongo
show dbs;
use cube_development;
db.dropDatabase();
EOF
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Jun 292012
 

Here is how change the root password of MySQL on Ubuntu or Debian:

/etc/init.d/mysql stop
mysqld_safe --skip-grant-tables
echo "use mysql; update user set password=PASSWORD('newpass') where User='root'; flush privileges;" | mysql -u root -p
## this doesn't work in 'skip-grant-tables' mode:
#echo "SET PASSWORD FOR 'root' = PASSWORD('newpass');" | mysql -u root -p
/etc/init.d/mysql stop
/etc/init.d/mysql start
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Jun 192012
 

As the ROOT website root.cern.ch is currently not reachable, I uploaded the latest source release (which I downloaded a couple of days ago from the ROOT site):

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Jun 142012
 

I wrote a converter for Wikidot syntax that outputs Markdown syntax. You can use it to move from Wikidot.com to any Markdown based wiki / blog / note collection.

I set up an online converter that you can use to convert your Wikidot syntax files to Markdown.

The converter itself is written in Python and I published it on Github: wikidot-to-markdown.

The converter does not cover the full Wikidot syntax and features yet. If you would like another feature to be supported, fork the project on Github and implement it, or contact me about it.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
Jun 132012
 

This is a follow up post for the older one on installing an older ROOT version on 10.7 Lion.

Prerequisites

First, you need to install XCode 4.4 which can be found in the Mac App Store (rather in the Mac Dev program as long as it’s not released). Then open it and install the command line tools from the its preferences pane. Then install Homebrew using ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)".

ROOT Installation

Installing ROOT using configure and make is fairly easy. I recommend the following procedure on 10.8 Mountain Lion as it is easy and convenient: