Pages in Tutorial
Virtualbox Tips for Ubuntu Guest in Windows Host
For Ubuntu tips, see http://jessezhuang.github.io/ article/ubuntu/. How to Get Shared Folder Write Access When used as a virtual machine guest (Ubuntu 14.04LTS in Windows 10 host with Oracle VirtualBox), to get access to shared folder, run the following command in shell, replace username with your ubuntu username.
replace username with your actual ubuntu username $ sudo usermod -a -G vboxsf username After that, reboot the VM and you should have write access to the shared folder.
How to Install Latest Version Vim in Ubuntu 14.04 LTS
Ubuntu comes with Vim-Tiny First of all, Ubuntu 14.04 LTS comes with Vim.Tiny with the version 2:7.4.052-1ubuntu3 which is Vim 7.4.052, already fairly new. Unfortunately I was looking specifically for markdown editing and syntax highlighting and I found that starting from 7.4.480 vim can pick up *.md files as markdown files by default. So I wanted to find a newer version of Vim to install. Install Vim with PPA I have tried to install Vim with debian packages listed on Vim.
Mongodb Tutorial 6 - Application Engineering
Durability of Writes Write Concern How to make sure the writes persistent? Assume application talking to a database server in the scheme below. The settings of two parameters affect the write concern: w(wait for acknowledgement) j(journal) effect comment 1 false fast, small window of vulnerability default setting 1 true slow, no vulnerability can be done inside driver at collection, database, or client level 0 - unacknowledged write do not recommend 2 - wait for 2 nodes in replica set to acknowledge write w can be 0-3 for a set with 3 nodes majority - wait for majority to acknowledge, avoid rollback on failover - tag values - set tags on nodes - If the journal has been written to disk and the server crashes, on recovery the server can look in the journal and recreate all the writes that were not yet persisted to the pages.
Mongodb Tutorial 1 - Introduction
To run mongo commands from the source of a JavaScript file, cat source.js | mongo # or mongo < source.js # or just mongo source.js To import/export data, $ mongoimport -d <database> -c <collection> -f <file> $ mongoimport -d <dababase> -c <collection> < file.json $ mongoexport -d <dababase> -c <collection> –out file.json $ mongorestore -d <database> -c <collection> file.bson # by default writes BSON file to dump/ in current directory $ mongodump -d <database> -c <collection [–out <path>] What is MongoDB?
MongoDB Tutorial 5 - Aggregation Framework
The aggregation framework has its roots in SQL’s world of groupby clause. Introduction Example used: imagine a SQL table of products. name category manufacture price ipad tablet Apple 499 nexus s cellphone Samsung 350 To get number of products from each manufacture with SQL, select manufacture, count(*) from products group by manufacture; with mongodb, > use agg > db.
Ubuntu Tips and Tricks
Ubuntu version is 14.04 LTS running as a guest OS in Oracle VirtualBox 5. For VirtualBox related issues, see http://jessezhuang.github.io/ article/virtualbox-tips/. Performance Monitoring top from command line System Monitor application installed by default. Screen Capture Application Screenshot installed by default. Can take screenshot of whole screen, current window, or selected area. Similar to “Snipping Tool” in Windows. To run this tool from the shell, use gnome-screeshot -i for interactive window specified with mouse, gnome-screenshot -help for other options.
MongoDB Tutorial 4 - Performance
Storage engine Storage engine sits between mongodb server and the file storage. Use db.serverStatus().storageEngine; to check. WiredTiger for many applications, this is faster - document level concurrency, lock free implementation. optimistic concurrency model which assumes two writes not gonna be on same document. if on same, one write unwound and try again. - compression of data and indexes. WiredTiger manages memory. - append only, no in place updates MMAP V1 Uses mmap system call undercovers.
A Tutorial for using Hugo and Github Pages as a Blog Site
Hugo, a Static Site Generator Hugo is one of the static site generators. Currently it is ranked 4th by StaticGen. Of the top competitors, Hugo is the only one written in a compiled language (Go), which builds the site much faster. So I decided to give it a spin. Most of them were written in JavaScript. Jekyll was the good old player in this field, which was used in Obama’s campaigns to raise $250M.