Posts

Showing posts from July, 2013

Oracle: MongoDB NoSQL Cluster Using Oracle Solaris Zones

This is just a very short blog which I am interested about. Please check, How to Set Up a MongoDB NoSQL Cluster Using Oracle Solaris Zones

iOS: Using blocks as a variable

If you're into iOS programming and has a background on other programming languages like Java, Javascript, PHP, or Python, these languages have their own style of defining lambda or closures which you can assign to a specific variable and then call that variable as a method or function per se. I just wanted to take notes on this so I might not forget, and well share this with you. Below is a snippet part of the game I wrote which looks like this,     void (^ playComeAndRead )( BOOL )   = ^( BOOL finished ) {         double delayInSeconds = 0.3 ;        dispatch_time_t popTime = dispatch_time ( DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC ) ;        dispatch_after ( popTime, dispatch_get_main_queue () , ^( void ){             if ( _audioPlayer ) {    ...

What is interleaving?

Interleaving is the technique to avoid another full rotation of a disk when retrieving a data from a sector in disk. So for example, if sectors are being interleaved, this means that if they are stored, basically, into a factor of 1:4, if the next data to be retrieved is on sector 5 from sector 1, if sectors are arranged like this,  1 8 6 4 2 9 7 5 3 Then it don't need anymore to wait for another spindle or full revolution of the disk. This is what Wikipedia has explained, Information is commonly stored on disk storage in very small pieces referred to as sectors or blocks. These are arranged in concentric rings referred to as tracks across the surface of each disk. While it may seem easiest to order these blocks in direct serial order in each track, such as 1 2 3 4 5 6 7 8 9, for early computing devices this ordering was not practical. Data to be written or read is put into a special region of reusable memory referred to as a buffer. When data needed to be w...

How Does Parity means in RAID?

I just wanted to note myself about this so I can't forget. From Wikipedia, parity bit for raid works by giving an assurance that your data will be repaired using XOR logical operation. See below, Parity data is used by some RAID levels to achieve redundancy. If a drive in the array fails, remaining data on the other drives can be combined with the parity data (using the Boolean XOR function) to reconstruct the missing data. For example, suppose two drives in a three-drive RAID 5 array contained the following data: Drive 1: 01101101 Drive 2: 11010100 To calculate parity data for the two drives, an XOR is performed on their data:         01101101 XOR 11010100 _____________         10111001 The resulting parity data, 10111001 , is then stored on Drive 3. Should any of the three drives fail, the contents of the failed drive can be reconstructed on a replacement drive by subjecting the data fro...

SSH Login is slow!

I just found out this solution when I was playing with sshd_config. Anyway, I'm connecting locally with my another machine and I just can't let this latency and waiting for me until I'm logged in which is a little bit annoying. To fix this, edit your /etc/sshd_config, but make sure you create a backup. cp /etc/sshd_config /etc/sshd_config.backup vi /etc/sshd_config Then add these lines, UseDNS no Compression yes You can either not include Compression but it might help as ssh compression means, -C Requests compression of all data (including stdin, stdout, stderr, and data for forwarded X11 and TCP connections). The compression algorithm is the same used by gzip(1) , and the ``level'' can be controlled by the CompressionLevel option for protocol version 1. Compression is desir- able on modem lines and other slow connections, but will only slow down things on fast net- works. The defa...

Extending disk size of your Virtual Machine in Virtual Box in Mac OS X (Linux)

So this was my problem: I have a CentOS 6.4 which I just realized I cannot extend my database anymore because I'm running out of disk space. So let's go by giving a solution to our problem. In Mac OS X, if you go to to VirtualBox application package, there is a file called  VBoxManage  which is a utility. #> ls -al /Applications/VirtualBox.app/Contents/MacOS/ Display all 102 possibilities? (y or n) ExtensionPacks/                       VBoxDDR0.r0.codesign                  VBoxNetDHCP.dylib                     VMMGC.gc-x86 UserManual.pdf                        VBoxDDU.dylib                         VBoxOGLhostcrutil.dylib               VMMGC.gc-x86.codesign VBoxAu...