Posts from 2012-06

Interacting with MongoDB on the Command Line

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...

Read on

Change MySQL password on the terminal

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');" |...

Read on

ROOT CERN Mirror

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):

...

Read on

Convert Wikidot style syntax to Markdown style syntax

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...

Read on

Installing ROOT CERN on Mac OS X 10.8 Mountain Lion

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...

Read on