A viewer for Python Dict

Just found a beautiful viewer library that helps you view Python Dict object. Here is the code: “”” Created on Fri Feb 22 12:52:28 2013 @author: kranzth “”” from traits.api \ import HasTraits, Instance, Str, on_trait_change from traitsui.api \ import View, VGroup, Item, ValueEditor, TextEditor from copy import deepcopy class DictEditor(HasTraits): SearchTerm = Str() Object …

How to run a PPTP VPN server?

Setting up a VPN using PPTP protocal can be vulnerable for security. Yet it is an easy and quick way to set up a virtual private network (VPN). The procedure to setup up a PPTP VPN server can be found here:  https://help.ubuntu.com/community/PPTPServer The way to connect to a PPTP server on a client machine can …

Change mongodb data path to portable hard drive

Background I have a 1TB portable usb hard drive which I want to host mongodb data. The OS is ubuntu 15.04   Procedure stop your mongodb service sudo service mongod stop   edit `/etc/fstab` so that the computer automatically mounts your portable drive under “mongodb” user everytime the OS boots up: UUID=018483db-1b1c-4dd2-a373-58a6aa5a10be / ext4 errors=remount-ro …

Create mongodb replica sets on different machines

Important prerequisites: Confirm connectivity between machines you want to set as replica set Confirm the same version of Mongodb is installed on each machine. I tried one with mongo 2.6 and another with mongo 3.0 and totally failed. Then I installed mongo 3.0 on every machine. Don’t set authentication for all the machines before you …